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

Commit 108e94d9 authored by Nadav Bar's avatar Nadav Bar Committed by Android (Google) Code Review
Browse files

Merge "Enabled the use of VOICE_DOWNLINK, VOICE_UPLINK and VOICE_CALL as audio...

Merge "Enabled the use of VOICE_DOWNLINK, VOICE_UPLINK and VOICE_CALL as audio sources for AudioRecord (Only supported for system apps)"
parents e5d74ccc 33f4f68b
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -741,7 +741,7 @@ public final class AudioAttributes implements Parcelable {
        /**
         * @hide
         * Same as {@link #setCapturePreset(int)} but authorizes the use of HOTWORD,
         * REMOTE_SUBMIX and RADIO_TUNER.
         * REMOTE_SUBMIX, RADIO_TUNER, VOICE_DOWNLINK, VOICE_UPLINK and VOICE_CALL.
         * @param preset
         * @return the same Builder instance.
         */
@@ -749,7 +749,10 @@ public final class AudioAttributes implements Parcelable {
        public Builder setInternalCapturePreset(int preset) {
            if ((preset == MediaRecorder.AudioSource.HOTWORD)
                    || (preset == MediaRecorder.AudioSource.REMOTE_SUBMIX)
                    || (preset == MediaRecorder.AudioSource.RADIO_TUNER)) {
                    || (preset == MediaRecorder.AudioSource.RADIO_TUNER)
                    || (preset == MediaRecorder.AudioSource.VOICE_DOWNLINK)
                    || (preset == MediaRecorder.AudioSource.VOICE_UPLINK)
                    || (preset == MediaRecorder.AudioSource.VOICE_CALL)) {
                mSource = preset;
            } else {
                setCapturePreset(preset);