blob: 64f1d951dc515a1e83f578b0acd3a4c8012849dd [file] [log] [blame]
Helena Josol4fbbb3e2014-10-06 16:06:46 +01001package com.android.launcher3;
2
Alex Chau238aaee2021-10-06 16:15:24 +01003import java.util.ArrayList;
Helena Josol4fbbb3e2014-10-06 16:06:46 +01004import java.util.Arrays;
5import java.util.Collections;
6import java.util.List;
7
8/**
9 * Central list of files the Launcher writes to the application data directory.
10 *
11 * To add a new Launcher file, create a String constant referring to the filename, and add it to
12 * ALL_FILES, as shown below.
13 */
14public class LauncherFiles {
15
Helena Josol28db2802014-10-09 17:04:09 +010016 private static final String XML = ".xml";
17
Helena Josol4fbbb3e2014-10-06 16:06:46 +010018 public static final String LAUNCHER_DB = "launcher.db";
Jon Mirandaec1277e2021-03-25 10:41:54 -040019 public static final String LAUNCHER_4_BY_5_DB = "launcher_4_by_5.db";
Tracy Zhou7df93d22020-01-27 13:44:06 -080020 public static final String LAUNCHER_4_BY_4_DB = "launcher_4_by_4.db";
21 public static final String LAUNCHER_3_BY_3_DB = "launcher_3_by_3.db";
22 public static final String LAUNCHER_2_BY_2_DB = "launcher_2_by_2.db";
23 public static final String BACKUP_DB = "backup.db";
Helena Josol28db2802014-10-09 17:04:09 +010024 public static final String SHARED_PREFERENCES_KEY = "com.android.launcher3.prefs";
Tracy Zhou7df93d22020-01-27 13:44:06 -080025 public static final String MANAGED_USER_PREFERENCES_KEY =
26 "com.android.launcher3.managedusers.prefs";
Sunny Goyala5c8a9e2016-07-08 08:32:44 -070027 // This preference file is not backed up to cloud.
28 public static final String DEVICE_PREFERENCES_KEY = "com.android.launcher3.device.prefs";
Sunny Goyal6a1e95a2015-03-20 17:26:30 -070029
Helena Josol4fbbb3e2014-10-06 16:06:46 +010030 public static final String WIDGET_PREVIEWS_DB = "widgetpreviews.db";
Sunny Goyal4fbc3822015-02-18 16:46:50 -080031 public static final String APP_ICONS_DB = "app_icons.db";
Helena Josol4fbbb3e2014-10-06 16:06:46 +010032
Alex Chau238aaee2021-10-06 16:15:24 +010033 public static final List<String> GRID_DB_FILES = Collections.unmodifiableList(Arrays.asList(
Helena Josol4fbbb3e2014-10-06 16:06:46 +010034 LAUNCHER_DB,
Jon Mirandaec1277e2021-03-25 10:41:54 -040035 LAUNCHER_4_BY_5_DB,
Tracy Zhou7df93d22020-01-27 13:44:06 -080036 LAUNCHER_4_BY_4_DB,
37 LAUNCHER_3_BY_3_DB,
Alex Chau238aaee2021-10-06 16:15:24 +010038 LAUNCHER_2_BY_2_DB));
39
40 public static final List<String> OTHER_FILES = Collections.unmodifiableList(Arrays.asList(
Tracy Zhou7df93d22020-01-27 13:44:06 -080041 BACKUP_DB,
Helena Josol28db2802014-10-09 17:04:09 +010042 SHARED_PREFERENCES_KEY + XML,
Sunny Goyal4fbc3822015-02-18 16:46:50 -080043 WIDGET_PREVIEWS_DB,
Sunny Goyal8a6edce2016-03-23 10:47:15 -070044 MANAGED_USER_PREFERENCES_KEY + XML,
Sunny Goyala5c8a9e2016-07-08 08:32:44 -070045 DEVICE_PREFERENCES_KEY + XML,
Sunny Goyal7779d622015-06-11 16:18:39 -070046 APP_ICONS_DB));
Alex Chau238aaee2021-10-06 16:15:24 +010047
48 public static final List<String> ALL_FILES = Collections.unmodifiableList(
49 new ArrayList<String>() {{
50 addAll(GRID_DB_FILES);
51 addAll(OTHER_FILES);
52 }});
Helena Josol4fbbb3e2014-10-06 16:06:46 +010053}