From 1a2851c298d9af88d5e0626ed4dedfde97364104 Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Thu, 28 Oct 2010 11:30:31 +0000 Subject: [PATCH] Redo "r28369, Android load progress screen". git+svn lost the actual code changed git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28372 a1c6a512-1295-4272-9138-f99709370657 --- android/src/org/rockbox/RockboxActivity.java | 7 +++++++ android/src/org/rockbox/RockboxService.java | 1 - 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/android/src/org/rockbox/RockboxActivity.java b/android/src/org/rockbox/RockboxActivity.java index 7c9022e1ba..e50ff59df3 100644 --- a/android/src/org/rockbox/RockboxActivity.java +++ b/android/src/org/rockbox/RockboxActivity.java @@ -22,6 +22,7 @@ package org.rockbox; import android.app.Activity; +import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.util.Log; @@ -42,6 +43,11 @@ public class RockboxActivity extends Activity ,WindowManager.LayoutParams.FLAG_FULLSCREEN); final Intent intent = new Intent(this, RockboxService.class); + loadingdialog = new ProgressDialog(this); + loadingdialog.setMessage("Rockbox Loading. Please wait..."); + loadingdialog.setProgressStyle(ProgressDialog.STYLE_SPINNER); + loadingdialog.setCancelable(false); + loadingdialog.show(); startService(intent); /* Now it gets a bit tricky: * The service is started in the same thread as we are now, @@ -67,6 +73,7 @@ public class RockboxActivity extends Activity runOnUiThread(new Runnable() { @Override public void run() { + loadingdialog.dismiss(); setContentView(RockboxService.fb); RockboxService.fb.invalidate(); } diff --git a/android/src/org/rockbox/RockboxService.java b/android/src/org/rockbox/RockboxService.java index 32970821d0..964404c745 100644 --- a/android/src/org/rockbox/RockboxService.java +++ b/android/src/org/rockbox/RockboxService.java @@ -38,7 +38,6 @@ import java.util.zip.ZipFile; import android.app.Notification; import android.app.NotificationManager; import android.app.PendingIntent; -import android.app.ProgressDialog; import android.app.Service; import android.content.BroadcastReceiver; import android.content.Context;