diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-06-04 15:37:57 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-06-05 17:45:07 -0700 |
commit | 56c58d5aef8186a0114be206a2f81216f8c19cf3 (patch) | |
tree | 682d17fc5d202db3c04b1043bb61a6a5808f51c9 | |
parent | 98894ed4106222b79c7ca67d5b3995878e8ae98d (diff) | |
download | packages_apps_settings-56c58d5aef8186a0114be206a2f81216f8c19cf3.zip packages_apps_settings-56c58d5aef8186a0114be206a2f81216f8c19cf3.tar.gz packages_apps_settings-56c58d5aef8186a0114be206a2f81216f8c19cf3.tar.bz2 |
Revert "Rename and flip meaning of auto-rotate to rotation lock."
Bug: 6523269
This reverts commit b94417109279fb7d27f0b27c97e76860ed6446ba.
-rw-r--r-- | res/values/strings.xml | 4 | ||||
-rw-r--r-- | src/com/android/settings/DisplaySettings.java | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index b5fb6c0..c4d0ee4 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1663,8 +1663,8 @@ <!-- Display settings --><skip/> <!-- Sound & display settings screen, section header for settings related to display --> <string name="display_settings">Display</string> - <!-- Sound & display settings screen, accelerometer-based rotation lock check box label [CHAR LIMIT=30] --> - <string name="accelerometer_title">Rotation lock</string> + <!-- Sound & display settings screen, accelerometer-based rotation check box label --> + <string name="accelerometer_title">Auto-rotate screen</string> <!-- Sound & display settings screen, accelerometer-based rotation summary text when check box is selected --> <string name="accelerometer_summary_on" product="tablet">Switch orientation automatically when rotating tablet</string> <!-- Sound & display settings screen, accelerometer-based rotation summary text when check box is selected --> diff --git a/src/com/android/settings/DisplaySettings.java b/src/com/android/settings/DisplaySettings.java index bad7340..e8bd11d 100644 --- a/src/com/android/settings/DisplaySettings.java +++ b/src/com/android/settings/DisplaySettings.java @@ -55,7 +55,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements private static final String KEY_NOTIFICATION_PULSE = "notification_pulse"; private static final String KEY_SCREEN_SAVER = "screensaver"; - private CheckBoxPreference mRotationLock; + private CheckBoxPreference mAccelerometer; private ListPreference mFontSizePref; private CheckBoxPreference mNotificationPulse; @@ -67,7 +67,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements private ContentObserver mAccelerometerRotationObserver = new ContentObserver(new Handler()) { @Override public void onChange(boolean selfChange) { - updateRotationLockCheckbox(); + updateAccelerometerRotationCheckbox(); } }; @@ -78,8 +78,8 @@ public class DisplaySettings extends SettingsPreferenceFragment implements addPreferencesFromResource(R.xml.display_settings); - mRotationLock = (CheckBoxPreference) findPreference(KEY_ACCELEROMETER); - mRotationLock.setPersistent(false); + mAccelerometer = (CheckBoxPreference) findPreference(KEY_ACCELEROMETER); + mAccelerometer.setPersistent(false); mScreenSaverPreference = findPreference(KEY_SCREEN_SAVER); if (mScreenSaverPreference != null @@ -222,7 +222,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements } private void updateState() { - updateRotationLockCheckbox(); + updateAccelerometerRotationCheckbox(); readFontSizePreference(mFontSizePref); updateScreenSaverSummary(); } @@ -234,11 +234,11 @@ public class DisplaySettings extends SettingsPreferenceFragment implements : R.string.screensaver_settings_summary_off); } - private void updateRotationLockCheckbox() { + private void updateAccelerometerRotationCheckbox() { if (getActivity() == null) return; - mRotationLock.setChecked(Settings.System.getInt( + mAccelerometer.setChecked(Settings.System.getInt( getContentResolver(), - Settings.System.ACCELEROMETER_ROTATION, 0) == 0); + Settings.System.ACCELEROMETER_ROTATION, 0) != 0); } public void writeFontSizePreference(Object objValue) { @@ -252,11 +252,11 @@ public class DisplaySettings extends SettingsPreferenceFragment implements @Override public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { - if (preference == mRotationLock) { + if (preference == mAccelerometer) { try { IWindowManager wm = IWindowManager.Stub.asInterface( ServiceManager.getService(Context.WINDOW_SERVICE)); - if (!mRotationLock.isChecked()) { + if (mAccelerometer.isChecked()) { wm.thawRotation(); } else { wm.freezeRotation(-1); |