diff options
author | Helena Josol <helenajosol@google.com> | 2014-10-06 16:06:46 +0100 |
---|---|---|
committer | Danesh M <daneshm90@gmail.com> | 2015-09-27 14:59:01 -0700 |
commit | a8f7b6a9f33fcedd6f1e429606e1241d7ed7e54b (patch) | |
tree | 3c68a489fe263eb2f70833b6dbb0be5f44c73cbb /WallpaperPicker/src | |
parent | 0e6e432422c5c685f8878086c2c5b891cd44cf4f (diff) | |
download | android_packages_apps_Trebuchet-a8f7b6a9f33fcedd6f1e429606e1241d7ed7e54b.tar.gz android_packages_apps_Trebuchet-a8f7b6a9f33fcedd6f1e429606e1241d7ed7e54b.tar.bz2 android_packages_apps_Trebuchet-a8f7b6a9f33fcedd6f1e429606e1241d7ed7e54b.zip |
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
Diffstat (limited to 'WallpaperPicker/src')
-rw-r--r-- | WallpaperPicker/src/com/android/launcher3/SavedWallpaperImages.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/WallpaperPicker/src/com/android/launcher3/SavedWallpaperImages.java b/WallpaperPicker/src/com/android/launcher3/SavedWallpaperImages.java index 2bdf8f1cd..9f92bc105 100644 --- a/WallpaperPicker/src/com/android/launcher3/SavedWallpaperImages.java +++ b/WallpaperPicker/src/com/android/launcher3/SavedWallpaperImages.java @@ -180,7 +180,6 @@ public class SavedWallpaperImages extends BaseAdapter implements ListAdapter { static class ImageDb extends SQLiteOpenHelper { final static int DB_VERSION = 1; - final static String DB_NAME = "saved_wallpaper_images.db"; final static String TABLE_NAME = "saved_wallpaper_images"; final static String COLUMN_ID = "id"; final static String COLUMN_IMAGE_THUMBNAIL_FILENAME = "image_thumbnail"; @@ -189,7 +188,8 @@ public class SavedWallpaperImages extends BaseAdapter implements ListAdapter { Context mContext; public ImageDb(Context context) { - super(context, context.getDatabasePath(DB_NAME).getPath(), null, DB_VERSION); + super(context, context.getDatabasePath(LauncherFiles.WALLPAPER_IMAGES_DB).getPath(), + null, DB_VERSION); // Store the context for later use mContext = context; } @@ -197,8 +197,9 @@ public class SavedWallpaperImages extends BaseAdapter implements ListAdapter { public static void moveFromCacheDirectoryIfNecessary(Context context) { // We used to store the saved images in the cache directory, but that meant they'd get // deleted sometimes-- move them to the data directory - File oldSavedImagesFile = new File(context.getCacheDir(), ImageDb.DB_NAME); - File savedImagesFile = context.getDatabasePath(ImageDb.DB_NAME); + File oldSavedImagesFile = new File(context.getCacheDir(), + LauncherFiles.WALLPAPER_IMAGES_DB); + File savedImagesFile = context.getDatabasePath(LauncherFiles.WALLPAPER_IMAGES_DB); if (oldSavedImagesFile.exists()) { oldSavedImagesFile.renameTo(savedImagesFile); } |