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

Commit 24e092c0 authored by Charlie Anderson's avatar Charlie Anderson
Browse files

Ensure icons are invalidated when useNewIconForArchivedApps flag is flipped.

This way when launcher loads and the flag value has changed, archived apps fetch new icons to avoid having the wrong icon from cache.

Bug: 364856793
Flag: com.android.launcher3.use_new_icon_for_archived_apps
Test: manually flipping flag and rebooting
Change-Id: I5c83fea4138c1afad703dd43242d4afe620448d4
parent 5024f96a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -57,6 +57,7 @@ import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
import androidx.annotation.WorkerThread;

import com.android.launcher3.Flags;
import com.android.launcher3.icons.BaseIconFactory;
import com.android.launcher3.icons.BaseIconFactory.IconOptions;
import com.android.launcher3.icons.BitmapInfo;
@@ -750,7 +751,9 @@ public abstract class BaseIconCache {
     * Cache class to store the actual entries on disk
     */
    public static final class IconDB extends SQLiteCacheHelper {
        private static final int RELEASE_VERSION = 34;
        // Ensures archived app icons are invalidated after flag is flipped.
        // TODO: Remove conditional with FLAG_USE_NEW_ICON_FOR_ARCHIVED_APPS
        private static final int RELEASE_VERSION = Flags.useNewIconForArchivedApps() ? 35 : 34;

        public static final String TABLE_NAME = "icons";
        public static final String COLUMN_ROWID = "rowid";