Bugfix: Ensure archived app icons persist when app main activity name changes post unarchival.

* In case app main activity changes, archived app icon should not disappear.
* We need to make sure the corresponding new intent is applied correctly to the app icon on activity name change.

Test: verified bugfix locally.
Bug: 324545643
Bug: 325458020
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Change-Id: I0134e57e3536d05fc96c8cfcf5f57fd8f4df5f1f
This commit is contained in:
Rohit Goyal
2024-02-21 13:12:02 +00:00
parent 772e0127c3
commit b6b27a497e
@@ -240,8 +240,9 @@ public class PackageUpdatedTask extends BaseModelUpdateTask {
isTargetValid = context.getSystemService(LauncherApps.class)
.isActivityEnabled(cn, mUser);
}
if (!isTargetValid && si.hasStatusFlag(
FLAG_RESTORED_ICON | FLAG_AUTOINSTALL_ICON)) {
if (!isTargetValid && (si.hasStatusFlag(
FLAG_RESTORED_ICON | FLAG_AUTOINSTALL_ICON)
|| si.isArchived())) {
if (updateWorkspaceItemIntent(context, si, packageName)) {
infoUpdated = true;
} else if (si.hasPromiseIconUi()) {