Create a central list of files the Launcher writes to the app directory

Replace hardcoded Launcher filenames with the defined constants.

Bug: 12753154
Change-Id: I072f202d9388a703b9e6851bde64ea7fafe4b10a
This commit is contained in:
Helena Josol
2014-10-06 16:06:46 +01:00
parent ebb2a66b79
commit 4fbbb3e3e0
5 changed files with 39 additions and 13 deletions

View File

@@ -287,7 +287,6 @@ public class WidgetPreviewLoader {
static class CacheDb extends SQLiteOpenHelper {
final static int DB_VERSION = 2;
final static String DB_NAME = "widgetpreviews.db";
final static String TABLE_NAME = "shortcut_and_widget_previews";
final static String COLUMN_NAME = "name";
final static String COLUMN_SIZE = "size";
@@ -295,7 +294,8 @@ public class WidgetPreviewLoader {
Context mContext;
public CacheDb(Context context) {
super(context, new File(context.getCacheDir(), DB_NAME).getPath(), null, DB_VERSION);
super(context, new File(context.getCacheDir(),
LauncherFiles.WIDGET_PREVIEWS_DB).getPath(), null, DB_VERSION);
// Store the context for later use
mContext = context;
}