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

Commit 999f448b authored by Thomas Girardier's avatar Thomas Girardier Committed by Automerger Merge Worker
Browse files

Merge "Add missing connection call for LeAudio service" am: 63fc4611 am:...

Merge "Add missing connection call for LeAudio service" am: 63fc4611 am: 9f174a18 am: a36e838c

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/2393239



Change-Id: I2b6f0ed45fa1021f1cf3be7bee8072f28b65a33f
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c4afc1ed a36e838c
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -652,9 +652,15 @@ public class LeAudioServiceTest {
        mService.bondStateChanged(mLeftDevice, BluetoothDevice.BOND_NONE);
        assertThat(mService.getDevices().contains(mLeftDevice)).isFalse();

        // Remove bond will remove also device descriptor. Device has to be connected again
        assertWithMessage("Connect failed").that(mService.connect(mLeftDevice)).isTrue();
        verifyConnectionStateIntent(LeAudioStateMachine.sConnectTimeoutMs * 2,
                mLeftDevice, BluetoothProfile.STATE_CONNECTING,
                BluetoothProfile.STATE_DISCONNECTED);

        // stack event: CONNECTION_STATE_CONNECTED - state machine should be created
        generateConnectionMessageFromNative(mLeftDevice, BluetoothProfile.STATE_CONNECTED,
                BluetoothProfile.STATE_DISCONNECTED);
                BluetoothProfile.STATE_CONNECTING);
        assertThat(BluetoothProfile.STATE_CONNECTED)
                .isEqualTo(mService.getConnectionState(mLeftDevice));
        assertThat(mService.getDevices().contains(mLeftDevice)).isTrue();