Merge "Correct stream type for BLE input device" into tm-dev

This commit is contained in:
Jack He
2022-05-11 00:08:21 +00:00
committed by Android (Google) Code Review

View File

@@ -1289,8 +1289,11 @@ import java.util.concurrent.atomic.AtomicBoolean;
break; break;
case MSG_L_SET_BT_ACTIVE_DEVICE: case MSG_L_SET_BT_ACTIVE_DEVICE:
synchronized (mDeviceStateLock) { synchronized (mDeviceStateLock) {
mDeviceInventory.onSetBtActiveDevice((BtDeviceInfo) msg.obj, BtDeviceInfo btInfo = (BtDeviceInfo) msg.obj;
mAudioService.getBluetoothContextualVolumeStream()); mDeviceInventory.onSetBtActiveDevice(btInfo,
(btInfo.mProfile != BluetoothProfile.LE_AUDIO || btInfo.mIsLeOutput)
? mAudioService.getBluetoothContextualVolumeStream()
: AudioSystem.STREAM_DEFAULT);
} }
break; break;
case MSG_BT_HEADSET_CNCT_FAILED: case MSG_BT_HEADSET_CNCT_FAILED: