Changes required to use MaskableIconDrawable inside Launcher3
This CL will bake the legacy icons inside a grey background Note: There will be follow up CL to change the color and shadow of the legacy icon. The idea of this CL is to first test if MaskableIconDrawable methods and class work properly. Bug: 32063838 Bug: 33553066 Change-Id: I3d02e619fcb0cd9879baa22a025b5d95c829f26c
This commit is contained in:
@@ -9,6 +9,9 @@ import android.database.sqlite.SQLiteFullException;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.config.ProviderConfig;
|
||||
|
||||
/**
|
||||
* An extension of {@link SQLiteOpenHelper} with utility methods for a single table cache DB.
|
||||
* Any exception during write operations are ignored, and any version change causes a DB reset.
|
||||
@@ -16,12 +19,18 @@ import android.util.Log;
|
||||
public abstract class SQLiteCacheHelper {
|
||||
private static final String TAG = "SQLiteCacheHelper";
|
||||
|
||||
private static final boolean NO_ICON_CACHE = ProviderConfig.IS_DOGFOOD_BUILD &&
|
||||
Utilities.isPropertyEnabled("MEMORY_ONLY_ICON_CACHE");
|
||||
|
||||
private final String mTableName;
|
||||
private final MySQLiteOpenHelper mOpenHelper;
|
||||
|
||||
private boolean mIgnoreWrites;
|
||||
|
||||
public SQLiteCacheHelper(Context context, String name, int version, String tableName) {
|
||||
if (NO_ICON_CACHE) {
|
||||
name = null;
|
||||
}
|
||||
mTableName = tableName;
|
||||
mOpenHelper = new MySQLiteOpenHelper(context, name, version);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user