Merge "Guard against null info when applying widget RROs" into sc-dev am: 1561c6ac27 am: 73feaa09a6 am: ed2824c92d

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15543977

Change-Id: Ib4fb2365b314e087e59c8d9245fe79d92109e45e
This commit is contained in:
Ryan Mitchell
2021-08-16 15:55:45 +00:00
committed by Automerger Merge Worker

View File

@@ -3306,11 +3306,12 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
Slog.w(TAG, "Failed to retrieve app info for " + packageName
+ " userId=" + userId, e);
}
if (newAppInfo == null) {
if (newAppInfo == null || provider.info == null
|| provider.info.providerInfo == null) {
continue;
}
ApplicationInfo oldAppInfo = provider.info.providerInfo.applicationInfo;
if (!newAppInfo.sourceDir.equals(oldAppInfo.sourceDir)) {
if (oldAppInfo == null || !newAppInfo.sourceDir.equals(oldAppInfo.sourceDir)) {
// Overlay paths are generated against a particular version of an application.
// The overlays paths of a newly upgraded application are incompatible with the
// old version of the application.