summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/DisplaySettings.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/settings/DisplaySettings.java')
-rw-r--r--src/com/android/settings/DisplaySettings.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/settings/DisplaySettings.java b/src/com/android/settings/DisplaySettings.java
index fb839a716..6c3a990ef 100644
--- a/src/com/android/settings/DisplaySettings.java
+++ b/src/com/android/settings/DisplaySettings.java
@@ -95,9 +95,11 @@ public class DisplaySettings extends SettingsPreferenceFragment implements
mAccelerometer = (CheckBoxPreference) findPreference(KEY_ACCELEROMETER);
mAccelerometer.setPersistent(false);
- if (RotationPolicy.isRotationLockToggleSupported(getActivity())) {
+ if (!RotationPolicy.isRotationSupported(getActivity())
+ || RotationPolicy.isRotationLockToggleSupported(getActivity())) {
// If rotation lock is supported, then we do not provide this option in
- // Display settings. However, is still available in Accessibility settings.
+ // Display settings. However, is still available in Accessibility settings,
+ // if the device supports rotation.
getPreferenceScreen().removePreference(mAccelerometer);
}