diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/app/Dialog.java | 19 | ||||
-rw-r--r-- | core/java/android/appwidget/AppWidgetManager.java | 10 | ||||
-rw-r--r-- | core/java/android/appwidget/AppWidgetProviderInfo.java | 12 |
3 files changed, 32 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() { diff --git a/core/java/android/appwidget/AppWidgetManager.java b/core/java/android/appwidget/AppWidgetManager.java index 3660001..d4ce6a1 100644 --- a/core/java/android/appwidget/AppWidgetManager.java +++ b/core/java/android/appwidget/AppWidgetManager.java @@ -183,6 +183,16 @@ public class AppWidgetManager { * @see AppWidgetProviderInfo */ public static final String META_DATA_APPWIDGET_PROVIDER = "android.appwidget.provider"; + + /** + * Field for the manifest meta-data tag used to indicate any previous name for the + * app widget receiver. + * + * @see AppWidgetProviderInfo + * + * @hide Pending API approval + */ + public static final String META_DATA_APPWIDGET_OLD_NAME = "android.appwidget.oldName"; static WeakHashMap<Context, WeakReference<AppWidgetManager>> sManagerCache = new WeakHashMap(); static IAppWidgetService sService; diff --git a/core/java/android/appwidget/AppWidgetProviderInfo.java b/core/java/android/appwidget/AppWidgetProviderInfo.java index a2e0ba0a..cee2865 100644 --- a/core/java/android/appwidget/AppWidgetProviderInfo.java +++ b/core/java/android/appwidget/AppWidgetProviderInfo.java @@ -98,6 +98,18 @@ public class AppWidgetProviderInfo implements Parcelable { * the <code><receiver></code> element in the AndroidManifest.xml file. */ public int icon; + + + /** + * The previous name, if any, of the app widget receiver. If not supplied, it will be + * ignored. + * + * <p>This field corresponds to the <code><meta-data /></code> with the name + * <code>android.appwidget.oldName</code>. + * + * @hide Pending API approval + */ + public String oldName; public AppWidgetProviderInfo() { } |