Merge "AudioDeviceInventory: Fix for switching leaudio active/inactive" am: 810cf114cd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1928153 Change-Id: I83c00cee09a609e0be853dff3f2794e5b7da3f9d
This commit is contained in:
@@ -1088,6 +1088,12 @@ public class AudioDeviceInventory {
|
||||
private void makeLeAudioDeviceAvailable(String address, String name, int streamType, int device,
|
||||
String eventSource) {
|
||||
if (device != AudioSystem.DEVICE_NONE) {
|
||||
|
||||
/* Audio Policy sees Le Audio similar to A2DP. Let's make sure
|
||||
* AUDIO_POLICY_FORCE_NO_BT_A2DP is not set
|
||||
*/
|
||||
mDeviceBroker.setBluetoothA2dpOnInt(true, false /*fromA2dp*/, eventSource);
|
||||
|
||||
AudioSystem.setDeviceConnectionState(device, AudioSystem.DEVICE_STATE_AVAILABLE,
|
||||
address, name, AudioSystem.AUDIO_FORMAT_DEFAULT);
|
||||
mConnectedDevices.put(DeviceInfo.makeDeviceListKey(device, address),
|
||||
|
||||
Reference in New Issue
Block a user