Improve support for default theme of WifiSetupActivity
Default theme can be either dark or light, depending on the app theme in the manifest. When processing extras, the default was always assumed to be dark. Change-Id: I4598ad25ffa69b63fa91cab8b07931ba37ba7676
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user