Fix #38218977 : NPE restoring widget mappings

Remember that we might not be able to resolve historical
widget provider references, so don't access them unchecked.

Test: manual
Change-Id: I01c6c68461b6d15aa8fee402a4bfb0f21bf1ddbb
This commit is contained in:
Christopher Tate
2017-05-11 15:39:34 -07:00
parent 33532e0208
commit b98bcce37c

View File

@@ -4365,7 +4365,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
}
addWidgetLocked(id);
}
if (id.provider.info != null) {
if (id.provider != null && id.provider.info != null) {
stashProviderRestoreUpdateLocked(id.provider,
restoredId, id.appWidgetId);
} else {