summaryrefslogtreecommitdiffstats
path: root/DeviceSettings
diff options
context:
space:
mode:
authorDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-08-08 15:35:09 +0200
committerAndrew Dodd <atd7@cornell.edu>2012-09-14 18:14:14 -0400
commit8e39988d1679484e0138ba695b81aedc1454e9c7 (patch)
tree4c58eed95c155d0e22a58b29ececd889afd5daca /DeviceSettings
parentaf9f9db850e6a4b97630d219f518083e58fbaa12 (diff)
downloaddevice_samsung_n7000-8e39988d1679484e0138ba695b81aedc1454e9c7.zip
device_samsung_n7000-8e39988d1679484e0138ba695b81aedc1454e9c7.tar.gz
device_samsung_n7000-8e39988d1679484e0138ba695b81aedc1454e9c7.tar.bz2
settings: moved touchkey settings into screen fragment
Diffstat (limited to 'DeviceSettings')
-rw-r--r--DeviceSettings/AndroidManifest.xml2
-rw-r--r--DeviceSettings/res/values-de/strings.xml2
-rw-r--r--DeviceSettings/res/values-es/strings.xml2
-rw-r--r--DeviceSettings/res/values-fi/strings.xml2
-rw-r--r--DeviceSettings/res/values-fr/strings.xml2
-rw-r--r--DeviceSettings/res/values-hu/strings.xml2
-rw-r--r--DeviceSettings/res/values-nl/strings.xml2
-rwxr-xr-xDeviceSettings/res/values-pt-rBR/strings.xml3
-rw-r--r--DeviceSettings/res/values/strings.xml15
-rw-r--r--DeviceSettings/res/xml/screen_preferences.xml (renamed from DeviceSettings/res/xml/mdnie_preferences.xml)19
-rw-r--r--DeviceSettings/res/xml/sensors_preferences.xml19
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java4
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/DockFragmentActivity.java2
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java2
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java2
-rwxr-xr-xDeviceSettings/src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java113
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java26
-rwxr-xr-xDeviceSettings/src/com/cyanogenmod/settings/device/mDNIeFragmentActivity.java57
18 files changed, 155 insertions, 121 deletions
diff --git a/DeviceSettings/AndroidManifest.xml b/DeviceSettings/AndroidManifest.xml
index d658983..f117bb2 100644
--- a/DeviceSettings/AndroidManifest.xml
+++ b/DeviceSettings/AndroidManifest.xml
@@ -23,7 +23,7 @@
</intent-filter>
</receiver>
- <activity android:name=".mDNIeFragmentActivity" />
+ <activity android:name=".ScreenFragmentActivity" />
<activity android:name=".RadioFragmentActivity" />
</application>
diff --git a/DeviceSettings/res/values-de/strings.xml b/DeviceSettings/res/values-de/strings.xml
index 4d0589e..54004a8 100644
--- a/DeviceSettings/res/values-de/strings.xml
+++ b/DeviceSettings/res/values-de/strings.xml
@@ -2,8 +2,8 @@
<resources>
<string name="app_name">Galaxy Note Einstellungen</string>
+ <string name="category_screen_title">Bildschirm</string>
<string name="screen_colors_title">Farben</string>
- <string name="category_mdnie_title">Bildschirm</string>
<string name="mdnie_scenario_title_head">Szenario</string>
<string name="mdnie_scenario_summary_head">Wähle das mDNIe Szenario</string>
<string name="mdnie_mode_title_head">Modus</string>
diff --git a/DeviceSettings/res/values-es/strings.xml b/DeviceSettings/res/values-es/strings.xml
index feb29e9..02bff90 100644
--- a/DeviceSettings/res/values-es/strings.xml
+++ b/DeviceSettings/res/values-es/strings.xml
@@ -6,7 +6,7 @@
<string name="hspa_title_head">HSPA</string>
<string name="hspa_summary_head">Activar HSDPA/HSUPA</string>
- <string name="category_mdnie_title">Pantalla</string>
+ <string name="category_screen_title">Pantalla</string>
<string name="screen_colors_title">Colores</string>
<string name="mdnie_scenario_title_head">Escenario</string>
<string name="mdnie_scenario_summary_head">Establecer el escenario mDNIe</string>
diff --git a/DeviceSettings/res/values-fi/strings.xml b/DeviceSettings/res/values-fi/strings.xml
index 081f0ef..85b397f 100644
--- a/DeviceSettings/res/values-fi/strings.xml
+++ b/DeviceSettings/res/values-fi/strings.xml
@@ -2,8 +2,8 @@
<resources>
<string name="app_name">Galaxy Note-asetukset</string>
+ <string name="category_screen_title">Näyttö</string>
<string name="screen_colors_title">Värit</string>
- <string name="category_mdnie_title">Näyttö</string>
<string name="mdnie_scenario_title_head">Skenaario</string>
<string name="mdnie_scenario_summary_head">Vaihda mDNIe-skenaario</string>
<string name="mdnie_mode_title_head">Tila</string>
diff --git a/DeviceSettings/res/values-fr/strings.xml b/DeviceSettings/res/values-fr/strings.xml
index ab81716..741356a 100644
--- a/DeviceSettings/res/values-fr/strings.xml
+++ b/DeviceSettings/res/values-fr/strings.xml
@@ -2,7 +2,7 @@
<resources>
<string name="app_name">Paramètres Galaxy Note</string>
- <string name="category_mdnie_title">Ecran</string>
+ <string name="category_screen_title">Ecran</string>
<string name="screen_colors_title">Couleurs</string>
<string name="mdnie_scenario_title_head">Scénario</string>
<string name="mdnie_scenario_summary_head">Définit le scénario mDNIe</string>
diff --git a/DeviceSettings/res/values-hu/strings.xml b/DeviceSettings/res/values-hu/strings.xml
index 6a24926..8df2fe5 100644
--- a/DeviceSettings/res/values-hu/strings.xml
+++ b/DeviceSettings/res/values-hu/strings.xml
@@ -2,8 +2,8 @@
<resources>
<string name="app_name">Galaxy Note Beállítások</string>
+ <string name="category_screen_title">Kijelző</string>
<string name="screen_colors_title">Színek</string>
- <string name="category_mdnie_title">Kijelző</string>
<string name="mdnie_scenario_title_head">Megjelenítés</string>
<string name="mdnie_scenario_summary_head">mDNIe megjelenítési beállítások</string>
<string name="mdnie_mode_title_head">Üzemmód</string>
diff --git a/DeviceSettings/res/values-nl/strings.xml b/DeviceSettings/res/values-nl/strings.xml
index 587b923..bb9372d 100644
--- a/DeviceSettings/res/values-nl/strings.xml
+++ b/DeviceSettings/res/values-nl/strings.xml
@@ -2,8 +2,8 @@
<resources>
<string name="app_name">Galaxy Note-instellingen</string>
+ <string name="category_screen_title">Scherm</string>
<string name="screen_colors_title">Kleuren</string>
- <string name="category_mdnie_title">Scherm</string>
<string name="mdnie_scenario_title_head">Scenario</string>
<string name="mdnie_scenario_summary_head">mDNIe-scenario instellen</string>
<string name="mdnie_mode_title_head">Modus</string>
diff --git a/DeviceSettings/res/values-pt-rBR/strings.xml b/DeviceSettings/res/values-pt-rBR/strings.xml
index dad0f2c..dd52ffd 100755
--- a/DeviceSettings/res/values-pt-rBR/strings.xml
+++ b/DeviceSettings/res/values-pt-rBR/strings.xml
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Config. Galaxy Note</string>
+
+ <string name="category_screen_title">Tela</string>
<string name="screen_colors_title">Cores</string>
- <string name="category_mdnie_title">Tela</string>
<string name="mdnie_scenario_title_head">Cenário</string>
<string name="mdnie_scenario_summary_head">Define o Cenário mDNIe</string>
<string name="mdnie_mode_title_head">Modo</string>
diff --git a/DeviceSettings/res/values/strings.xml b/DeviceSettings/res/values/strings.xml
index 43d1dbf..72b8e86 100644
--- a/DeviceSettings/res/values/strings.xml
+++ b/DeviceSettings/res/values/strings.xml
@@ -2,8 +2,8 @@
<resources>
<string name="app_name">Galaxy Note Settings</string>
+ <string name="category_screen_title">Screen</string>
<string name="screen_colors_title">Colors</string>
- <string name="category_mdnie_title">Screen</string>
<string name="mdnie_scenario_title_head">Scenario</string>
<string name="mdnie_scenario_summary_head">Set the mDNIe Scenario</string>
<string name="mdnie_mode_title_head">Mode</string>
@@ -18,18 +18,19 @@
<string name="touchscreen_subcat_title">Touchscreen</string>
<string name="touchscreen_sensitivity_title_head">Touch sensitivity</string>
<string name="touchscreen_sensitivity_summary_head">Set touch panel sensitivity</string>
-
+
+ <string name="touchkey_subcat_title">Touchkeys</string>
+ <string name="touchkey_light_title_head">Enable keys backlight</string>
+ <string name="touchkey_light_summary_head">Light up touchkeys when screen is on</string>
+ <string name="touchkey_timeout_title_head">Backlight timeout</string>
+ <string name="touchkey_timeout_summary_head">Delay after a keypress before backlight turns off</string>
+
<string name="category_sensors_title">Sensors</string>
<string name="gyro_subcat_title">Gyroscope</string>
<string name="use_gyro_calibration_title_head">Use calibration data</string>
<string name="use_gyro_calibration_summary_head">Use the gyroscope calibration values. Do a calibration after checking this!</string>
<string name="calibrate_gyro_title_head">Calibrate</string>
<string name="calibrate_gyro_summary_head">Put your phone on a flat surface, and press this to calibrate</string>
- <string name="touchkey_subcat_title">Touch key</string>
- <string name="touchkey_light_title_head">Enable keys backlight</string>
- <string name="touchkey_light_summary_head">Light up touch keys when screen is on</string>
- <string name="touchkey_timeout_title_head">Backlight timeout</string>
- <string name="touchkey_timeout_summary_head">Delay after a keypress before backlight turns off</string>
<string name="category_haptic_title">Haptic</string>
<string name="vibrator_subcat_title">Vibrator</string>
diff --git a/DeviceSettings/res/xml/mdnie_preferences.xml b/DeviceSettings/res/xml/screen_preferences.xml
index f433418..d053bbd 100644
--- a/DeviceSettings/res/xml/mdnie_preferences.xml
+++ b/DeviceSettings/res/xml/screen_preferences.xml
@@ -61,4 +61,23 @@
android:entryValues="@array/touchscreen_sensitivity_entries_values"
android:defaultValue="50" />
</PreferenceCategory>
+
+ <PreferenceCategory
+ android:title="@string/touchkey_subcat_title">
+ <!-- Touchkey backlight -->
+ <CheckBoxPreference
+ android:key="touchkey_light"
+ android:title="@string/touchkey_light_title_head"
+ android:summary="@string/touchkey_light_summary_head"
+ android:defaultValue="true"
+ />
+ <com.cyanogenmod.settings.device.TouchkeyTimeout
+ android:key="touchkey_timeout"
+ android:title="@string/touchkey_timeout_title_head"
+ android:summary="@string/touchkey_timeout_summary_head"
+ android:entries="@array/touchkey_timeout_entries"
+ android:entryValues="@array/touchkey_timeout_entries_values"
+ android:defaultValue="3"
+ />
+ </PreferenceCategory>
</PreferenceScreen>
diff --git a/DeviceSettings/res/xml/sensors_preferences.xml b/DeviceSettings/res/xml/sensors_preferences.xml
index 497587d..bdce970 100644
--- a/DeviceSettings/res/xml/sensors_preferences.xml
+++ b/DeviceSettings/res/xml/sensors_preferences.xml
@@ -16,24 +16,5 @@
android:summary="@string/calibrate_gyro_summary_head"
/>
</PreferenceCategory>
-
- <PreferenceCategory
- android:title="@string/touchkey_subcat_title">
- <!-- Touchkey backlight -->
- <CheckBoxPreference
- android:key="touchkey_light"
- android:title="@string/touchkey_light_title_head"
- android:summary="@string/touchkey_light_summary_head"
- android:defaultValue="true"
- />
- <com.cyanogenmod.settings.device.TouchkeyTimeout
- android:key="touchkey_timeout"
- android:title="@string/touchkey_timeout_title_head"
- android:summary="@string/touchkey_timeout_summary_head"
- android:entries="@array/touchkey_timeout_entries"
- android:entryValues="@array/touchkey_timeout_entries_values"
- android:defaultValue="3"
- />
- </PreferenceCategory>
</PreferenceScreen>
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java b/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
index e60cd0c..c7da5f2 100644
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
+++ b/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
@@ -68,8 +68,8 @@ public class DeviceSettings extends FragmentActivity {
mTabsAdapter = new TabsAdapter(this, mViewPager);
mTabsAdapter.addTab(bar.newTab().setText(R.string.category_radio_title),
RadioFragmentActivity.class, null);
- mTabsAdapter.addTab(bar.newTab().setText(R.string.category_mdnie_title),
- mDNIeFragmentActivity.class, null);
+ mTabsAdapter.addTab(bar.newTab().setText(R.string.category_screen_title),
+ ScreenFragmentActivity.class, null);
mTabsAdapter.addTab(bar.newTab().setText(R.string.category_sensors_title),
SensorsFragmentActivity.class, null);
mTabsAdapter.addTab(bar.newTab().setText(R.string.category_haptic_title),
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/DockFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/DockFragmentActivity.java
index 541d90b..4591825 100644
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/DockFragmentActivity.java
+++ b/DeviceSettings/src/com/cyanogenmod/settings/device/DockFragmentActivity.java
@@ -34,7 +34,7 @@ import com.cyanogenmod.settings.device.R;
public class DockFragmentActivity extends PreferenceFragment {
private static final String PREF_ENABLED = "1";
- private static final String TAG = "GalaxyS2Parts_General";
+ private static final String TAG = "GalaxyS2Settings_Dock";
@Override
public void onCreate(Bundle savedInstanceState) {
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java
index d67c234..dab640c 100644
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java
+++ b/DeviceSettings/src/com/cyanogenmod/settings/device/HapticFragmentActivity.java
@@ -33,7 +33,7 @@ import com.cyanogenmod.settings.device.R;
public class HapticFragmentActivity extends PreferenceFragment {
private static final String PREF_ENABLED = "1";
- private static final String TAG = "GalaxyNoteParts_General";
+ private static final String TAG = "GalaxyNoteSettings_Haptic";
@Override
public void onCreate(Bundle savedInstanceState) {
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java
index d909a57..c7e85be 100644
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java
+++ b/DeviceSettings/src/com/cyanogenmod/settings/device/RadioFragmentActivity.java
@@ -33,7 +33,7 @@ import com.cyanogenmod.settings.device.R;
public class RadioFragmentActivity extends PreferenceFragment {
private static final String PREF_ENABLED = "1";
- private static final String TAG = "GalaxyNoteParts_General";
+ private static final String TAG = "GalaxyNoteSettings_Radio";
@Override
public void onCreate(Bundle savedInstanceState) {
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java
new file mode 100755
index 0000000..1859f4c
--- /dev/null
+++ b/DeviceSettings/src/com/cyanogenmod/settings/device/ScreenFragmentActivity.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2012 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;
+
+public class ScreenFragmentActivity extends PreferenceFragment {
+
+ private static final String PREF_ENABLED = "1";
+ private static final String TAG = "GalaxyNoteSettings_Screen";
+
+ private static final String FILE_TOUCHKEY_DISABLE = "/sys/class/sec/sec_touchkey/force_disable";
+ private static final String FILE_TOUCHKEY_BRIGHTNESS = "/sys/class/sec/sec_touchkey/brightness";
+
+ private mDNIeScenario mmDNIeScenario;
+ private mDNIeMode mmDNIeMode;
+ private mDNIeNegative mmDNIeNegative;
+ private mDNIeOutdoor mmDNIeOutdoor;
+ private PanelGamma mPanelGamma;
+ private TouchscreenSensitivity mTouchscreenSensitivity;
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ addPreferencesFromResource(R.xml.screen_preferences);
+ PreferenceScreen prefSet = getPreferenceScreen();
+
+ mmDNIeScenario = (mDNIeScenario) findPreference(DeviceSettings.KEY_MDNIE_SCENARIO);
+ mmDNIeScenario.setEnabled(mDNIeScenario.isSupported());
+
+ mmDNIeMode = (mDNIeMode) findPreference(DeviceSettings.KEY_MDNIE_MODE);
+ mmDNIeMode.setEnabled(mDNIeMode.isSupported());
+
+ mmDNIeNegative = (mDNIeNegative) findPreference(DeviceSettings.KEY_MDNIE_NEGATIVE);
+ mmDNIeNegative.setEnabled(mDNIeNegative.isSupported());
+
+ mmDNIeOutdoor = (mDNIeOutdoor) findPreference(DeviceSettings.KEY_MDNIE_OUTDOOR);
+ mmDNIeOutdoor.setEnabled(mDNIeOutdoor.isSupported());
+
+ mPanelGamma = (PanelGamma) findPreference(DeviceSettings.KEY_PANEL_GAMMA);
+ mPanelGamma.setEnabled(mPanelGamma.isSupported());
+
+ mTouchscreenSensitivity = (TouchscreenSensitivity) findPreference(DeviceSettings.KEY_TOUCHSCREEN_SENSITIVITY);
+ mTouchscreenSensitivity.setEnabled(mTouchscreenSensitivity.isSupported());
+
+ if (((CheckBoxPreference)prefSet.findPreference(DeviceSettings.KEY_TOUCHKEY_LIGHT)).isChecked()) {
+ prefSet.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(true);
+ } else {
+ prefSet.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(false);
+ }
+ }
+
+ @Override
+ public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
+
+ String boxValue;
+ String key = preference.getKey();
+
+ Log.w(TAG, "key: " + key);
+
+ if (key.compareTo(DeviceSettings.KEY_TOUCHKEY_LIGHT) == 0) {
+ if (((CheckBoxPreference)preference).isChecked()) {
+ Utils.writeValue(FILE_TOUCHKEY_DISABLE, "0");
+ Utils.writeValue(FILE_TOUCHKEY_BRIGHTNESS, "1");
+ preferenceScreen.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(true);
+ } else {
+ Utils.writeValue(FILE_TOUCHKEY_DISABLE, "1");
+ Utils.writeValue(FILE_TOUCHKEY_BRIGHTNESS, "2");
+ preferenceScreen.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(false);
+ }
+ }
+
+ return true;
+ }
+
+ public static boolean isSupported(String FILE) {
+ return Utils.fileExists(FILE);
+ }
+
+ public static void restore(Context context) {
+ 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");
+ }
+
+}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java
index bbe5f08..0299450 100644
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java
+++ b/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java
@@ -33,26 +33,17 @@ import com.cyanogenmod.settings.device.R;
public class SensorsFragmentActivity extends PreferenceFragment {
private static final String PREF_ENABLED = "1";
- private static final String TAG = "GalaxyNoteParts_General";
+ private static final String TAG = "GalaxyNoteSettings_Sensors";
private static final String FILE_USE_GYRO_CALIB = "/sys/class/sec/gsensorcal/calibration";
- private static final String FILE_TOUCHKEY_DISABLE = "/sys/class/sec/sec_touchkey/force_disable";
- private static final String FILE_TOUCHKEY_BRIGHTNESS = "/sys/class/sec/sec_touchkey/brightness";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.sensors_preferences);
-
PreferenceScreen prefSet = getPreferenceScreen();
- if (((CheckBoxPreference)prefSet.findPreference(DeviceSettings.KEY_TOUCHKEY_LIGHT)).isChecked()) {
- prefSet.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(true);
- } else {
- prefSet.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(false);
- }
-
}
@Override
@@ -72,16 +63,6 @@ public class SensorsFragmentActivity extends PreferenceFragment {
Utils.writeValue(FILE_USE_GYRO_CALIB, "0");
Utils.writeValue(FILE_USE_GYRO_CALIB, "1");
Utils.showDialog((Context)getActivity(), "Calibration done", "The gyroscope has been successfully calibrated!");
- } else if (key.compareTo(DeviceSettings.KEY_TOUCHKEY_LIGHT) == 0) {
- if (((CheckBoxPreference)preference).isChecked()) {
- Utils.writeValue(FILE_TOUCHKEY_DISABLE, "0");
- Utils.writeValue(FILE_TOUCHKEY_BRIGHTNESS, "1");
- preferenceScreen.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(true);
- } else {
- Utils.writeValue(FILE_TOUCHKEY_DISABLE, "1");
- Utils.writeValue(FILE_TOUCHKEY_BRIGHTNESS, "2");
- preferenceScreen.findPreference(DeviceSettings.KEY_TOUCHKEY_TIMEOUT).setEnabled(false);
- }
}
return true;
@@ -100,10 +81,5 @@ public class SensorsFragmentActivity extends PreferenceFragment {
// So we only set it to "0" if user wants it, as it defaults to 1 at boot
if (!gyroCalib)
Utils.writeValue(FILE_USE_GYRO_CALIB, "0");
-
- 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");
}
}
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeFragmentActivity.java
deleted file mode 100755
index f14f666..0000000
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/mDNIeFragmentActivity.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (C) 2012 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.os.Bundle;
-import android.preference.PreferenceFragment;
-import com.cyanogenmod.settings.device.R;
-
-public class mDNIeFragmentActivity extends PreferenceFragment {
-
- private mDNIeScenario mmDNIeScenario;
- private mDNIeMode mmDNIeMode;
- private mDNIeNegative mmDNIeNegative;
- private mDNIeOutdoor mmDNIeOutdoor;
- private PanelGamma mPanelGamma;
- private TouchscreenSensitivity mTouchscreenSensitivity;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- addPreferencesFromResource(R.xml.mdnie_preferences);
-
- mmDNIeScenario = (mDNIeScenario) findPreference(DeviceSettings.KEY_MDNIE_SCENARIO);
- mmDNIeScenario.setEnabled(mDNIeScenario.isSupported());
-
- mmDNIeMode = (mDNIeMode) findPreference(DeviceSettings.KEY_MDNIE_MODE);
- mmDNIeMode.setEnabled(mDNIeMode.isSupported());
-
- mmDNIeNegative = (mDNIeNegative) findPreference(DeviceSettings.KEY_MDNIE_NEGATIVE);
- mmDNIeNegative.setEnabled(mDNIeNegative.isSupported());
-
- mmDNIeOutdoor = (mDNIeOutdoor) findPreference(DeviceSettings.KEY_MDNIE_OUTDOOR);
- mmDNIeOutdoor.setEnabled(mDNIeOutdoor.isSupported());
-
- mPanelGamma = (PanelGamma) findPreference(DeviceSettings.KEY_PANEL_GAMMA);
- mPanelGamma.setEnabled(mPanelGamma.isSupported());
-
- mTouchscreenSensitivity = (TouchscreenSensitivity) findPreference(DeviceSettings.KEY_TOUCHSCREEN_SENSITIVITY);
- mTouchscreenSensitivity.setEnabled(mTouchscreenSensitivity.isSupported());
- }
-
-}