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

am: 225071b

* commit '225071b627bfff5f67c7fd4b0840373e696834e6':
  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
This commit is contained in:
Sunny Goyal
2016-03-24 21:02:09 +00:00
committed by android-build-merger
+5 -3
View File
@@ -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