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

Commit ac552fae authored by Vlad Popa's avatar Vlad Popa
Browse files

Use DTMF stream instead of BT SCO for ToneGenerator

The ToneGenerator should not be created for STREAM_BLUETOOTH_SCO.
Whenever user does that, replacing with STREAM_DTMF

Flag: EXEMPT bugfix
Test: repro in bug
Bug: 361576207
Change-Id: I0ebfe28bf2ec41ee7e31ced49d1c60da57fb4b53
parent 46ef399b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1323,7 +1323,7 @@ bool ToneGenerator::initAudioTrack() {

    audio_attributes_t attr;
    audio_stream_type_t streamType = mStreamType;
    if (mStreamType == AUDIO_STREAM_VOICE_CALL) {
    if (mStreamType == AUDIO_STREAM_VOICE_CALL || mStreamType == AUDIO_STREAM_BLUETOOTH_SCO) {
        streamType = AUDIO_STREAM_DTMF;
    }
    attr = AudioSystem::streamTypeToAttributes(streamType);