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

Commit 8dfb438b authored by Mikhail Naganov's avatar Mikhail Naganov Committed by Android (Google) Code Review
Browse files

Merge "Add audio stream and usage for virtual assistant"

parents 74c4faa3 b64fac77
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -4018,6 +4018,7 @@ package android.media {
    field public static final int AUDIOFOCUS_FLAG_DELAY_OK = 1; // 0x1
    field public static final int AUDIOFOCUS_FLAG_LOCK = 4; // 0x4
    field public static final int AUDIOFOCUS_FLAG_PAUSES_ON_DUCKABLE_LOSS = 2; // 0x2
    field @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING) public static final int STREAM_ASSISTANT = 11; // 0xb
    field public static final int SUCCESS = 0; // 0x0
  }
+8 −1
Original line number Diff line number Diff line
@@ -3899,6 +3899,12 @@ public final class Settings {
         */
        public static final String VOLUME_ACCESSIBILITY = "volume_a11y";
        /**
         * @hide
         * Volume index for virtual assistant.
         */
        public static final String VOLUME_ASSISTANT = "volume_assistant";
        /**
         * Master volume (float in the range 0.0f to 1.0f).
         *
@@ -3977,7 +3983,7 @@ public final class Settings {
                "" /*STREAM_SYSTEM_ENFORCED, no setting for this stream*/,
                "" /*STREAM_DTMF, no setting for this stream*/,
                "" /*STREAM_TTS, no setting for this stream*/,
                VOLUME_ACCESSIBILITY
                VOLUME_ACCESSIBILITY, VOLUME_ASSISTANT
            };
        /**
@@ -4524,6 +4530,7 @@ public final class Settings {
            PUBLIC_SETTINGS.add(VOLUME_ALARM);
            PUBLIC_SETTINGS.add(VOLUME_NOTIFICATION);
            PUBLIC_SETTINGS.add(VOLUME_BLUETOOTH_SCO);
            PUBLIC_SETTINGS.add(VOLUME_ASSISTANT);
            PUBLIC_SETTINGS.add(RINGTONE);
            PUBLIC_SETTINGS.add(NOTIFICATION_SOUND);
            PUBLIC_SETTINGS.add(ALARM_ALERT);
+3 −0
Original line number Diff line number Diff line
@@ -4272,4 +4272,7 @@
         value is left empty.  When this is non-empty then config_rawContactsLocalAccountName
         should also be non-empty.-->
    <string name="config_rawContactsLocalAccountType" translatable="false"></string>

    <!-- Whether or not to use assistant stream volume separately from music volume -->
    <bool name="config_useAssistantVolume">false</bool>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -468,6 +468,7 @@
  <java-symbol type="string" name="config_deviceSpecificAudioService" />
  <java-symbol type="integer" name="config_num_physical_slots" />
  <java-symbol type="array" name="config_integrityRuleProviderPackages" />
  <java-symbol type="bool" name="config_useAssistantVolume" />

  <java-symbol type="color" name="tab_indicator_text_v4" />

+4 −0
Original line number Diff line number Diff line
@@ -374,6 +374,10 @@ public class AudioManager {
    public static final int STREAM_TTS = AudioSystem.STREAM_TTS;
    /** Used to identify the volume of audio streams for accessibility prompts */
    public static final int STREAM_ACCESSIBILITY = AudioSystem.STREAM_ACCESSIBILITY;
    /** @hide Used to identify the volume of audio streams for virtual assistant */
    @SystemApi
    @RequiresPermission(android.Manifest.permission.MODIFY_AUDIO_ROUTING)
    public static final int STREAM_ASSISTANT = AudioSystem.STREAM_ASSISTANT;

    /** Number of audio streams */
    /**
Loading