diff options
author | Maurice Lam <yukl@google.com> | 2015-04-09 20:13:35 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-09 20:13:36 +0000 |
commit | 342d08537fe316f0d046a3a3097c294e4b30e912 (patch) | |
tree | bbde4618ed858b71fe2b4dc222f9492e08d2ef0f /src/com/android/settings | |
parent | 82210af70742ca8b6f3aa25f0f6801cb1d6c9aa8 (diff) | |
parent | 598be1eab6b6aa76033acb8534330731962e986a (diff) | |
download | packages_apps_Settings-342d08537fe316f0d046a3a3097c294e4b30e912.tar.gz packages_apps_Settings-342d08537fe316f0d046a3a3097c294e4b30e912.tar.bz2 packages_apps_Settings-342d08537fe316f0d046a3a3097c294e4b30e912.zip |
Merge "Add support for material_blue theme"
Diffstat (limited to 'src/com/android/settings')
7 files changed, 14 insertions, 15 deletions
diff --git a/src/com/android/settings/SetupChooseLockGeneric.java b/src/com/android/settings/SetupChooseLockGeneric.java index a631caf12..a69ae380f 100644 --- a/src/com/android/settings/SetupChooseLockGeneric.java +++ b/src/com/android/settings/SetupChooseLockGeneric.java @@ -52,7 +52,7 @@ public class SetupChooseLockGeneric extends ChooseLockGeneric @Override protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) { - resid = SetupWizardUtils.getTheme(getIntent(), resid); + resid = SetupWizardUtils.getTheme(getIntent()); super.onApplyThemeResource(theme, resid, first); } diff --git a/src/com/android/settings/SetupChooseLockPassword.java b/src/com/android/settings/SetupChooseLockPassword.java index b9f408e38..75a4b7674 100644 --- a/src/com/android/settings/SetupChooseLockPassword.java +++ b/src/com/android/settings/SetupChooseLockPassword.java @@ -63,7 +63,7 @@ public class SetupChooseLockPassword extends ChooseLockPassword @Override protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) { - resid = SetupWizardUtils.getTheme(getIntent(), resid); + resid = SetupWizardUtils.getTheme(getIntent()); super.onApplyThemeResource(theme, resid, first); } diff --git a/src/com/android/settings/SetupChooseLockPattern.java b/src/com/android/settings/SetupChooseLockPattern.java index 903a2076c..ed5b61a72 100644 --- a/src/com/android/settings/SetupChooseLockPattern.java +++ b/src/com/android/settings/SetupChooseLockPattern.java @@ -61,7 +61,7 @@ public class SetupChooseLockPattern extends ChooseLockPattern @Override protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) { - resid = SetupWizardUtils.getTheme(getIntent(), resid); + resid = SetupWizardUtils.getTheme(getIntent()); super.onApplyThemeResource(theme, resid, first); } diff --git a/src/com/android/settings/SetupEncryptionInterstitial.java b/src/com/android/settings/SetupEncryptionInterstitial.java index 41782dab3..09c3bfc3b 100644 --- a/src/com/android/settings/SetupEncryptionInterstitial.java +++ b/src/com/android/settings/SetupEncryptionInterstitial.java @@ -62,7 +62,7 @@ public class SetupEncryptionInterstitial extends EncryptionInterstitial @Override protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) { - resid = SetupWizardUtils.getTheme(getIntent(), resid); + resid = SetupWizardUtils.getTheme(getIntent()); super.onApplyThemeResource(theme, resid, first); } diff --git a/src/com/android/settings/SetupRedactionInterstitial.java b/src/com/android/settings/SetupRedactionInterstitial.java index badfe8dcd..410804e91 100644 --- a/src/com/android/settings/SetupRedactionInterstitial.java +++ b/src/com/android/settings/SetupRedactionInterstitial.java @@ -60,7 +60,7 @@ public class SetupRedactionInterstitial extends RedactionInterstitial @Override protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) { - resid = SetupWizardUtils.getTheme(getIntent(), resid); + resid = SetupWizardUtils.getTheme(getIntent()); super.onApplyThemeResource(theme, resid, first); } diff --git a/src/com/android/settings/SetupWizardUtils.java b/src/com/android/settings/SetupWizardUtils.java index c35bb15cb..e83482a9d 100644 --- a/src/com/android/settings/SetupWizardUtils.java +++ b/src/com/android/settings/SetupWizardUtils.java @@ -38,6 +38,8 @@ public class SetupWizardUtils { public static final String THEME_HOLO_LIGHT = "holo_light"; public static final String THEME_MATERIAL = "material"; public static final String THEME_MATERIAL_LIGHT = "material_light"; + public static final String THEME_MATERIAL_BLUE = "material_blue"; + public static final String THEME_MATERIAL_BLUE_LIGHT = "material_blue_light"; public static final String EXTRA_USE_IMMERSIVE_MODE = "useImmersiveMode"; @@ -68,17 +70,14 @@ public class SetupWizardUtils { activity.startActivityForResult(nextIntent, NEXT_REQUEST); } - public static int getTheme(Intent intent, int defaultResId) { + public static int getTheme(Intent intent) { final String themeName = intent.getStringExtra(EXTRA_THEME); - int resid = defaultResId; - if (THEME_HOLO_LIGHT.equalsIgnoreCase(themeName) || - THEME_MATERIAL_LIGHT.equalsIgnoreCase(themeName)) { - resid = R.style.SetupWizardTheme_Light; - } else if (THEME_HOLO.equalsIgnoreCase(themeName) || - THEME_MATERIAL.equalsIgnoreCase(themeName)) { - resid = R.style.SetupWizardTheme; + if (THEME_HOLO.equalsIgnoreCase(themeName) || THEME_MATERIAL.equalsIgnoreCase(themeName) + || THEME_MATERIAL_BLUE.equalsIgnoreCase(themeName)) { + return R.style.SetupWizardTheme; + } else { + return R.style.SetupWizardTheme_Light; } - return resid; } /** diff --git a/src/com/android/settings/wifi/WifiSetupActivity.java b/src/com/android/settings/wifi/WifiSetupActivity.java index a60945f5b..155fd936d 100644 --- a/src/com/android/settings/wifi/WifiSetupActivity.java +++ b/src/com/android/settings/wifi/WifiSetupActivity.java @@ -180,7 +180,7 @@ public class WifiSetupActivity extends WifiPickerActivity @Override protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) { - resid = SetupWizardUtils.getTheme(getIntent(), resid); + resid = SetupWizardUtils.getTheme(getIntent()); super.onApplyThemeResource(theme, resid, first); } |