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

Commit 56c543a6 authored by Yeabkal Wubshit's avatar Yeabkal Wubshit
Browse files

Create User Preference Setting for Alarm+Ringer Mode Association

Context: go/wear-conditional-mute-alarms-with-ringer-mode
We want to separate the user's preference for the association, from
the real state of whether or not the association should occur. This
will help to use factors other than the user's choice when deciding
if the association should happen.

Bug: 317405434
Test: presubmit
Change-Id: I83e82ade7b9d1da2aa4a9cf923c5e162b135e0f5
parent 0f25eb73
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -14346,6 +14346,19 @@ public final class Settings {
        public static final String MUTE_ALARM_STREAM_WITH_RINGER_MODE =
                "mute_alarm_stream_with_ringer_mode";
        /**
         * The user's choice for whether or not Alarm stream should always be muted with Ringer.
         *
         * <p>Note that this is different from {@link #MUTE_ALARM_STREAM_WITH_RINGER_MODE}, which
         * controls the real state of whether or not the Alarm stream and Ringer association occurs.
         * The two Settings are not necessarily equal, if the final decision for the association
         * depends on factors beyond the user's preference.
         *
         * @hide
         */
        public static final String MUTE_ALARM_STREAM_WITH_RINGER_MODE_USER_PREFERENCE =
                "mute_alarm_stream_with_ringer_mode_user_preference";
        /**
         * Overlay display devices setting.
         * The associated value is a specially formatted string that describes the
+1 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ public class GlobalSettings {
        Settings.Global.PRIVATE_DNS_SPECIFIER,
        Settings.Global.SOFT_AP_TIMEOUT_ENABLED,
        Settings.Global.ZEN_DURATION,
        Settings.Global.MUTE_ALARM_STREAM_WITH_RINGER_MODE_USER_PREFERENCE,
        Settings.Global.REVERSE_CHARGING_AUTO_ON,
        Settings.Global.CHARGING_VIBRATION_ENABLED,
        Settings.Global.AWARE_ALLOWED,
+2 −0
Original line number Diff line number Diff line
@@ -210,6 +210,8 @@ public class GlobalSettingsValidators {
        VALIDATORS.put(Global.POWER_BUTTON_LONG_PRESS_DURATION_MS, NONE_NEGATIVE_LONG_VALIDATOR);
        VALIDATORS.put(Global.STYLUS_EVER_USED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.MUTE_ALARM_STREAM_WITH_RINGER_MODE, BOOLEAN_VALIDATOR);
        VALIDATORS.put(
                Global.MUTE_ALARM_STREAM_WITH_RINGER_MODE_USER_PREFERENCE, BOOLEAN_VALIDATOR);

        VALIDATORS.put(Global.Wearable.HAS_PAY_TOKENS, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.Wearable.GMS_CHECKIN_TIMEOUT_MIN, ANY_INTEGER_VALIDATOR);