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

Commit 142f0a60 authored by Yeabkal Wubshit's avatar Yeabkal Wubshit Committed by Sundeep Gopalaswamy
Browse files

Support for ringer mode to affect alarm stream

Bug: 315521463
Test: Enable "Mute alarm" and "Mute ring" settings, Alarm volume should
      be muted.

Change-Id: I55abc7df42e221b9f011dd166591395e770b2fb0
parent 42f9b0d5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -14307,6 +14307,14 @@ public final class Settings {
        @Readable
        public static final String MODE_RINGER = "mode_ringer";
        /**
         * Whether or not Alarm stream should always be muted with Ringer.
         *
         * @hide
         */
        public static final String MUTE_ALARM_STREAM_WITH_RINGER_MODE =
                "mute_alarm_stream_with_ringer_mode";
        /**
         * Overlay display devices setting.
         * The associated value is a specially formatted string that describes the
+4 −1
Original line number Diff line number Diff line
@@ -610,6 +610,9 @@ message GlobalSettingsProto {
    // ringer mode.
    optional SettingProto mode_ringer = 75 [ (android.privacy).dest = DEST_AUTOMATIC ];

    // This is an optional feature where ringer mode affects alarm stream as well
    optional SettingProto mute_alarm_stream_with_ringer_mode = 160 [ (android.privacy).dest = DEST_AUTOMATIC ];

    reserved 147; // Used to be apply_ramping_ringer

    message MultiSim {
@@ -1086,5 +1089,5 @@ message GlobalSettingsProto {

    // Please insert fields in alphabetical order and group them into messages
    // if possible (to avoid reaching the method limit).
    // Next tag = 160;
    // Next tag = 161;
}
+3 −0
Original line number Diff line number Diff line
@@ -2262,6 +2262,9 @@
    <!-- The default min volume for the alarm stream -->
    <integer name="config_audio_alarm_min_vol">1</integer>

    <!-- Flag indicating if ringer mode affects alarm stream -->
    <bool name="config_audio_ringer_mode_affects_alarm_stream">false</bool>

    <!-- The default value for whether head tracking for
         spatial audio is enabled for a newly connected audio device -->
    <bool name="config_spatial_audio_head_tracking_enabled_default">false</bool>
+1 −0
Original line number Diff line number Diff line
@@ -288,6 +288,7 @@
  <java-symbol type="integer" name="config_audio_ring_vol_default" />
  <java-symbol type="integer" name="config_audio_ring_vol_steps" />
  <java-symbol type="integer" name="config_audio_alarm_min_vol" />
  <java-symbol type="bool" name="config_audio_ringer_mode_affects_alarm_stream" />
  <java-symbol type="bool" name="config_spatial_audio_head_tracking_enabled_default" />
  <java-symbol type="bool" name="config_avoidGfxAccel" />
  <java-symbol type="bool" name="config_bluetooth_address_validation" />
+1 −0
Original line number Diff line number Diff line
@@ -209,6 +209,7 @@ public class GlobalSettingsValidators {
        VALIDATORS.put(Global.ADAPTIVE_BATTERY_MANAGEMENT_ENABLED, BOOLEAN_VALIDATOR);
        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.Wearable.HAS_PAY_TOKENS, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Global.Wearable.GMS_CHECKIN_TIMEOUT_MIN, ANY_INTEGER_VALIDATOR);
Loading