summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/Dialog.java
diff options
context:
space:
mode:
authorRomain Guy <romainguy@android.com>2010-03-11 18:06:42 -0800
committerRomain Guy <romainguy@android.com>2010-03-11 18:06:42 -0800
commitd2671e1fcf1d7f1b8e25a2615d514cf3c26b6a9c (patch)
tree3250b0e86435f79ba7b2e4402a4adb9f00ca1c85 /core/java/android/app/Dialog.java
parent476c2323d5834cbc26ff8e5838003be2404cc497 (diff)
downloadframeworks_base-d2671e1fcf1d7f1b8e25a2615d514cf3c26b6a9c.zip
frameworks_base-d2671e1fcf1d7f1b8e25a2615d514cf3c26b6a9c.tar.gz
frameworks_base-d2671e1fcf1d7f1b8e25a2615d514cf3c26b6a9c.tar.bz2
Preserve widgets on upgrade.
Bug #2464545 Change-Id: I802878af49dc4d98210fb8049df0bbdc49268d99
Diffstat (limited to 'core/java/android/app/Dialog.java')
-rw-r--r--core/java/android/app/Dialog.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java
index 981c237..f364def 100644
--- a/core/java/android/app/Dialog.java
+++ b/core/java/android/app/Dialog.java
@@ -27,7 +27,6 @@ import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
-import android.util.Log;
import android.view.ContextMenu;
import android.view.ContextThemeWrapper;
import android.view.Gravity;
@@ -271,14 +270,16 @@ public class Dialog implements DialogInterface, Window.Callback,
return;
}
- mWindowManager.removeView(mDecor);
-
- mDecor = null;
- mWindow.closeAllPanels();
- onStop();
- mShowing = false;
-
- sendDismissMessage();
+ try {
+ mWindowManager.removeView(mDecor);
+ } finally {
+ mDecor = null;
+ mWindow.closeAllPanels();
+ onStop();
+ mShowing = false;
+
+ sendDismissMessage();
+ }
}
private void sendDismissMessage() {