Add support for material_blue theme

Add support for material_blue theme, which setup wizard is going to
use for M. This changes SetupWizardUtils.getTheme to always return
either SetupWizardTheme or SetupWizardTheme_Light, and added the
theme value "material" blue.

Bug: 19729981
Change-Id: I63678312af4942be358b92a58b1c84f89aaaa6c1
diff --git a/src/com/android/settings/SetupChooseLockGeneric.java b/src/com/android/settings/SetupChooseLockGeneric.java
index a631caf..a69ae38 100644
--- a/src/com/android/settings/SetupChooseLockGeneric.java
+++ b/src/com/android/settings/SetupChooseLockGeneric.java
@@ -52,7 +52,7 @@
 
     @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 b9f408e..75a4b76 100644
--- a/src/com/android/settings/SetupChooseLockPassword.java
+++ b/src/com/android/settings/SetupChooseLockPassword.java
@@ -63,7 +63,7 @@
 
     @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 903a207..ed5b61a 100644
--- a/src/com/android/settings/SetupChooseLockPattern.java
+++ b/src/com/android/settings/SetupChooseLockPattern.java
@@ -61,7 +61,7 @@
 
     @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 41782da..09c3bfc 100644
--- a/src/com/android/settings/SetupEncryptionInterstitial.java
+++ b/src/com/android/settings/SetupEncryptionInterstitial.java
@@ -62,7 +62,7 @@
 
     @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 badfe8d..410804e 100644
--- a/src/com/android/settings/SetupRedactionInterstitial.java
+++ b/src/com/android/settings/SetupRedactionInterstitial.java
@@ -60,7 +60,7 @@
 
     @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 c35bb15..e83482a 100644
--- a/src/com/android/settings/SetupWizardUtils.java
+++ b/src/com/android/settings/SetupWizardUtils.java
@@ -38,6 +38,8 @@
     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 @@
         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 a60945f..155fd93 100644
--- a/src/com/android/settings/wifi/WifiSetupActivity.java
+++ b/src/com/android/settings/wifi/WifiSetupActivity.java
@@ -180,7 +180,7 @@
 
     @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);
     }