SetupWizard: Update setting constants.

Change-Id: I6d6070b3bdeaf8caf55f8c7d5fa3a54ab2d088bc
This commit is contained in:
Adnan 2015-02-26 18:15:56 -08:00
parent 1a6841815e
commit da8333a352

View File

@ -95,26 +95,26 @@ public class CyanogenSettingsPage extends SetupPage {
final int defaultBrightness = context.getResources().getInteger(
com.android.internal.R.integer.config_buttonBrightnessSettingDefault);
Settings.System.putInt(context.getContentResolver(),
Settings.System.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0);
Settings.Secure.putInt(context.getContentResolver(),
Settings.Secure.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0);
KeyDisabler.setActive(enabled);
/* Save/restore button timeouts to disable them in softkey mode */
SharedPreferences.Editor editor = prefs.edit();
if (enabled) {
int currentBrightness = Settings.System.getInt(context.getContentResolver(),
Settings.System.BUTTON_BRIGHTNESS, defaultBrightness);
int currentBrightness = Settings.Secure.getInt(context.getContentResolver(),
Settings.Secure.BUTTON_BRIGHTNESS, defaultBrightness);
if (!prefs.contains("pre_navbar_button_backlight")) {
editor.putInt("pre_navbar_button_backlight", currentBrightness);
}
Settings.System.putInt(context.getContentResolver(),
Settings.System.BUTTON_BRIGHTNESS, 0);
Settings.Secure.putInt(context.getContentResolver(),
Settings.Secure.BUTTON_BRIGHTNESS, 0);
} else {
int oldBright = prefs.getInt("pre_navbar_button_backlight", -1);
if (oldBright != -1) {
Settings.System.putInt(context.getContentResolver(),
Settings.System.BUTTON_BRIGHTNESS, oldBright);
Settings.Secure.putInt(context.getContentResolver(),
Settings.Secure.BUTTON_BRIGHTNESS, oldBright);
editor.remove("pre_navbar_button_backlight");
}
}
@ -354,8 +354,8 @@ public class CyanogenSettingsPage extends SetupPage {
}
private void updateDisableNavkeysOption() {
boolean enabled = Settings.System.getInt(getActivity().getContentResolver(),
Settings.System.DEV_FORCE_SHOW_NAVBAR, 0) != 0;
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) :
enabled;