diff options
author | KalimochoAz <calimochoazucarado@gmail.com> | 2012-02-07 21:52:40 -0500 |
---|---|---|
committer | Robert Burns <burnsra@gmail.com> | 2012-02-09 21:32:48 -0500 |
commit | e66f2a6b6cb604cfa37cfdf6e387417df6f2a7b5 (patch) | |
tree | 75463b00e72906f07be2556910e252c9bb203a15 /CrespoParts/src/com/cyanogenmod/settings | |
parent | 981b14fd4afc0b9151bb5c781aa8b4d93ad95fb6 (diff) | |
download | device_samsung_crespo-e66f2a6b6cb604cfa37cfdf6e387417df6f2a7b5.zip device_samsung_crespo-e66f2a6b6cb604cfa37cfdf6e387417df6f2a7b5.tar.gz device_samsung_crespo-e66f2a6b6cb604cfa37cfdf6e387417df6f2a7b5.tar.bz2 |
Remove obsolete BLN preferences
Diffstat (limited to 'CrespoParts/src/com/cyanogenmod/settings')
6 files changed, 0 insertions, 139 deletions
diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java index 19e76e4..39c9595 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java @@ -43,8 +43,6 @@ public class DeviceSettings extends Activity { public static final String ACTION_UPDATE_PREFERENCES = "com.cyanogenmod.settings.device.UPDATE"; public static final String KEY_COLOR_TUNING = "color_tuning"; public static final String KEY_GAMMA_TUNING = "gamma_tuning"; - public static final String KEY_BACKLIGHT_TIMEOUT = "backlight_timeout"; - public static final String KEY_BLINK_TIMEOUT = "blink_timeout"; public static final String KEY_DEEPIDLE = "deepidle"; public static final String KEY_NOTIFICATION = "touchkey_notification"; public static final String KEY_CATEGORY_RADIO = "category_radio"; diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java b/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java index 007eb2a..f101de1 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java @@ -39,8 +39,6 @@ public class GeneralFragmentActivity extends PreferenceFragment { private CheckBoxPreference mDeepIdle; private CheckBoxPreference mNotification; - private ListPreference mBacklightTimeout; - private ListPreference mBlinkTimeout; @Override public void onCreate(Bundle savedInstanceState) { @@ -64,14 +62,6 @@ public class GeneralFragmentActivity extends PreferenceFragment { mNotification.setEnabled(false); } - mBacklightTimeout = (ListPreference) findPreference(DeviceSettings.KEY_BACKLIGHT_TIMEOUT); - mBacklightTimeout.setEnabled(TouchKeyBacklightTimeout.isSupported()); - mBacklightTimeout.setOnPreferenceChangeListener(new TouchKeyBacklightTimeout()); - - mBlinkTimeout = (ListPreference) findPreference(DeviceSettings.KEY_BLINK_TIMEOUT); - mBlinkTimeout.setEnabled(TouchKeyBlinkTimeout.isSupported()); - mBlinkTimeout.setOnPreferenceChangeListener(new TouchKeyBlinkTimeout()); - } @Override @@ -81,7 +71,6 @@ public class GeneralFragmentActivity extends PreferenceFragment { String key = preference.getKey(); Log.w(TAG, "key: " + key); - if (key.equals(DeviceSettings.KEY_DEEPIDLE)) { final CheckBoxPreference chkPref = (CheckBoxPreference) preference; boxValue = chkPref.isChecked() ? "1" : "0"; diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java b/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java index 9019d65..0728953 100644 --- a/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java +++ b/CrespoParts/src/com/cyanogenmod/settings/device/Startup.java @@ -11,7 +11,6 @@ public class Startup extends BroadcastReceiver { GeneralFragmentActivity.restore(context); ColorTuningPreference.restore(context); GammaTuningPreference.restore(context); - TouchKeyBacklightTimeout.restore(context); if (Hspa.isSupported()) { Hspa.restore(context); } diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/TouchFragmentActivity.java b/CrespoParts/src/com/cyanogenmod/settings/device/TouchFragmentActivity.java deleted file mode 100755 index 928e2de..0000000 --- a/CrespoParts/src/com/cyanogenmod/settings/device/TouchFragmentActivity.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2011 The CyanogenMod Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.cyanogenmod.settings.device; - -import android.content.Context; -import android.content.SharedPreferences; -import android.os.Bundle; -import android.preference.CheckBoxPreference; -import android.preference.ListPreference; -import android.preference.Preference; -import android.preference.PreferenceActivity; -import android.preference.PreferenceFragment; -import android.preference.PreferenceManager; -import android.preference.PreferenceScreen; -import android.util.Log; - -import com.cyanogenmod.settings.device.R; - -public class TouchFragmentActivity extends PreferenceFragment { - - private ListPreference mBacklightTimeout; - private ListPreference mBlinkTimeout; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - addPreferencesFromResource(R.xml.touch_preferences); - - mBacklightTimeout = (ListPreference) findPreference(DeviceSettings.KEY_BACKLIGHT_TIMEOUT); - mBacklightTimeout.setEnabled(TouchKeyBacklightTimeout.isSupported()); - mBacklightTimeout.setOnPreferenceChangeListener(new TouchKeyBacklightTimeout()); - - mBlinkTimeout = (ListPreference) findPreference(DeviceSettings.KEY_BLINK_TIMEOUT); - mBlinkTimeout.setEnabled(TouchKeyBacklightTimeout.isSupported()); - mBlinkTimeout.setOnPreferenceChangeListener(new TouchKeyBlinkTimeout()); - } - -} diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBacklightTimeout.java b/CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBacklightTimeout.java deleted file mode 100644 index e1f06c7..0000000 --- a/CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBacklightTimeout.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.cyanogenmod.settings.device; - -import android.content.Context; -import android.content.SharedPreferences; -import android.preference.Preference; -import android.preference.Preference.OnPreferenceChangeListener; -import android.preference.PreferenceManager; - -public class TouchKeyBacklightTimeout implements OnPreferenceChangeListener { - - private static final String FILE = "/sys/class/misc/notification/bl_timeout"; - - public static boolean isSupported() { - return Utils.fileExists(FILE); - } - - /** - * Restore backlight timeout setting from SharedPreferences. (Write to kernel.) - * @param context The context to read the SharedPreferences from - */ - public static void restore(Context context) { - if (!isSupported()) { - return; - } - - SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); - Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_BACKLIGHT_TIMEOUT, "5")); - } - - @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - Utils.writeValue(FILE, (String) newValue); - return true; - } - -}
\ No newline at end of file diff --git a/CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBlinkTimeout.java b/CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBlinkTimeout.java deleted file mode 100644 index ae75af9..0000000 --- a/CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBlinkTimeout.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.cyanogenmod.settings.device; - -import android.content.Context; -import android.content.SharedPreferences; -import android.preference.Preference; -import android.preference.Preference.OnPreferenceChangeListener; -import android.preference.PreferenceManager; - -public class TouchKeyBlinkTimeout implements OnPreferenceChangeListener { - - private static final String FILE = "/sys/class/misc/notification/blinktimeout"; - - public static boolean isSupported() { - return Utils.fileExists(FILE); - } - - /** - * Restore backlight timeout setting from SharedPreferences. (Write to kernel.) - * @param context The context to read the SharedPreferences from - */ - public static void restore(Context context) { - if (!isSupported()) { - return; - } - - SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); - Utils.writeValue(FILE, sharedPrefs.getString(DeviceSettings.KEY_BLINK_TIMEOUT, "5")); - } - - @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - Utils.writeValue(FILE, (String) newValue); - return true; - } - -}
\ No newline at end of file |