Always return widget from onGetViewFactory
Bug: 3250431 Change-Id: I161189b6cec2d2a1fe0e511c1e78390673efb0b9
This commit is contained in:
parent
3127277ad5
commit
3181679e95
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user