From 9ab4550ac31894f8f990b9746e70af430ea030f5 Mon Sep 17 00:00:00 2001 From: Rohit Goyal Date: Fri, 26 Jan 2024 02:20:56 +0530 Subject: [PATCH] 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 --- src/com/android/launcher3/model/AllAppsList.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/com/android/launcher3/model/AllAppsList.java b/src/com/android/launcher3/model/AllAppsList.java index ccb89004e3..b41f01118f 100644 --- a/src/com/android/launcher3/model/AllAppsList.java +++ b/src/com/android/launcher3/model/AllAppsList.java @@ -330,12 +330,15 @@ public class AllAppsList { 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; } }