diff options
author | Amith Yamasani <yamasani@google.com> | 2012-05-15 16:15:40 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2012-05-15 16:15:40 -0700 |
commit | b94417109279fb7d27f0b27c97e76860ed6446ba (patch) | |
tree | 064ef4469f5dd06d0c930ff75bbbba46959c482f | |
parent | 9ca54ef68897b96111514981e1a4dc7a603da00d (diff) | |
download | packages_apps_settings-b94417109279fb7d27f0b27c97e76860ed6446ba.zip packages_apps_settings-b94417109279fb7d27f0b27c97e76860ed6446ba.tar.gz packages_apps_settings-b94417109279fb7d27f0b27c97e76860ed6446ba.tar.bz2 |
Rename and flip meaning of auto-rotate to rotation lock.
Bug: 6485348
Change-Id: I17359db3156641a69f6841d4e0c48708b5fafe4e
-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 d881af3..0890376 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1635,8 +1635,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 check box label --> - <string name="accelerometer_title">Auto-rotate screen</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 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 df80f85..198babc 100644 --- a/src/com/android/settings/DisplaySettings.java +++ b/src/com/android/settings/DisplaySettings.java @@ -56,7 +56,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 mAccelerometer; + private CheckBoxPreference mRotationLock; private ListPreference mFontSizePref; private CheckBoxPreference mNotificationPulse; @@ -68,7 +68,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements private ContentObserver mAccelerometerRotationObserver = new ContentObserver(new Handler()) { @Override public void onChange(boolean selfChange) { - updateAccelerometerRotationCheckbox(); + updateRotationLockCheckbox(); } }; @@ -79,8 +79,8 @@ public class DisplaySettings extends SettingsPreferenceFragment implements addPreferencesFromResource(R.xml.display_settings); - mAccelerometer = (CheckBoxPreference) findPreference(KEY_ACCELEROMETER); - mAccelerometer.setPersistent(false); + mRotationLock = (CheckBoxPreference) findPreference(KEY_ACCELEROMETER); + mRotationLock.setPersistent(false); mScreenSaverPreference = findPreference(KEY_SCREEN_SAVER); if (mScreenSaverPreference != null @@ -223,7 +223,7 @@ public class DisplaySettings extends SettingsPreferenceFragment implements } private void updateState() { - updateAccelerometerRotationCheckbox(); + updateRotationLockCheckbox(); readFontSizePreference(mFontSizePref); updateScreenSaverSummary(); } @@ -235,11 +235,11 @@ public class DisplaySettings extends SettingsPreferenceFragment implements : R.string.screensaver_settings_summary_off); } - private void updateAccelerometerRotationCheckbox() { + private void updateRotationLockCheckbox() { if (getActivity() == null) return; - mAccelerometer.setChecked(Settings.System.getInt( + mRotationLock.setChecked(Settings.System.getInt( getContentResolver(), - Settings.System.ACCELEROMETER_ROTATION, 0) != 0); + Settings.System.ACCELEROMETER_ROTATION, 0) == 0); } public void writeFontSizePreference(Object objValue) { @@ -253,11 +253,11 @@ public class DisplaySettings extends SettingsPreferenceFragment implements @Override public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) { - if (preference == mAccelerometer) { + if (preference == mRotationLock) { try { IWindowManager wm = IWindowManager.Stub.asInterface( ServiceManager.getService(Context.WINDOW_SERVICE)); - if (mAccelerometer.isChecked()) { + if (!mRotationLock.isChecked()) { wm.thawRotation(); } else { wm.freezeRotation(Surface.ROTATION_0); |