UI Improvement: Fix unexpected progress bar around app icon added to Workspace after unarchival.
* In case app icon is added to workspace after unarchival completes for archived app, it shows a completely filled progress bar around the icon.
* This behaviour exists because the 'FLAG_ARCHIVED' flag is copied from `AppInfo` item.
* This cl updates the 'FLAG_ARCHIVED' flag for 'AllApps' item once unarchival completes.
Test: verified bugfix locally.
Bug: 319213296
Flag: ACONFIG com.android.launcher3.enable_support_for_archiving DEVELOPMENT
Change-Id: I739225707a11bc9a6aa23e81775b4e036ce81a7e
diff --git a/src/com/android/launcher3/model/AllAppsList.java b/src/com/android/launcher3/model/AllAppsList.java
index ccb8900..b41f011 100644
--- a/src/com/android/launcher3/model/AllAppsList.java
+++ b/src/com/android/launcher3/model/AllAppsList.java
@@ -330,12 +330,15 @@
PackageManagerHelper.getLoadingProgress(info),
PackageInstallInfo.STATUS_INSTALLED_DOWNLOADING);
applicationInfo.intent = launchIntent;
- if (enableSupportForArchiving() && info.getActivityInfo().isArchived) {
+ if (enableSupportForArchiving()) {
// In case an app is archived, the respective item flag corresponding to
// archiving should also be applied during package updates
- applicationInfo.runtimeStatusFlags |= FLAG_ARCHIVED;
+ if (info.getActivityInfo().isArchived) {
+ applicationInfo.runtimeStatusFlags |= FLAG_ARCHIVED;
+ } else {
+ applicationInfo.runtimeStatusFlags &= (~FLAG_ARCHIVED);
+ }
}
-
mDataChanged = true;
}
}