summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJing (Mia) Wang <kaiyiz@codeaurora.org>2014-12-22 14:18:53 +0800
committerMatt Garnes <matt@cyngn.com>2015-01-15 16:05:55 +0800
commit657097fd0f4e28f597f15547ee70e3e8ef90c388 (patch)
tree131074950e9692da9247b3bfc8b6b7eab1f74285 /src
parentd18f58a6b243c52f8c25b8641c70570f21672d6d (diff)
downloadandroid_packages_apps_Trebuchet-657097fd0f4e28f597f15547ee70e3e8ef90c388.tar.gz
android_packages_apps_Trebuchet-657097fd0f4e28f597f15547ee70e3e8ef90c388.tar.bz2
android_packages_apps_Trebuchet-657097fd0f4e28f597f15547ee70e3e8ef90c388.zip
Trebuchet: Add Backup icon on main screen
Change-Id: Idcfcabcba72ebdc96b22f7b50c0fdfbc2e7c922b
Diffstat (limited to 'src')
-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();
}