diff options
| author | 2023-03-10 00:51:56 +0000 | |
|---|---|---|
| committer | 2023-03-10 00:51:56 +0000 | |
| commit | 1718a9c347fd41c54db489d013136b1bc61e7c9f (patch) | |
| tree | 6e2d5d35fdb7d14f10665ee2aa80042e31c457df | |
| parent | 64d3a0e656a9b491dd432abef98a8ff60184722e (diff) | |
| parent | f7410613c1e291f4eb34003bae1447b21b574d0d (diff) | |
Merge "Add key ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED" into tm-qpr-dev
5 files changed, 17 insertions, 1 deletions
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index 10e1633b22d7..6b25c81218e8 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -8001,6 +8001,15 @@ public final class Settings { "accessibility_display_inversion_enabled"; /** + * Flag that specifies whether font size has been changed. The flag will + * be set when users change the scaled value of font size for the first time. + * @hide + */ + @Readable + public static final String ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED = + "accessibility_font_scaling_has_been_changed"; + + /** * Setting that specifies whether display color space adjustment is * enabled. * diff --git a/core/proto/android/providers/settings/secure.proto b/core/proto/android/providers/settings/secure.proto index 556636ddd210..d443270575d3 100644 --- a/core/proto/android/providers/settings/secure.proto +++ b/core/proto/android/providers/settings/secure.proto @@ -89,6 +89,8 @@ message SecureSettingsProto { // Setting for accessibility magnification for following typing. optional SettingProto accessibility_magnification_follow_typing_enabled = 43 [ (android.privacy).dest = DEST_AUTOMATIC ]; optional SettingProto contrast_level = 44 [ (android.privacy).dest = DEST_AUTOMATIC ]; + // Settings for font scaling + optional SettingProto accessibility_font_scaling_has_been_changed = 51 [ (android.privacy).dest = DEST_AUTOMATIC ]; } optional Accessibility accessibility = 2; diff --git a/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java b/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java index b5eaa4b776b8..6a07dc6603ca 100644 --- a/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java +++ b/packages/SettingsProvider/src/android/provider/settings/backup/SecureSettings.java @@ -221,6 +221,7 @@ public class SecureSettings { Settings.Secure.BLUETOOTH_LE_BROADCAST_PROGRAM_INFO, Settings.Secure.BLUETOOTH_LE_BROADCAST_CODE, Settings.Secure.BLUETOOTH_LE_BROADCAST_APP_SOURCE_NAME, - Settings.Secure.LOCK_SCREEN_WEATHER_ENABLED + Settings.Secure.LOCK_SCREEN_WEATHER_ENABLED, + Settings.Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED }; } diff --git a/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java b/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java index 534e31ae42ee..dd9b48457333 100644 --- a/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java +++ b/packages/SettingsProvider/src/android/provider/settings/validators/SecureSettingsValidators.java @@ -355,5 +355,6 @@ public class SecureSettingsValidators { VALIDATORS.put(Secure.BLUETOOTH_LE_BROADCAST_CODE, ANY_STRING_VALIDATOR); VALIDATORS.put(Secure.BLUETOOTH_LE_BROADCAST_APP_SOURCE_NAME, ANY_STRING_VALIDATOR); VALIDATORS.put(Secure.LOCK_SCREEN_WEATHER_ENABLED, BOOLEAN_VALIDATOR); + VALIDATORS.put(Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED, BOOLEAN_VALIDATOR); } } diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java index a78faaf90c37..c90b95a7fe62 100644 --- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java +++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsProtoDumpUtil.java @@ -1822,6 +1822,9 @@ class SettingsProtoDumpUtil { Settings.Secure.ACCESSIBILITY_MAGNIFICATION_FOLLOW_TYPING_ENABLED, SecureSettingsProto.Accessibility .ACCESSIBILITY_MAGNIFICATION_FOLLOW_TYPING_ENABLED); + dumpSetting(s, p, + Settings.Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED, + SecureSettingsProto.Accessibility.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED); p.end(accessibilityToken); final long adaptiveSleepToken = p.start(SecureSettingsProto.ADAPTIVE_SLEEP); |