SetupWizard: Initialize the nav keys bundle boolean

Change-Id: I50f2ef0fb7226c8b58437b669ca71df436d68ee8
This commit is contained in:
cretin45
2015-03-20 15:00:21 -07:00
parent bdfe88d06b
commit e499b32d70

View File

@@ -207,7 +207,7 @@ public class CyanogenSettingsPage extends SetupPage {
SetupWizardUtils.isSimMissing(context));
}
protected static boolean hideThemeSwitch(Context context) {
private static boolean hideThemeSwitch(Context context) {
return ThemeUtils.getDefaultThemePackageName(context).equals(ThemeConfig.SYSTEM_DEFAULT);
}
@@ -399,12 +399,14 @@ public class CyanogenSettingsPage extends SetupPage {
private void updateDisableNavkeysOption() {
if (!mHideNavKeysRow) {
final Bundle myPageBundle = mPage.getData();
boolean enabled = Settings.Secure.getInt(getActivity().getContentResolver(),
Settings.Secure.DEV_FORCE_SHOW_NAVBAR, 0) != 0;
boolean checked = mPage.getData().containsKey(KEY_ENABLE_NAV_KEYS) ?
mPage.getData().getBoolean(KEY_ENABLE_NAV_KEYS) :
boolean checked = myPageBundle.containsKey(KEY_ENABLE_NAV_KEYS) ?
myPageBundle.getBoolean(KEY_ENABLE_NAV_KEYS) :
enabled;
mNavKeys.setChecked(checked);
myPageBundle.putBoolean(KEY_ENABLE_NAV_KEYS, checked);
}
}