Merge "Add contrast level in settings" into tm-qpr-dev am: 7955fa372d am: 93ae788acf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20468732 Change-Id: I5f66580ea040f8ef04016b34c9166215ef6d60c3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -7897,6 +7897,13 @@ public final class Settings {
|
||||
public static final String ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED =
|
||||
"high_text_contrast_enabled";
|
||||
|
||||
/**
|
||||
* The color contrast, float in [-1, 1], 1 being the highest contrast.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final String CONTRAST_LEVEL = "contrast_level";
|
||||
|
||||
/**
|
||||
* Setting that specifies whether the display magnification is enabled via a system-wide
|
||||
* triple tap gesture. Display magnifications allows the user to zoom in the display content
|
||||
|
||||
@@ -88,6 +88,7 @@ message SecureSettingsProto {
|
||||
optional SettingProto odi_captions_volume_ui_enabled = 42 [ (android.privacy).dest = DEST_AUTOMATIC ];
|
||||
// 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 ];
|
||||
}
|
||||
optional Accessibility accessibility = 2;
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ public class SecureSettings {
|
||||
Settings.Secure.ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN,
|
||||
Settings.Secure.ACCESSIBILITY_SHORTCUT_ON_LOCK_SCREEN,
|
||||
Settings.Secure.ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED,
|
||||
Settings.Secure.CONTRAST_LEVEL,
|
||||
Settings.Secure.ACCESSIBILITY_CAPTIONING_PRESET,
|
||||
Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED,
|
||||
Settings.Secure.ACCESSIBILITY_CAPTIONING_LOCALE,
|
||||
|
||||
@@ -86,6 +86,7 @@ public class SecureSettingsValidators {
|
||||
VALIDATORS.put(Secure.ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, BOOLEAN_VALIDATOR);
|
||||
VALIDATORS.put(Secure.ACCESSIBILITY_SHORTCUT_ON_LOCK_SCREEN, BOOLEAN_VALIDATOR);
|
||||
VALIDATORS.put(Secure.ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED, BOOLEAN_VALIDATOR);
|
||||
VALIDATORS.put(Secure.CONTRAST_LEVEL, new InclusiveFloatRangeValidator(-1f, 1f));
|
||||
VALIDATORS.put(
|
||||
Secure.ACCESSIBILITY_CAPTIONING_PRESET,
|
||||
new DiscreteValueValidator(new String[] {"-1", "0", "1", "2", "3", "4"}));
|
||||
|
||||
@@ -1761,6 +1761,9 @@ class SettingsProtoDumpUtil {
|
||||
dumpSetting(s, p,
|
||||
Settings.Secure.ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED,
|
||||
SecureSettingsProto.Accessibility.HIGH_TEXT_CONTRAST_ENABLED);
|
||||
dumpSetting(s, p,
|
||||
Settings.Secure.CONTRAST_LEVEL,
|
||||
SecureSettingsProto.Accessibility.CONTRAST_LEVEL);
|
||||
dumpSetting(s, p,
|
||||
Settings.Secure.FONT_WEIGHT_ADJUSTMENT,
|
||||
SecureSettingsProto.FONT_WEIGHT_ADJUSTMENT);
|
||||
|
||||
Reference in New Issue
Block a user