diff options
author | Helena Josol <helenajosol@google.com> | 2014-10-06 16:25:56 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-10-06 16:25:56 +0000 |
commit | b2331f6601d26cf042e70070e1ef32fe06827f4d (patch) | |
tree | e80a936c9be2939edf07a7006fb1f18fede30514 /WallpaperPicker | |
parent | e2f25947844e7cd1f28c367eade49038347c658d (diff) | |
parent | 4fbbb3e3e0e135bc5b304bc63637bbc8b54fb5d8 (diff) | |
download | android_packages_apps_Trebuchet-b2331f6601d26cf042e70070e1ef32fe06827f4d.tar.gz android_packages_apps_Trebuchet-b2331f6601d26cf042e70070e1ef32fe06827f4d.tar.bz2 android_packages_apps_Trebuchet-b2331f6601d26cf042e70070e1ef32fe06827f4d.zip |
Merge "Create a central list of files the Launcher writes to the app directory" into ub-now-queens
Diffstat (limited to 'WallpaperPicker')
-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); } |