Helena Josol | 4fbbb3e | 2014-10-06 16:06:46 +0100 | [diff] [blame] | 1 | package com.android.launcher3; |
| 2 | |
| 3 | import java.util.Arrays; |
| 4 | import java.util.Collections; |
| 5 | import java.util.List; |
| 6 | |
| 7 | /** |
| 8 | * Central list of files the Launcher writes to the application data directory. |
| 9 | * |
| 10 | * To add a new Launcher file, create a String constant referring to the filename, and add it to |
| 11 | * ALL_FILES, as shown below. |
| 12 | */ |
| 13 | public class LauncherFiles { |
| 14 | |
Helena Josol | 28db280 | 2014-10-09 17:04:09 +0100 | [diff] [blame] | 15 | private static final String XML = ".xml"; |
| 16 | |
| 17 | public static final String DEFAULT_WALLPAPER_THUMBNAIL = "default_thumb2.jpg"; |
| 18 | public static final String DEFAULT_WALLPAPER_THUMBNAIL_OLD = "default_thumb.jpg"; |
Helena Josol | 4fbbb3e | 2014-10-06 16:06:46 +0100 | [diff] [blame] | 19 | public static final String LAUNCHER_DB = "launcher.db"; |
Helena Josol | 28db280 | 2014-10-09 17:04:09 +0100 | [diff] [blame] | 20 | public static final String LAUNCHER_PREFERENCES = "launcher.preferences"; |
Helena Josol | 28db280 | 2014-10-09 17:04:09 +0100 | [diff] [blame] | 21 | public static final String SHARED_PREFERENCES_KEY = "com.android.launcher3.prefs"; |
Helena Josol | 28db280 | 2014-10-09 17:04:09 +0100 | [diff] [blame] | 22 | public static final String WALLPAPER_CROP_PREFERENCES_KEY = |
Sunny Goyal | 6a1e95a | 2015-03-20 17:26:30 -0700 | [diff] [blame] | 23 | "com.android.launcher3.WallpaperCropActivity"; |
Sunny Goyal | 18bf8e2 | 2015-04-08 18:13:46 -0700 | [diff] [blame] | 24 | public static final String MANAGED_USER_PREFERENCES_KEY = "com.android.launcher3.managedusers.prefs"; |
Sunny Goyal | 6a1e95a | 2015-03-20 17:26:30 -0700 | [diff] [blame] | 25 | |
Helena Josol | 4fbbb3e | 2014-10-06 16:06:46 +0100 | [diff] [blame] | 26 | public static final String WALLPAPER_IMAGES_DB = "saved_wallpaper_images.db"; |
| 27 | public static final String WIDGET_PREVIEWS_DB = "widgetpreviews.db"; |
Sunny Goyal | 4fbc382 | 2015-02-18 16:46:50 -0800 | [diff] [blame] | 28 | public static final String APP_ICONS_DB = "app_icons.db"; |
Helena Josol | 4fbbb3e | 2014-10-06 16:06:46 +0100 | [diff] [blame] | 29 | |
| 30 | public static final List<String> ALL_FILES = Collections.unmodifiableList(Arrays.asList( |
Helena Josol | 28db280 | 2014-10-09 17:04:09 +0100 | [diff] [blame] | 31 | DEFAULT_WALLPAPER_THUMBNAIL, |
| 32 | DEFAULT_WALLPAPER_THUMBNAIL_OLD, |
Helena Josol | 4fbbb3e | 2014-10-06 16:06:46 +0100 | [diff] [blame] | 33 | LAUNCHER_DB, |
Helena Josol | 28db280 | 2014-10-09 17:04:09 +0100 | [diff] [blame] | 34 | LAUNCHER_PREFERENCES, |
Helena Josol | 28db280 | 2014-10-09 17:04:09 +0100 | [diff] [blame] | 35 | SHARED_PREFERENCES_KEY + XML, |
Helena Josol | 28db280 | 2014-10-09 17:04:09 +0100 | [diff] [blame] | 36 | WALLPAPER_CROP_PREFERENCES_KEY + XML, |
Helena Josol | 4fbbb3e | 2014-10-06 16:06:46 +0100 | [diff] [blame] | 37 | WALLPAPER_IMAGES_DB, |
Sunny Goyal | 4fbc382 | 2015-02-18 16:46:50 -0800 | [diff] [blame] | 38 | WIDGET_PREVIEWS_DB, |
Sunny Goyal | 18bf8e2 | 2015-04-08 18:13:46 -0700 | [diff] [blame] | 39 | MANAGED_USER_PREFERENCES_KEY, |
Sunny Goyal | 4fbc382 | 2015-02-18 16:46:50 -0800 | [diff] [blame] | 40 | APP_ICONS_DB)); |
Sunny Goyal | 15b480f | 2015-03-18 16:57:19 -0700 | [diff] [blame] | 41 | |
| 42 | // TODO: Delete these files on upgrade |
| 43 | public static final List<String> OBSOLETE_FILES = Collections.unmodifiableList(Arrays.asList( |
| 44 | "launches.log", |
Sunny Goyal | 756adbc | 2015-04-16 15:20:51 -0700 | [diff] [blame] | 45 | "stats.log", |
| 46 | "com.android.launcher3.compat.PackageInstallerCompatV16.queue")); |
Helena Josol | 4fbbb3e | 2014-10-06 16:06:46 +0100 | [diff] [blame] | 47 | } |