From e499b32d70123cd116e90f9d44c92ff68bc3f4ac Mon Sep 17 00:00:00 2001 From: cretin45 Date: Fri, 20 Mar 2015 15:00:21 -0700 Subject: [PATCH] SetupWizard: Initialize the nav keys bundle boolean Change-Id: I50f2ef0fb7226c8b58437b669ca71df436d68ee8 --- .../setupwizard/setup/CyanogenSettingsPage.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java index 91b7954c..3c517f42 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenSettingsPage.java @@ -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); } }