Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a094ee1 authored by Isaac Chai's avatar Isaac Chai
Browse files

Add secure settings for Color Correction Saturation level control

As titled. This is to improve color correction on accessibility
settings.

Test: Locally tested
Bug: 322829049

Change-Id: I5a9d52af4ad0aff0c4dc5905fd4ac1499745952d
parent 16769d7f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -9019,6 +9019,16 @@ public final class Settings {
        public static final String ACCESSIBILITY_DISPLAY_DALTONIZER =
                "accessibility_display_daltonizer";
        /**
         * Integer property that determines the saturation level of color correction. Default value
         * is defined in Settings config.xml.
         * [0-10] inclusive where 0 would look as if color space adustment is not applied at all.
         *
         * @hide
         */
        public static final String ACCESSIBILITY_DISPLAY_DALTONIZER_SATURATION_LEVEL =
                "accessibility_display_daltonizer_saturation_level";
        /**
         * Setting that specifies whether automatic click when the mouse pointer stops moving is
         * enabled.
+1 −0
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ message SecureSettingsProto {
        optional SettingProto accessibility_pinch_to_zoom_anywhere_enabled = 55 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto accessibility_single_finger_panning_enabled = 56 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto accessibility_floating_menu_targets = 57 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto display_daltonizer_saturation_level = 58 [ (android.privacy).dest = DEST_AUTOMATIC ];

    }
    optional Accessibility accessibility = 2;
+2 −1
Original line number Diff line number Diff line
@@ -272,6 +272,7 @@ public class SecureSettings {
        Settings.Secure.IMMERSIVE_MODE_CONFIRMATIONS,
        Settings.Secure.AUDIO_DEVICE_INVENTORY,
        Settings.Secure.SCREEN_RESOLUTION_MODE,
        Settings.Secure.ACCESSIBILITY_FLOATING_MENU_TARGETS
        Settings.Secure.ACCESSIBILITY_FLOATING_MENU_TARGETS,
        Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_SATURATION_LEVEL
    };
}
+2 −0
Original line number Diff line number Diff line
@@ -430,5 +430,7 @@ public class SecureSettingsValidators {
        VALIDATORS.put(Secure.AUDIO_DEVICE_INVENTORY, ANY_STRING_VALIDATOR);
        VALIDATORS.put(Secure.SCREEN_RESOLUTION_MODE, new InclusiveIntegerRangeValidator(
                Secure.RESOLUTION_MODE_UNKNOWN, Secure.RESOLUTION_MODE_FULL));
        VALIDATORS.put(Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_SATURATION_LEVEL,
                new InclusiveIntegerRangeValidator(0, 10));
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -1759,6 +1759,9 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER,
                SecureSettingsProto.Accessibility.DISPLAY_DALTONIZER);
        dumpSetting(s, p,
                Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_SATURATION_LEVEL,
                SecureSettingsProto.Accessibility.DISPLAY_DALTONIZER_SATURATION_LEVEL);
        dumpSetting(s, p,
                Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED,
                SecureSettingsProto.Accessibility.DISPLAY_INVERSION_ENABLED);