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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user