summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNir Bruderman <nbruderman@gmail.com>2015-04-25 19:48:20 +0000
committerAdnan Begovic <adnan@cyngn.com>2015-10-29 17:36:31 -0700
commitc73ae5388019fd92d0e6bb4c2473772ca8d930b8 (patch)
treecc8aad13536b6285ce2b5e2a80714d2fb6c1ee02
parent9372ee651f28d0a207fa0bb9fce713f0f59b8925 (diff)
downloadpackages_apps_Settings-c73ae5388019fd92d0e6bb4c2473772ca8d930b8.zip
packages_apps_Settings-c73ae5388019fd92d0e6bb4c2473772ca8d930b8.tar.gz
packages_apps_Settings-c73ae5388019fd92d0e6bb4c2473772ca8d930b8.tar.bz2
Revert "Settings: use correct default value for backlight brightness"
This causes to lose the ability to turn off the backlight brightness at all! On every boot the values resets back to default now. This reverts commit a3a044f17d6a11508507e5ed083dac157dd3bd6d. Change-Id: I55c0e31a9e2182896bccae5206679d99ea9a15f9
-rw-r--r--src/com/android/settings/ButtonSettings.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/com/android/settings/ButtonSettings.java b/src/com/android/settings/ButtonSettings.java
index 255c883..d200679 100644
--- a/src/com/android/settings/ButtonSettings.java
+++ b/src/com/android/settings/ButtonSettings.java
@@ -598,10 +598,12 @@ public class ButtonSettings extends SettingsPreferenceFragment implements
Settings.Secure.putInt(context.getContentResolver(),
Settings.Secure.BUTTON_BRIGHTNESS, 0);
} else {
- int oldBright = prefs.getInt("pre_navbar_button_backlight", defaultBrightness);
- Settings.Secure.putInt(context.getContentResolver(),
- Settings.Secure.BUTTON_BRIGHTNESS, oldBright);
- editor.remove("pre_navbar_button_backlight");
+ int oldBright = prefs.getInt("pre_navbar_button_backlight", -1);
+ if (oldBright != -1) {
+ Settings.Secure.putInt(context.getContentResolver(),
+ Settings.Secure.BUTTON_BRIGHTNESS, oldBright);
+ editor.remove("pre_navbar_button_backlight");
+ }
}
editor.commit();
}