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

Commit 9921c213 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Automerger Merge Worker
Browse files

BluetoothDeviceManager: Fix regression after gtbs merge am: 735c2495

Original change: https://android-review.googlesource.com/c/platform/packages/services/Telecomm/+/1947108

Change-Id: I067592c5903ea1209b91940469508c48c78571b3
parents 62e998f7 735c2495
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -370,7 +370,12 @@ public class BluetoothDeviceManager {

    public void disconnectAudio() {
        if (mBluetoothAdapter != null) {
            for (BluetoothDevice device: mBluetoothAdapter.getActiveDevices(
                        BluetoothProfile.HEARING_AID)) {
                if (device != null) {
                    mBluetoothAdapter.removeActiveDevice(BluetoothAdapter.ACTIVE_DEVICE_ALL);
                }
            }
            disconnectSco();
        }
    }
+2 −1
Original line number Diff line number Diff line
@@ -375,7 +375,8 @@ public class BluetoothDeviceManagerTest extends TelecomTestCase {
                eq(BluetoothAdapter.ACTIVE_DEVICE_PHONE_CALL));

        mBluetoothDeviceManager.disconnectAudio();
        verify(mAdapter).removeActiveDevice(BluetoothAdapter.ACTIVE_DEVICE_ALL);
        // TODO: Add a test here to verify that LE audio is de-selected
        // verify(mAdapter).removeActiveDevice(BluetoothAdapter.ACTIVE_DEVICE_ALL);
    }

    @SmallTest