Merge "Improve support for default theme of WifiSetupActivity"

This commit is contained in:
Russell Brenner
2014-03-19 15:57:43 +00:00
committed by Android (Google) Code Review

View File

@@ -32,9 +32,12 @@ public class WifiSetupActivity extends WifiPickerActivity implements ButtonBarHa
@Override
protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) {
String themeName = getIntent().getStringExtra(EXTRA_THEME);
if (themeName != null && themeName.equalsIgnoreCase(THEME_HOLO_LIGHT)) {
if (THEME_HOLO_LIGHT.equalsIgnoreCase(themeName)) {
resid = getResources().getIdentifier(RESOURCE_THEME_LIGHT, "style",
getPackageName());
} else if (THEME_HOLO.equalsIgnoreCase(themeName)) {
resid = getResources().getIdentifier(RESOURCE_THEME_DARK, "style",
getPackageName());
}
super.onApplyThemeResource(theme, resid, first);
}