diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-17 14:27:23 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-07-17 14:27:23 -0700 |
commit | cf492afdeb3a1da04cc71518285eb778f2ef6837 (patch) | |
tree | bc1565d9de5d613d8992d0516a3036b08b73ee52 /core/java/android/appwidget | |
parent | e96bd1291482175ac1740780cbd0f42bbe9ff746 (diff) | |
parent | eda4be30a2a3a63093faf052be5d804bf633e6f5 (diff) | |
download | frameworks_base-cf492afdeb3a1da04cc71518285eb778f2ef6837.zip frameworks_base-cf492afdeb3a1da04cc71518285eb778f2ef6837.tar.gz frameworks_base-cf492afdeb3a1da04cc71518285eb778f2ef6837.tar.bz2 |
Merge change 6809 into donut
* changes:
Correctly deliver AppWidgetProvider.onDeleted() events.
Diffstat (limited to 'core/java/android/appwidget')
-rwxr-xr-x | core/java/android/appwidget/AppWidgetProvider.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/core/java/android/appwidget/AppWidgetProvider.java b/core/java/android/appwidget/AppWidgetProvider.java index 26712a1..f1bbede 100755 --- a/core/java/android/appwidget/AppWidgetProvider.java +++ b/core/java/android/appwidget/AppWidgetProvider.java @@ -64,11 +64,9 @@ public class AppWidgetProvider extends BroadcastReceiver { } else if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) { Bundle extras = intent.getExtras(); - if (extras != null) { - int[] appWidgetIds = extras.getIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS); - if (appWidgetIds != null && appWidgetIds.length > 0) { - this.onDeleted(context, appWidgetIds); - } + if (extras != null && extras.containsKey(AppWidgetManager.EXTRA_APPWIDGET_ID)) { + final int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID); + this.onDeleted(context, new int[] { appWidgetId }); } } else if (AppWidgetManager.ACTION_APPWIDGET_ENABLED.equals(action)) { |