diff options
author | Schneider Victor-tulias <victortulias@google.com> | 2021-05-14 15:29:18 -0700 |
---|---|---|
committer | Schneider Victor-tulias <victortulias@google.com> | 2021-05-14 15:29:18 -0700 |
commit | 262ae769b0243bb57a5297f9f15d1d3fbfe4fc0c (patch) | |
tree | f7c10a516af945d51e38e26f6641590e82f3ec00 | |
parent | 217e7100bcc535fffdcdcc8dc4ea345b4d4849a2 (diff) | |
download | Launcher3-262ae769b0243bb57a5297f9f15d1d3fbfe4fc0c.tar.gz |
Reapply All Apps icons on download complete.
Fixes: 187853323
Test: manual
Change-Id: I800a13a3665997f323f23667c8128c8034a7b4d3
-rw-r--r-- | src/com/android/launcher3/allapps/AllAppsStore.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsStore.java b/src/com/android/launcher3/allapps/AllAppsStore.java index 355ccadeba..2443b8360d 100644 --- a/src/com/android/launcher3/allapps/AllAppsStore.java +++ b/src/com/android/launcher3/allapps/AllAppsStore.java @@ -17,6 +17,7 @@ package com.android.launcher3.allapps; import static com.android.launcher3.model.data.AppInfo.COMPONENT_KEY_COMPARATOR; import static com.android.launcher3.model.data.AppInfo.EMPTY_ARRAY; +import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_SHOW_DOWNLOAD_PROGRESS_MASK; import android.view.View; import android.view.ViewGroup; @@ -157,11 +158,17 @@ public class AllAppsStore { * If this app is installed and supports incremental downloads, the progress bar will be updated * the app's total download progress. Otherwise, the progress bar will be updated to the app's * installation progress. + * + * If this app is fully downloaded, the app icon will be reapplied. */ public void updateProgressBar(AppInfo app) { updateAllIcons((child) -> { if (child.getTag() == app) { - child.applyProgressLevel(); + if ((app.runtimeStatusFlags & FLAG_SHOW_DOWNLOAD_PROGRESS_MASK) == 0) { + child.applyFromApplicationInfo(app); + } else { + child.applyProgressLevel(); + } } }); } |