Merge "Import translations. DO NOT MERGE"
diff --git a/res/xml/display_settings.xml b/res/xml/display_settings.xml
index 0eb90d0..a9506e8 100644
--- a/res/xml/display_settings.xml
+++ b/res/xml/display_settings.xml
@@ -27,10 +27,6 @@
android:title="@string/wallpaper_settings_title"
android:fragment="com.android.settings.WallpaperTypeSettings" />
- <CheckBoxPreference
- android:key="accelerometer"
- android:title="@string/accelerometer_title"/>
-
<ListPreference
android:key="screen_timeout"
android:title="@string/screen_timeout"
diff --git a/src/com/android/settings/DisplaySettings.java b/src/com/android/settings/DisplaySettings.java
index b0c944d..ab00a0d 100644
--- a/src/com/android/settings/DisplaySettings.java
+++ b/src/com/android/settings/DisplaySettings.java
@@ -49,14 +49,12 @@
private static final int FALLBACK_SCREEN_TIMEOUT_VALUE = 30000;
private static final String KEY_SCREEN_TIMEOUT = "screen_timeout";
- private static final String KEY_ACCELEROMETER = "accelerometer";
private static final String KEY_FONT_SIZE = "font_size";
private static final String KEY_NOTIFICATION_PULSE = "notification_pulse";
private static final String KEY_SCREEN_SAVER = "screensaver";
private static final int DLG_GLOBAL_CHANGE_WARNING = 1;
- private CheckBoxPreference mAccelerometer;
private WarnedListPreference mFontSizePref;
private CheckBoxPreference mNotificationPulse;
@@ -65,14 +63,6 @@
private ListPreference mScreenTimeoutPreference;
private Preference mScreenSaverPreference;
- private final RotationPolicy.RotationPolicyListener mRotationPolicyListener =
- new RotationPolicy.RotationPolicyListener() {
- @Override
- public void onChange() {
- updateAccelerometerRotationCheckbox();
- }
- };
-
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -80,16 +70,6 @@
addPreferencesFromResource(R.xml.display_settings);
- mAccelerometer = (CheckBoxPreference) findPreference(KEY_ACCELEROMETER);
- mAccelerometer.setPersistent(false);
- 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,
- // if the device supports rotation.
- getPreferenceScreen().removePreference(mAccelerometer);
- }
-
mScreenSaverPreference = findPreference(KEY_SCREEN_SAVER);
if (mScreenSaverPreference != null
&& getResources().getBoolean(
@@ -226,21 +206,10 @@
public void onResume() {
super.onResume();
- RotationPolicy.registerRotationPolicyListener(getActivity(),
- mRotationPolicyListener);
-
updateState();
}
@Override
- public void onPause() {
- super.onPause();
-
- RotationPolicy.unregisterRotationPolicyListener(getActivity(),
- mRotationPolicyListener);
- }
-
- @Override
public Dialog onCreateDialog(int dialogId) {
if (dialogId == DLG_GLOBAL_CHANGE_WARNING) {
return Utils.buildGlobalChangeWarningDialog(getActivity(),
@@ -255,7 +224,6 @@
}
private void updateState() {
- updateAccelerometerRotationCheckbox();
readFontSizePreference(mFontSizePref);
updateScreenSaverSummary();
}
@@ -267,12 +235,6 @@
}
}
- private void updateAccelerometerRotationCheckbox() {
- if (getActivity() == null) return;
-
- mAccelerometer.setChecked(!RotationPolicy.isRotationLocked(getActivity()));
- }
-
public void writeFontSizePreference(Object objValue) {
try {
mCurConfig.fontScale = Float.parseFloat(objValue.toString());
@@ -284,10 +246,7 @@
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
- if (preference == mAccelerometer) {
- RotationPolicy.setRotationLockForAccessibility(
- getActivity(), !mAccelerometer.isChecked());
- } else if (preference == mNotificationPulse) {
+ if (preference == mNotificationPulse) {
boolean value = mNotificationPulse.isChecked();
Settings.System.putInt(getContentResolver(), Settings.System.NOTIFICATION_LIGHT_PULSE,
value ? 1 : 0);