summaryrefslogtreecommitdiffstats
path: root/core/java/android/appwidget
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-17 14:27:23 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-07-17 14:27:23 -0700
commitcf492afdeb3a1da04cc71518285eb778f2ef6837 (patch)
treebc1565d9de5d613d8992d0516a3036b08b73ee52 /core/java/android/appwidget
parente96bd1291482175ac1740780cbd0f42bbe9ff746 (diff)
parenteda4be30a2a3a63093faf052be5d804bf633e6f5 (diff)
downloadframeworks_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-xcore/java/android/appwidget/AppWidgetProvider.java8
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)) {