summaryrefslogtreecommitdiffstats
path: root/CrespoParts
diff options
context:
space:
mode:
authorKalimochoAz <calimochoazucarado@gmail.com>2012-02-07 21:52:40 -0500
committerRobert Burns <burnsra@gmail.com>2012-02-09 21:32:48 -0500
commite66f2a6b6cb604cfa37cfdf6e387417df6f2a7b5 (patch)
tree75463b00e72906f07be2556910e252c9bb203a15 /CrespoParts
parent981b14fd4afc0b9151bb5c781aa8b4d93ad95fb6 (diff)
downloaddevice_samsung_crespo-e66f2a6b6cb604cfa37cfdf6e387417df6f2a7b5.zip
device_samsung_crespo-e66f2a6b6cb604cfa37cfdf6e387417df6f2a7b5.tar.gz
device_samsung_crespo-e66f2a6b6cb604cfa37cfdf6e387417df6f2a7b5.tar.bz2
Remove obsolete BLN preferences
Diffstat (limited to 'CrespoParts')
-rw-r--r--CrespoParts/res/values/strings.xml4
-rw-r--r--CrespoParts/res/xml/general_preferences.xml16
-rwxr-xr-xCrespoParts/res/xml/touch_preferences.xml21
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/DeviceSettings.java2
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/GeneralFragmentActivity.java11
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/Startup.java1
-rwxr-xr-xCrespoParts/src/com/cyanogenmod/settings/device/TouchFragmentActivity.java53
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBacklightTimeout.java36
-rw-r--r--CrespoParts/src/com/cyanogenmod/settings/device/TouchKeyBlinkTimeout.java36
9 files changed, 0 insertions, 180 deletions
diff --git a/CrespoParts/res/values/strings.xml b/CrespoParts/res/values/strings.xml
index 74793bc..42f2dbc 100644
--- a/CrespoParts/res/values/strings.xml
+++ b/CrespoParts/res/values/strings.xml
@@ -22,10 +22,6 @@
<string name="category_touchkey_title">Touch Keys</string>
<string name="touchkey_notification_title_head">Backlight Notifications</string>
<string name="touchkey_notification_summary_head">The touch key backlights will turn on when there is a notification.</string>
- <string name="backlight_timeout_title_head">Backlight Timeout</string>
- <string name="backlight_timeout_summary_head">Adjust the delay before the touch key backlight automatically turns off</string>
- <string name="blink_timeout_title_head">Blink Timeout</string>
- <string name="blink_timeout_summary_head">Adjust the delay before the touch key blink backlight automatically turns off after a notification</string>
<string name="category_radio_title">Radio</string>
<string name="hspa_title_head">HSPA</string>
diff --git a/CrespoParts/res/xml/general_preferences.xml b/CrespoParts/res/xml/general_preferences.xml
index 173d7eb..82c8956 100644
--- a/CrespoParts/res/xml/general_preferences.xml
+++ b/CrespoParts/res/xml/general_preferences.xml
@@ -16,22 +16,6 @@
<CheckBoxPreference android:key="touchkey_notification"
android:title="@string/touchkey_notification_title_head"
android:summary="@string/touchkey_notification_summary_head" />
- <ListPreference
- android:key="backlight_timeout"
- android:title="@string/backlight_timeout_title_head"
- android:summary="@string/backlight_timeout_summary_head"
- android:entries="@array/backlight_timeout_entries"
- android:entryValues="@array/backlight_timeout_entries_values"
- android:defaultValue="5"
- android:dependency="touchkey_notification" />
- <ListPreference
- android:key="blink_timeout"
- android:title="@string/blink_timeout_title_head"
- android:summary="@string/blink_timeout_summary_head"
- android:entries="@array/blink_timeout_entries"
- android:entryValues="@array/blink_timeout_entries_values"
- android:defaultValue="5"
- android:dependency="touchkey_notification" />
</PreferenceCategory>
</PreferenceScreen>
diff --git a/CrespoParts/res/xml/touch_preferences.xml b/CrespoParts/res/xml/touch_preferences.xml
deleted file mode 100755
index 21f2e16..0000000
--- a/CrespoParts/res/xml/touch_preferences.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
- android:title="@string/app_name">
-
- <!-- Touch key backlight timeout -->
- <ListPreference
- android:key="backlight_timeout"
- android:title="@string/backlight_timeout_title_head"
- android:summary="@string/backlight_timeout_summary_head"
- android:entries="@array/backlight_timeout_entries"
- android:entryValues="@array/backlight_timeout_entries_values"
- android:defaultValue="5" />
- <ListPreference
- android:key="blink_timeout"
- android:title="@string/blink_timeout_title_head"
- android:summary="@string/blink_timeout_summary_head"
- android:entries="@array/blink_timeout_entries"
- android:entryValues="@array/blink_timeout_entries_values"
- android:defaultValue="5" />
-
-</PreferenceScreen>
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