mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-28 07:46:55 +00:00
Merge "Reapply All Apps icons on download complete." into sc-dev am: 6a69ff55b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/14554680 Change-Id: I5a2da91e90ffb51ae90da08354ae7ff78d6bddfb
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user