OSDN Git Service

Fix issue #2549511 Crash while moving the installed app to Phone
authorDianne Hackborn <hackbod@google.com>
Wed, 31 Mar 2010 06:27:20 +0000 (23:27 -0700)
committerDianne Hackborn <hackbod@google.com>
Wed, 31 Mar 2010 17:00:16 +0000 (10:00 -0700)
android.view.WindowManager$BadTokenException: Unable to add window

Change-Id: Ie844fd9cde05134431695f4f5bd27827e9e23ce5

src/com/android/settings/InstalledAppDetails.java

index fb1fbf7..41ba49b 100644 (file)
@@ -119,6 +119,10 @@ public class InstalledAppDetails extends Activity implements View.OnClickListene
     
     private Handler mHandler = new Handler() {
         public void handleMessage(Message msg) {
+            // If the activity is gone, don't process any more messages.
+            if (isFinishing()) {
+                return;
+            }
             switch (msg.what) {
                 case CLEAR_USER_DATA:
                     processClearMsg(msg);