Always return widget from onGetViewFactory

Bug: 3250431
Change-Id: I161189b6cec2d2a1fe0e511c1e78390673efb0b9
This commit is contained in:
Marc Blank 2010-12-04 10:15:32 -08:00
parent 3127277ad5
commit 3181679e95

View File

@ -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