Merge "Add remaining Accessibility Settings to backup list. Note additional settings that should not be restored if they are already set (on account of the new Setup Wizard, which allows critical Accessibility Settings to be set before restore)."
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index e1391da..1908aea 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -3300,7 +3300,8 @@
VIBRATE_WHEN_RINGING,
RINGTONE,
LOCK_TO_APP_ENABLED,
- NOTIFICATION_SOUND
+ NOTIFICATION_SOUND,
+ ACCELEROMETER_ROTATION
};
/**
@@ -5813,10 +5814,15 @@
PARENTAL_CONTROL_ENABLED,
PARENTAL_CONTROL_REDIRECT_URL,
USB_MASS_STORAGE_ENABLED, // moved to global
+ ACCESSIBILITY_DISPLAY_INVERSION_ENABLED,
+ ACCESSIBILITY_DISPLAY_DALTONIZER,
+ ACCESSIBILITY_DISPLAY_COLOR_MATRIX,
+ ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED,
ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
ACCESSIBILITY_DISPLAY_MAGNIFICATION_AUTO_UPDATE,
ACCESSIBILITY_SCRIPT_INJECTION,
+ ACCESSIBILITY_WEB_CONTENT_KEY_BINDINGS,
BACKUP_AUTO_RESTORE,
ENABLED_ACCESSIBILITY_SERVICES,
ENABLED_NOTIFICATION_LISTENERS,
@@ -5826,6 +5832,7 @@
ACCESSIBILITY_ENABLED,
ACCESSIBILITY_SPEAK_PASSWORD,
ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED,
+ ACCESSIBILITY_CAPTIONING_PRESET,
ACCESSIBILITY_CAPTIONING_ENABLED,
ACCESSIBILITY_CAPTIONING_LOCALE,
ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR,
@@ -5834,6 +5841,7 @@
ACCESSIBILITY_CAPTIONING_EDGE_COLOR,
ACCESSIBILITY_CAPTIONING_TYPEFACE,
ACCESSIBILITY_CAPTIONING_FONT_SCALE,
+ ACCESSIBILITY_CAPTIONING_WINDOW_COLOR,
TTS_USE_DEFAULTS,
TTS_DEFAULT_RATE,
TTS_DEFAULT_PITCH,
@@ -5842,6 +5850,7 @@
TTS_DEFAULT_COUNTRY,
TTS_ENABLED_PLUGINS,
TTS_DEFAULT_LOCALE,
+ SHOW_IME_WITH_HARD_KEYBOARD,
WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, // moved to global
WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, // moved to global
WIFI_NUM_OPEN_NETWORKS_KEPT, // moved to global
@@ -5855,9 +5864,16 @@
UI_NIGHT_MODE,
SLEEP_TIMEOUT,
DOUBLE_TAP_TO_WAKE,
+ WAKE_GESTURE_ENABLED,
+ LONG_PRESS_TIMEOUT,
CAMERA_GESTURE_DISABLED,
ACCESSIBILITY_AUTOCLICK_ENABLED,
- ACCESSIBILITY_AUTOCLICK_DELAY
+ ACCESSIBILITY_AUTOCLICK_DELAY,
+ ACCESSIBILITY_LARGE_POINTER_ICON,
+ PREFERRED_TTY_MODE,
+ ENHANCED_VOICE_PRIVACY_ENABLED,
+ TTY_MODE_ENABLED,
+ INCALL_POWER_BUTTON_BEHAVIOR
};
/**
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
index e12e3a5..e5aeb3c 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsHelper.java
@@ -229,18 +229,25 @@
}
private boolean isAlreadyConfiguredCriticalAccessibilitySetting(String name) {
- // These are the critical accessibility settings that are required for a
- // blind user to be able to interact with the device. If these settings are
+ // These are the critical accessibility settings that are required for users with
+ // accessibility needs to be able to interact with the device. If these settings are
// already configured, we will not overwrite them. If they are already set,
- // it means that the user has performed a global gesture to enable accessibility
- // and definitely needs these features working after the restore.
+ // it means that the user has performed a global gesture to enable accessibility or set
+ // these settings in the Accessibility portion of the Setup Wizard, and definitely needs
+ // these features working after the restore.
if (Settings.Secure.ACCESSIBILITY_ENABLED.equals(name)
|| Settings.Secure.ACCESSIBILITY_SCRIPT_INJECTION.equals(name)
|| Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD.equals(name)
- || Settings.Secure.TOUCH_EXPLORATION_ENABLED.equals(name)) {
+ || Settings.Secure.TOUCH_EXPLORATION_ENABLED.equals(name)
+ || Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED.equals(name)
+ || Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED.equals(name)
+ || Settings.Secure.UI_NIGHT_MODE.equals(name)) {
return Settings.Secure.getInt(mContext.getContentResolver(), name, 0) != 0;
} else if (Settings.Secure.TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES.equals(name)
- || Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES.equals(name)) {
+ || Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES.equals(name)
+ || Settings.Secure.ACCESSIBILITY_DISPLAY_COLOR_MATRIX.equals(name)
+ || Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER.equals(name)
+ || Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE.equals(name)) {
return !TextUtils.isEmpty(Settings.Secure.getString(
mContext.getContentResolver(), name));
}