Protecting Icon normalization behind a feature flag

Change-Id: I91b7126765049372a3ffec3ad6f661715dc83bab
This commit is contained in:
Sunny Goyal
2015-12-17 11:24:31 -08:00
parent 2b84b652b3
commit d896ee43cd
3 changed files with 8 additions and 2 deletions

View File

@@ -45,6 +45,7 @@ import com.android.launcher3.compat.LauncherActivityInfoCompat;
import com.android.launcher3.compat.LauncherAppsCompat;
import com.android.launcher3.compat.UserHandleCompat;
import com.android.launcher3.compat.UserManagerCompat;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.PackageItemInfo;
import com.android.launcher3.util.ComponentKey;
import com.android.launcher3.util.Thunk;
@@ -784,6 +785,9 @@ public class IconCache {
private static final class IconDB extends SQLiteOpenHelper {
private final static int DB_VERSION = 7;
private final static int RELEASE_VERSION = DB_VERSION +
(FeatureFlags.LAUNCHER3_ICON_NORMALIZATION ? 1 : 0);
private final static String TABLE_NAME = "icons";
private final static String COLUMN_ROWID = "rowid";
private final static String COLUMN_COMPONENT = "componentName";
@@ -796,7 +800,7 @@ public class IconCache {
private final static String COLUMN_SYSTEM_STATE = "system_state";
public IconDB(Context context) {
super(context, LauncherFiles.APP_ICONS_DB, null, DB_VERSION);
super(context, LauncherFiles.APP_ICONS_DB, null, RELEASE_VERSION);
}
@Override