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

Commit 65439acd 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:...

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

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



Change-Id: I9deff6784c81c34f5b25c2dae45f699bc70a84d2
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d65debac 22740a8b
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();
    }