summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-08-08 15:35:09 +0200
committerDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-08-08 15:35:09 +0200
commitfe23e1261ac4f7e602515c1523150068167825ca (patch)
tree949d8e83f822bfade12143db7b0448f775cf7f7d
parentb95b0b657d049c6412ffbcabdc46f761b0ef5231 (diff)
downloaddevice_samsung_i9100-fe23e1261ac4f7e602515c1523150068167825ca.zip
device_samsung_i9100-fe23e1261ac4f7e602515c1523150068167825ca.tar.gz
device_samsung_i9100-fe23e1261ac4f7e602515c1523150068167825ca.tar.bz2
settings: moved touchkey settings into screen fragment
-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.xml5
-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.java27
-rwxr-xr-xDeviceSettings/src/com/cyanogenmod/settings/device/mDNIeFragmentActivity.java57
18 files changed, 156 insertions, 123 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 1528f8e..38d0f9b 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 S II 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 44d2a69..9090838 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 88e234a..f09f214 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 S II-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 25dd5ad..6cb7695 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 S II</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 d6a5f8c..4f34a25 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 S II 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 bd7e50b..86be405 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 S II-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 fad81b2..0cff7e6 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 S II</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>
@@ -32,4 +33,4 @@
<string name="vibrator_subcat_title">Vibração</string>
<string name="vibrator_intensity_title_head">Intensidade da Vibração</string>
<string name="vibrator_intensity_summary_head">Define a intensidade da vibração</string>
-</resources> \ No newline at end of file
+</resources>
diff --git a/DeviceSettings/res/values/strings.xml b/DeviceSettings/res/values/strings.xml
index d7ad034..91f1b53 100644
--- a/DeviceSettings/res/values/strings.xml
+++ b/DeviceSettings/res/values/strings.xml
@@ -2,8 +2,8 @@
<resources>
<string name="app_name">Galaxy S II 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 cd307cf..2ea7147 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 = "GalaxyS2Parts_General";
+ private static final String TAG = "GalaxyS2Settings_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 4d830b8..794732d 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 = "GalaxyS2Parts_General";
+ private static final String TAG = "GalaxyS2Settings_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..d6f3904
--- /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 = "GalaxyS2Settings_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 eaed40e..e9730b8 100644
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java
+++ b/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java
@@ -33,26 +33,16 @@ import com.cyanogenmod.settings.device.R;
public class SensorsFragmentActivity extends PreferenceFragment {
private static final String PREF_ENABLED = "1";
- private static final String TAG = "GalaxyS2Parts_General";
+ private static final String TAG = "GalaxyS2Settings_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 +62,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 +80,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());
- }
-
-}