Merge "Fix broken app icon on restart during install." into sc-dev am: 3115a4380b

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15003917

Change-Id: I1dfba370e2427e795b73165974d41bbf62c047a8
This commit is contained in:
TreeHugger Robot
2021-06-17 01:28:47 +00:00
committed by Automerger Merge Worker
@@ -212,7 +212,8 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
}
if (si.isPromise() && isNewApkAvailable) {
boolean isTargetValid = true;
boolean isTargetValid = !cn.getClassName().equals(
IconCache.EMPTY_CLASS_NAME);
if (si.itemType == Favorites.ITEM_TYPE_DEEP_SHORTCUT) {
List<ShortcutInfo> shortcut =
new ShortcutRequest(context, mUser)
@@ -225,7 +226,7 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
si.updateFromDeepShortcutInfo(shortcut.get(0), context);
infoUpdated = true;
}
} else if (!cn.getClassName().equals(IconCache.EMPTY_CLASS_NAME)) {
} else if (isTargetValid) {
isTargetValid = context.getSystemService(LauncherApps.class)
.isActivityEnabled(cn, mUser);
}