summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher3/DynamicGrid.java11
-rw-r--r--src/com/android/launcher3/LauncherApplication.java3
2 files changed, 11 insertions, 3 deletions
diff --git a/src/com/android/launcher3/DynamicGrid.java b/src/com/android/launcher3/DynamicGrid.java
index d2a5ff7e2..1bf9afb56 100644
--- a/src/com/android/launcher3/DynamicGrid.java
+++ b/src/com/android/launcher3/DynamicGrid.java
@@ -61,9 +61,14 @@ public class DynamicGrid {
boolean useLargeIcons = SettingsProvider.getBoolean(context,
SettingsProvider.SETTINGS_UI_GENERAL_ICONS_LARGE,
R.bool.preferences_interface_general_icons_large_default);
- boolean launcherShortcutEnabled = LauncherApplication.LAUNCHER_SHORTCUT_ENABLED;
- int fourByFourDefaultLayout = launcherShortcutEnabled ? R.xml.ct_default_workspace_4x4
- : R.xml.default_workspace_4x4;
+
+ int fourByFourDefaultLayout = R.xml.default_workspace_4x4;
+ if (LauncherApplication.LAUNCHER_SHORTCUT_ENABLED) {
+ fourByFourDefaultLayout = R.xml.ct_default_workspace_4x4;
+ } else if (LauncherApplication.LAUNCHER_BACKUP_SHORTCUT_ENABLED) {
+ fourByFourDefaultLayout = R.xml.cm_with_backup_default_workspace;
+ }
+
DEFAULT_ICON_SIZE_PX = pxFromDp(DEFAULT_ICON_SIZE_DP, dm);
// Our phone profiles include the bar sizes in each orientation
deviceProfiles.add(new DeviceProfile("Super Short Stubby",
diff --git a/src/com/android/launcher3/LauncherApplication.java b/src/com/android/launcher3/LauncherApplication.java
index 520beb639..56ca3267f 100644
--- a/src/com/android/launcher3/LauncherApplication.java
+++ b/src/com/android/launcher3/LauncherApplication.java
@@ -22,6 +22,7 @@ public class LauncherApplication extends Application {
public static boolean LAUNCHER_SHOW_UNREAD_NUMBER;
public static boolean LAUNCHER_SHORTCUT_ENABLED;
public static boolean SHOW_CTAPP_FEATURE;
+ public static boolean LAUNCHER_BACKUP_SHORTCUT_ENABLED;
@Override
public void onCreate() {
@@ -31,6 +32,8 @@ public class LauncherApplication extends Application {
LAUNCHER_SHORTCUT_ENABLED = getResources().getBoolean(
R.bool.config_launcher_shortcut);
SHOW_CTAPP_FEATURE = getResources().getBoolean(R.bool.config_launcher_page);
+ LAUNCHER_BACKUP_SHORTCUT_ENABLED =
+ getResources().getBoolean(R.bool.config_launcher_show_backup_shortcut);
LauncherAppState.setApplicationContext(this);
LauncherAppState.getInstance();
}