From cee5c67897bdb39ebd366fb931b038f239b9ef12 Mon Sep 17 00:00:00 2001 From: Daniel Hillenbrand Date: Sun, 12 Aug 2012 10:19:11 +0200 Subject: settings: fix restoring of touchkey values --- .../src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java index d6f3904..fe9f601 100755 --- a/DeviceSettings/src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java +++ b/DeviceSettings/src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java @@ -27,6 +27,7 @@ import android.preference.PreferenceFragment; import android.preference.PreferenceManager; import android.preference.PreferenceScreen; import android.util.Log; +import com.cyanogenmod.settings.device.R; public class ScreenFragmentActivity extends PreferenceFragment { @@ -78,7 +79,6 @@ public class ScreenFragmentActivity extends PreferenceFragment { @Override public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { - String boxValue; String key = preference.getKey(); Log.w(TAG, "key: " + key); @@ -106,8 +106,7 @@ public class ScreenFragmentActivity extends PreferenceFragment { SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); boolean light = sharedPrefs.getBoolean(DeviceSettings.KEY_TOUCHKEY_LIGHT, true); - Utils.writeValue(FILE_TOUCHKEY_BRIGHTNESS, light ? "1" : "0"); Utils.writeValue(FILE_TOUCHKEY_DISABLE, light ? "0" : "1"); + Utils.writeValue(FILE_TOUCHKEY_BRIGHTNESS, light ? "1" : "2"); } - } -- cgit v1.1