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

Commit 7cf5ae1c authored by Eric Laurent's avatar Eric Laurent
Browse files

AudioService: fix SCO audio resume after call

In AudioDeviceBroker.setCommunicationRouteForClient(),
if the requested device is SCO audio, start BT SCO audio
not only when SCO was not requested before but also if SCO audio
is not active.

Bug: 206739623
Test: repro steps in bug.
Test: atest AudioCommunicationDeviceTest
Change-Id: I36bd1f32811e0cd4db4ffc54a5fb189f0352cfe8
parent f49cf8a4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -328,7 +328,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
        }

        boolean isBtScoRequested = isBluetoothScoRequested();
        if (isBtScoRequested && !wasBtScoRequested) {
        if (isBtScoRequested && (!wasBtScoRequested || !isBluetoothScoActive())) {
            if (!mBtHelper.startBluetoothSco(scoAudioMode, eventSource)) {
                Log.w(TAG, "setCommunicationRouteForClient: failure to start BT SCO for pid: "
                        + pid);