From 661e34a1b64e22dfd1ce05c2bf87e86647973666 Mon Sep 17 00:00:00 2001 From: kaiyiz Date: Thu, 18 Sep 2014 10:59:19 +0800 Subject: Trebuchet: Customize features for regional package - Customize default launcher workspace for India. - Add Smartfren customize workspace layout. - micromax_default_workspace.xml and smartfren_default_workspace.xml is - copied from res/xml/default_workspace.xml Change-Id: I6598869a6b6f29fbad05b4c470e980141e4cbf61 --- res/values/config.xml | 2 + res/values/customize.xml | 37 ++++++ res/xml/micromax_default_workspace.xml | 125 +++++++++++++++++++++ res/xml/smartfren_default_workspace.xml | 125 +++++++++++++++++++++ src/com/android/launcher3/DynamicGrid.java | 4 + src/com/android/launcher3/LauncherApplication.java | 6 + 6 files changed, 299 insertions(+) create mode 100644 res/values/customize.xml create mode 100644 res/xml/micromax_default_workspace.xml create mode 100644 res/xml/smartfren_default_workspace.xml diff --git a/res/values/config.xml b/res/values/config.xml index 59b7c051e..36f719d6b 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -123,4 +123,6 @@ false true false + false + false diff --git a/res/values/customize.xml b/res/values/customize.xml new file mode 100644 index 000000000..8faa03e7b --- /dev/null +++ b/res/values/customize.xml @@ -0,0 +1,37 @@ + + + + + 0 + + Smart World + Music + Google + diff --git a/res/xml/micromax_default_workspace.xml b/res/xml/micromax_default_workspace.xml new file mode 100644 index 000000000..21389b690 --- /dev/null +++ b/res/xml/micromax_default_workspace.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/xml/smartfren_default_workspace.xml b/res/xml/smartfren_default_workspace.xml new file mode 100644 index 000000000..21389b690 --- /dev/null +++ b/res/xml/smartfren_default_workspace.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/com/android/launcher3/DynamicGrid.java b/src/com/android/launcher3/DynamicGrid.java index 1bf9afb56..fe0897c8e 100644 --- a/src/com/android/launcher3/DynamicGrid.java +++ b/src/com/android/launcher3/DynamicGrid.java @@ -67,6 +67,10 @@ public class DynamicGrid { fourByFourDefaultLayout = R.xml.ct_default_workspace_4x4; } else if (LauncherApplication.LAUNCHER_BACKUP_SHORTCUT_ENABLED) { fourByFourDefaultLayout = R.xml.cm_with_backup_default_workspace; + } else if (LauncherApplication.LAUNCHER_MMX_SHORTCUT_ENABLED) { + fourByFourDefaultLayout = R.xml.micromax_default_workspace; + } else if (LauncherApplication.LAUNCHER_SFR_SHORTCUT_ENABLED) { + fourByFourDefaultLayout = R.xml.smartfren_default_workspace; } DEFAULT_ICON_SIZE_PX = pxFromDp(DEFAULT_ICON_SIZE_DP, dm); diff --git a/src/com/android/launcher3/LauncherApplication.java b/src/com/android/launcher3/LauncherApplication.java index 56ca3267f..689f54d1f 100644 --- a/src/com/android/launcher3/LauncherApplication.java +++ b/src/com/android/launcher3/LauncherApplication.java @@ -23,6 +23,8 @@ public class LauncherApplication extends Application { public static boolean LAUNCHER_SHORTCUT_ENABLED; public static boolean SHOW_CTAPP_FEATURE; public static boolean LAUNCHER_BACKUP_SHORTCUT_ENABLED; + public static boolean LAUNCHER_MMX_SHORTCUT_ENABLED; + public static boolean LAUNCHER_SFR_SHORTCUT_ENABLED; @Override public void onCreate() { @@ -34,6 +36,10 @@ public class LauncherApplication extends Application { SHOW_CTAPP_FEATURE = getResources().getBoolean(R.bool.config_launcher_page); LAUNCHER_BACKUP_SHORTCUT_ENABLED = getResources().getBoolean(R.bool.config_launcher_show_backup_shortcut); + LAUNCHER_MMX_SHORTCUT_ENABLED = + getResources().getBoolean(R.bool.config_micromax_enabled); + LAUNCHER_SFR_SHORTCUT_ENABLED = + getResources().getBoolean(R.bool.config_smartfren_enabled); LauncherAppState.setApplicationContext(this); LauncherAppState.getInstance(); } -- cgit v1.2.3