diff --git a/project/java/DataDownloader.java b/project/java/DataDownloader.java index 99b786b3a..3c532c99f 100644 --- a/project/java/DataDownloader.java +++ b/project/java/DataDownloader.java @@ -420,6 +420,8 @@ class DataDownloader extends Thread } } + long updateStatusTime = 0; + if(DoNotUnzip) { Log.i("SDL", "Saving file '" + path + "'"); @@ -477,7 +479,11 @@ class DataDownloader extends Thread float percent = 0.0f; if( totalLen > 0 ) percent = (stream.getBytesRead() + partialDownloadLen) * 100.0f / (totalLen + partialDownloadLen); - Status.setText( downloadCount + "/" + downloadTotal + ": " + res.getString(R.string.dl_progress, percent, path) ); + if( System.currentTimeMillis() > updateStatusTime + 1000 ) + { + updateStatusTime = System.currentTimeMillis(); + Status.setText( downloadCount + "/" + downloadTotal + ": " + res.getString(R.string.dl_progress, percent, path) ); + } } out.flush(); out.close(); @@ -547,7 +553,11 @@ class DataDownloader extends Thread Log.i("SDL", "File '" + path + "' exists and passed CRC check - not overwriting it"); if( totalLen > 0 ) percent = stream.getBytesRead() * 100.0f / totalLen; - Status.setText( downloadCount + "/" + downloadTotal + ": " + res.getString(R.string.dl_progress, percent, path) ); + if( System.currentTimeMillis() > updateStatusTime + 1000 ) + { + updateStatusTime = System.currentTimeMillis(); + Status.setText( downloadCount + "/" + downloadTotal + ": " + res.getString(R.string.dl_progress, percent, path) ); + } continue; } catch( Exception e ) { } @@ -567,7 +577,11 @@ class DataDownloader extends Thread if( totalLen > 0 ) percent = stream.getBytesRead() * 100.0f / totalLen; - Status.setText( downloadCount + "/" + downloadTotal + ": " + res.getString(R.string.dl_progress, percent, path) ); + if( System.currentTimeMillis() > updateStatusTime + 1000 ) + { + updateStatusTime = System.currentTimeMillis(); + Status.setText( downloadCount + "/" + downloadTotal + ": " + res.getString(R.string.dl_progress, percent, path) ); + } try { int len = zip.read(buf); @@ -580,7 +594,11 @@ class DataDownloader extends Thread percent = 0.0f; if( totalLen > 0 ) percent = stream.getBytesRead() * 100.0f / totalLen; - Status.setText( downloadCount + "/" + downloadTotal + ": " + res.getString(R.string.dl_progress, percent, path) ); + if( System.currentTimeMillis() > updateStatusTime + 1000 ) + { + updateStatusTime = System.currentTimeMillis(); + Status.setText( downloadCount + "/" + downloadTotal + ": " + res.getString(R.string.dl_progress, percent, path) ); + } } out.flush(); out.close(); diff --git a/project/jni/application/commandergenius/commandergenius b/project/jni/application/commandergenius/commandergenius index 1bcbadd1e..6f28771d5 160000 --- a/project/jni/application/commandergenius/commandergenius +++ b/project/jni/application/commandergenius/commandergenius @@ -1 +1 @@ -Subproject commit 1bcbadd1eadd735235288463239c348f5b58f845 +Subproject commit 6f28771d57ca7d878e3cfee08014651b854b9c7f