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

Commit 225071b6 authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Embedding the icon pixel size in the cache DB version. This causes the...

Merge "Embedding the icon pixel size in the cache DB version. This causes the cache to get reset when the icon size changes, for eg, in case of display scale changes" into ub-launcher3-calgary
parents 07a2f134 2ae7736d
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ public class IconCache {
        mUserManager = UserManagerCompat.getInstance(mContext);
        mLauncherApps = LauncherAppsCompat.getInstance(mContext);
        mIconDpi = inv.fillResIconDpi;
        mIconDb = new IconDB(context);
        mIconDb = new IconDB(context, inv.iconBitmapSize);
        mLowResCanvas = new Canvas();
        mLowResPaint = new Paint(Paint.FILTER_BITMAP_FLAG | Paint.ANTI_ALIAS_FLAG);

@@ -816,8 +816,10 @@ public class IconCache {
        private final static String COLUMN_LABEL = "label";
        private final static String COLUMN_SYSTEM_STATE = "system_state";

        public IconDB(Context context) {
            super(context, LauncherFiles.APP_ICONS_DB, RELEASE_VERSION, TABLE_NAME);
        public IconDB(Context context, int iconPixelSize) {
            super(context, LauncherFiles.APP_ICONS_DB,
                    (RELEASE_VERSION << 16) + iconPixelSize,
                    TABLE_NAME);
        }

        @Override