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

Commit e17c3845 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Stop audio after call without disconnecting device"

parents e97e5593 e0797980
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();
    }