Merge "Always return widget from onGetViewFactory"

This commit is contained in:
Marc Blank 2010-12-05 20:45:38 -08:00 committed by Android (Google) Code Review
commit 07891f011c

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