From 3181679e9578a492b595eeb5a7ecc11c407ca17e Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Sat, 4 Dec 2010 10:15:32 -0800 Subject: [PATCH] Always return widget from onGetViewFactory Bug: 3250431 Change-Id: I161189b6cec2d2a1fe0e511c1e78390673efb0b9 --- src/com/android/email/provider/WidgetProvider.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/com/android/email/provider/WidgetProvider.java b/src/com/android/email/provider/WidgetProvider.java index 653edb23f..7752fe4e0 100644 --- a/src/com/android/email/provider/WidgetProvider.java +++ b/src/com/android/email/provider/WidgetProvider.java @@ -524,11 +524,7 @@ public class WidgetProvider extends AppWidgetProvider { int widgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1); if (widgetId == -1) return null; // Find the existing widget or create it - EmailWidget widget = sWidgetMap.get(widgetId); - if (widget == null) { - throw new IllegalStateException("onGetViewFactory, widget does not exist"); - } - return widget; + return getOrCreateWidget(widgetId); } @Override