diff options
Diffstat (limited to 'android/src/org/rockbox/RockboxActivity.java')
-rw-r--r-- | android/src/org/rockbox/RockboxActivity.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/android/src/org/rockbox/RockboxActivity.java b/android/src/org/rockbox/RockboxActivity.java index 166d69ebe0..0e2daa76fb 100644 --- a/android/src/org/rockbox/RockboxActivity.java +++ b/android/src/org/rockbox/RockboxActivity.java @@ -45,8 +45,8 @@ public class RockboxActivity extends Activity Intent intent = new Intent(this, RockboxService.class); intent.setAction(Intent.ACTION_MAIN); intent.putExtra("callback", new ResultReceiver(new Handler(getMainLooper())) { + private boolean unzip = false; private ProgressDialog loadingdialog; - private void createProgressDialog() { loadingdialog = new ProgressDialog(RockboxActivity.this); @@ -64,16 +64,21 @@ public class RockboxActivity extends Activity case RockboxService.RESULT_INVOKING_MAIN: if (loadingdialog != null) loadingdialog.dismiss(); + setContentView(new RockboxFramebuffer(RockboxActivity.this)); break; case RockboxService.RESULT_LIB_LOAD_PROGRESS: if (loadingdialog == null) createProgressDialog(); - loadingdialog.setIndeterminate(false); loadingdialog.setMax(resultData.getInt("max", 100)); loadingdialog.setProgress(resultData.getInt("value", 0)); break; + case RockboxService.RESULT_LIB_LOADED: + unzip = resultData.getBoolean("unzip"); + break; case RockboxService.RESULT_SERVICE_RUNNING: + if (!unzip) /* defer to RESULT_INVOKING_MAIN */ + setContentView(new RockboxFramebuffer(RockboxActivity.this)); setServiceActivity(true); break; case RockboxService.RESULT_ERROR_OCCURED: @@ -85,7 +90,6 @@ public class RockboxActivity extends Activity } } }); - setContentView(new RockboxFramebuffer(this)); startService(intent); } |