summaryrefslogtreecommitdiffstats
path: root/DeviceSettings/src
diff options
context:
space:
mode:
authorDaniel Hillenbrand <daniel.hillenbrand@codeworkx.de>2012-08-09 17:01:18 +0200
committerAndrew Dodd <atd7@cornell.edu>2012-09-14 18:14:20 -0400
commite15db4821e00a70f74fe533995d34a6897f4ef64 (patch)
tree75552fc2c9966d72bb2015d1a5a3dfaeb8427e06 /DeviceSettings/src
parent0ded002ce1c3b47f109fc4731f22cebfb714ff3a (diff)
downloaddevice_samsung_n7000-e15db4821e00a70f74fe533995d34a6897f4ef64.zip
device_samsung_n7000-e15db4821e00a70f74fe533995d34a6897f4ef64.tar.gz
device_samsung_n7000-e15db4821e00a70f74fe533995d34a6897f4ef64.tar.bz2
settings: sensor and translation cleanup
Diffstat (limited to 'DeviceSettings/src')
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java4
-rw-r--r--DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java22
2 files changed, 13 insertions, 13 deletions
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java b/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
index c7da5f2..7f7970c 100644
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
+++ b/DeviceSettings/src/com/cyanogenmod/settings/device/DeviceSettings.java
@@ -41,8 +41,8 @@ public class DeviceSettings extends FragmentActivity {
public static final String KEY_MDNIE_OUTDOOR = "mdnie_outdoor";
public static final String KEY_PANEL_GAMMA = "panel_gamma";
public static final String KEY_HSPA = "hspa";
- public static final String KEY_USE_GYRO_CALIBRATION = "use_gyro_calibration";
- public static final String KEY_CALIBRATE_GYRO = "calibrate_gyro";
+ public static final String KEY_USE_ACCELEROMETER_CALIBRATION = "use_accelerometer_calibration";
+ public static final String KEY_CALIBRATE_ACCELEROMETER = "calibrate_accelerometer";
public static final String KEY_TOUCHSCREEN_SENSITIVITY = "touchscreen_sensitivity";
public static final String KEY_TOUCHKEY_LIGHT = "touchkey_light";
public static final String KEY_TOUCHKEY_TIMEOUT = "touchkey_timeout";
diff --git a/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java b/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java
index 0299450..60cc1ac 100644
--- a/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java
+++ b/DeviceSettings/src/com/cyanogenmod/settings/device/SensorsFragmentActivity.java
@@ -35,7 +35,7 @@ public class SensorsFragmentActivity extends PreferenceFragment {
private static final String PREF_ENABLED = "1";
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_USE_ACCELEROMETER_CALIB = "/sys/class/sec/gsensorcal/calibration";
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -54,15 +54,15 @@ public class SensorsFragmentActivity extends PreferenceFragment {
Log.w(TAG, "key: " + key);
- if (key.compareTo(DeviceSettings.KEY_USE_GYRO_CALIBRATION) == 0) {
+ if (key.compareTo(DeviceSettings.KEY_USE_ACCELEROMETER_CALIBRATION) == 0) {
boxValue = (((CheckBoxPreference)preference).isChecked() ? "1" : "0");
- Utils.writeValue(FILE_USE_GYRO_CALIB, boxValue);
- } else if (key.compareTo(DeviceSettings.KEY_CALIBRATE_GYRO) == 0) {
+ Utils.writeValue(FILE_USE_ACCELEROMETER_CALIB, boxValue);
+ } else if (key.compareTo(DeviceSettings.KEY_CALIBRATE_ACCELEROMETER) == 0) {
// when calibration data utilization is disablen and enabled back,
// calibration is done at the same time by driver
- 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!");
+ Utils.writeValue(FILE_USE_ACCELEROMETER_CALIB, "0");
+ Utils.writeValue(FILE_USE_ACCELEROMETER_CALIB, "1");
+ Utils.showDialog((Context)getActivity(), getString(R.string.accelerometer_dialog_head), getString(R.string.accelerometer_dialog_message));
}
return true;
@@ -74,12 +74,12 @@ public class SensorsFragmentActivity extends PreferenceFragment {
public static void restore(Context context) {
SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
- boolean gyroCalib = sharedPrefs.getBoolean(DeviceSettings.KEY_USE_GYRO_CALIBRATION, true);
+ boolean accelerometerCalib = sharedPrefs.getBoolean(DeviceSettings.KEY_USE_ACCELEROMETER_CALIBRATION, true);
- // When use gyro calibration value is set to 1, calibration is done at the same time, which
+ // When use accelerometer calibration value is set to 1, calibration is done at the same time, which
// means it is reset at each boot, providing wrong calibration most of the time at each reboot.
// 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");
+ if (!accelerometerCalib)
+ Utils.writeValue(FILE_USE_ACCELEROMETER_CALIB, "0");
}
}