Loading src/com/android/settings/cyanogenmod/DisplayRotation.java +10 −3 Original line number Diff line number Diff line Loading @@ -74,9 +74,6 @@ public class DisplayRotation extends SettingsPreferenceFragment implements OnPre mAccelerometer = (CheckBoxPreference) findPreference(KEY_ACCELEROMETER); mAccelerometer.setPersistent(false); if (hasRotationLock) { mAccelerometer.setEnabled(false); } mRotation0Pref = (CheckBoxPreference) prefSet.findPreference(ROTATION_0_PREF); mRotation90Pref = (CheckBoxPreference) prefSet.findPreference(ROTATION_90_PREF); mRotation180Pref = (CheckBoxPreference) prefSet.findPreference(ROTATION_180_PREF); Loading @@ -101,6 +98,16 @@ public class DisplayRotation extends SettingsPreferenceFragment implements OnPre mSwapVolumeButtons.setChecked(swapVolumeKeys > 0); } } if (hasRotationLock) { // Disable accelerometer checkbox, but leave others enabled mAccelerometer.setEnabled(false); mSwapVolumeButtons.setDependency(null); mRotation0Pref.setDependency(null); mRotation90Pref.setDependency(null); mRotation180Pref.setDependency(null); mRotation270Pref.setDependency(null); } } @Override Loading Loading
src/com/android/settings/cyanogenmod/DisplayRotation.java +10 −3 Original line number Diff line number Diff line Loading @@ -74,9 +74,6 @@ public class DisplayRotation extends SettingsPreferenceFragment implements OnPre mAccelerometer = (CheckBoxPreference) findPreference(KEY_ACCELEROMETER); mAccelerometer.setPersistent(false); if (hasRotationLock) { mAccelerometer.setEnabled(false); } mRotation0Pref = (CheckBoxPreference) prefSet.findPreference(ROTATION_0_PREF); mRotation90Pref = (CheckBoxPreference) prefSet.findPreference(ROTATION_90_PREF); mRotation180Pref = (CheckBoxPreference) prefSet.findPreference(ROTATION_180_PREF); Loading @@ -101,6 +98,16 @@ public class DisplayRotation extends SettingsPreferenceFragment implements OnPre mSwapVolumeButtons.setChecked(swapVolumeKeys > 0); } } if (hasRotationLock) { // Disable accelerometer checkbox, but leave others enabled mAccelerometer.setEnabled(false); mSwapVolumeButtons.setDependency(null); mRotation0Pref.setDependency(null); mRotation90Pref.setDependency(null); mRotation180Pref.setDependency(null); mRotation270Pref.setDependency(null); } } @Override Loading