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

Commit 22740a8b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Stop audio after call without disconnecting device" am: e17c3845 am: 9c90c46b

parents 72f5a07c 9c90c46b
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -382,17 +382,9 @@ 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();
        clearLeAudioCommunicationDevice();
    }
    }

    public void disconnectSco() {
        if (mBluetoothHeadset == null) {
+0 −1
Original line number Diff line number Diff line
@@ -367,7 +367,6 @@ public class BluetoothDeviceManagerTest extends TelecomTestCase {
                .thenReturn(Arrays.asList(device2, null));

        mBluetoothDeviceManager.disconnectAudio();
        verify(mAdapter).removeActiveDevice(BluetoothAdapter.ACTIVE_DEVICE_ALL);
        verify(mBluetoothHeadset).disconnectAudio();
    }