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

Commit d1204f10 authored by Yeabkal Wubshit's avatar Yeabkal Wubshit
Browse files

Add Settings keys for Wear Autobrightness Values

This has been created/used in Wear (ag/18494126), but since the CL that
adds that has more logic changes in the display code space, we're
creating a new CL here specifically for creating the Settings keys.

Bug: 303443082
Test: unit tests
Change-Id: I234590fc1b0aedfa0cf6454697f41015ec49a4ed
parent 3e920dd1
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -5663,6 +5663,37 @@ public final class Settings {
         */
        public static final String SHOW_ROTARY_INPUT = "show_rotary_input";
        /**
         * The screen backlight brightness for automatic mode.
         *
         * <p>Value should be one of:
         *      <ul>
         *        <li>SCREEN_BRIGHTNESS_AUTOMATIC_BRIGHT
         *        <li>SCREEN_BRIGHTNESS_AUTOMATIC_NORMAL
         *        <li>SCREEN_BRIGHTNESS_AUTOMATIC_DIM
         *      </ul>
         * @hide
         */
        public static final String SCREEN_BRIGHTNESS_FOR_ALS = "screen_brightness_for_als";
        /**
         * SCREEN_BRIGHTNESS_FOR_ALS value for automatic bright.
         * @hide
         */
        public static final int SCREEN_BRIGHTNESS_AUTOMATIC_BRIGHT = 1;
        /**
         * SCREEN_BRIGHTNESS_FOR_ALS value for automatic normal.
         * @hide
         */
        public static final int SCREEN_BRIGHTNESS_AUTOMATIC_NORMAL = 2;
        /**
         * SCREEN_BRIGHTNESS_FOR_ALS value for automatic dim.
         * @hide
         */
        public static final int SCREEN_BRIGHTNESS_AUTOMATIC_DIM = 3;
        /**
         * Log raw orientation data from
         * {@link com.android.server.policy.WindowOrientationListener} for use with the
+5 −0
Original line number Diff line number Diff line
@@ -120,6 +120,11 @@ public class SystemSettingsValidators {
        VALIDATORS.put(System.DISPLAY_COLOR_MODE_VENDOR_HINT, ANY_STRING_VALIDATOR);
        VALIDATORS.put(System.SCREEN_OFF_TIMEOUT, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(System.SCREEN_BRIGHTNESS_MODE, BOOLEAN_VALIDATOR);
        VALIDATORS.put(
                System.SCREEN_BRIGHTNESS_FOR_ALS,
                new InclusiveIntegerRangeValidator(
                        System.SCREEN_BRIGHTNESS_AUTOMATIC_BRIGHT,
                        System.SCREEN_BRIGHTNESS_AUTOMATIC_DIM));
        VALIDATORS.put(System.ADAPTIVE_SLEEP, BOOLEAN_VALIDATOR);
        VALIDATORS.put(System.MODE_RINGER_STREAMS_AFFECTED, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(System.MUTE_STREAMS_AFFECTED, NON_NEGATIVE_INTEGER_VALIDATOR);
+1 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ public class SettingsBackupTest {
                    Settings.System.MIN_REFRESH_RATE, // depends on hardware capabilities
                    Settings.System.PEAK_REFRESH_RATE, // depends on hardware capabilities
                    Settings.System.SCREEN_BRIGHTNESS_FLOAT,
                    Settings.System.SCREEN_BRIGHTNESS_FOR_ALS,
                    Settings.System.WEAR_ACCESSIBILITY_GESTURE_ENABLED_DURING_OOBE,
                    Settings.System.WEAR_TTS_PREWARM_ENABLED,
                    Settings.System.SCREEN_AUTO_BRIGHTNESS_ADJ,