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

Commit b7346ca2 authored by Eric Laurent's avatar Eric Laurent Committed by Automerger Merge Worker
Browse files

Merge "AudioDeviceInventory: fix LE Audio Broadcast device name." into...

Merge "AudioDeviceInventory: fix LE Audio Broadcast device name." into udc-qpr-dev am: 5235f980 am: 0b97f287

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/24405073



Change-Id: Ie19df4a96aa489dc64f923eb0b95f1b8becd565d
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents f3a72c8c 0b97f287
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -2070,12 +2070,18 @@ public class AudioDeviceInventory {
    @GuardedBy("mDevicesLock")
    private void makeLeAudioDeviceAvailable(
            AudioDeviceBroker.BtDeviceInfo btInfo, int streamType, String eventSource) {
        final String address = btInfo.mDevice.getAddress();
        final String name = BtHelper.getName(btInfo.mDevice);
        final int volumeIndex = btInfo.mVolume == -1 ? -1 : btInfo.mVolume * 10;
        final int device = btInfo.mAudioSystemDevice;

        if (device != AudioSystem.DEVICE_NONE) {
            final String address = btInfo.mDevice.getAddress();
            String name = BtHelper.getName(btInfo.mDevice);

            // The BT Stack does not provide a name for LE Broadcast devices
            if (device == AudioSystem.DEVICE_OUT_BLE_BROADCAST && name.equals("")) {
                name = "Broadcast";
            }

            /* Audio Policy sees Le Audio similar to A2DP. Let's make sure
             * AUDIO_POLICY_FORCE_NO_BT_A2DP is not set
             */