Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 262ae769 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias
Browse files

Reapply All Apps icons on download complete.

Fixes: 187853323
Test: manual
Change-Id: I800a13a3665997f323f23667c8128c8034a7b4d3
parent 217e7100
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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,12 +158,18 @@ 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) {
                if ((app.runtimeStatusFlags & FLAG_SHOW_DOWNLOAD_PROGRESS_MASK) == 0) {
                    child.applyFromApplicationInfo(app);
                } else {
                    child.applyProgressLevel();
                }
            }
        });
    }