Loading android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java +7 −1 Original line number Original line Diff line number Diff line Loading @@ -652,9 +652,15 @@ public class LeAudioServiceTest { mService.bondStateChanged(mLeftDevice, BluetoothDevice.BOND_NONE); mService.bondStateChanged(mLeftDevice, BluetoothDevice.BOND_NONE); assertThat(mService.getDevices().contains(mLeftDevice)).isFalse(); 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 // stack event: CONNECTION_STATE_CONNECTED - state machine should be created generateConnectionMessageFromNative(mLeftDevice, BluetoothProfile.STATE_CONNECTED, generateConnectionMessageFromNative(mLeftDevice, BluetoothProfile.STATE_CONNECTED, BluetoothProfile.STATE_DISCONNECTED); BluetoothProfile.STATE_CONNECTING); assertThat(BluetoothProfile.STATE_CONNECTED) assertThat(BluetoothProfile.STATE_CONNECTED) .isEqualTo(mService.getConnectionState(mLeftDevice)); .isEqualTo(mService.getConnectionState(mLeftDevice)); assertThat(mService.getDevices().contains(mLeftDevice)).isTrue(); assertThat(mService.getDevices().contains(mLeftDevice)).isTrue(); Loading Loading
android/app/tests/unit/src/com/android/bluetooth/le_audio/LeAudioServiceTest.java +7 −1 Original line number Original line Diff line number Diff line Loading @@ -652,9 +652,15 @@ public class LeAudioServiceTest { mService.bondStateChanged(mLeftDevice, BluetoothDevice.BOND_NONE); mService.bondStateChanged(mLeftDevice, BluetoothDevice.BOND_NONE); assertThat(mService.getDevices().contains(mLeftDevice)).isFalse(); 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 // stack event: CONNECTION_STATE_CONNECTED - state machine should be created generateConnectionMessageFromNative(mLeftDevice, BluetoothProfile.STATE_CONNECTED, generateConnectionMessageFromNative(mLeftDevice, BluetoothProfile.STATE_CONNECTED, BluetoothProfile.STATE_DISCONNECTED); BluetoothProfile.STATE_CONNECTING); assertThat(BluetoothProfile.STATE_CONNECTED) assertThat(BluetoothProfile.STATE_CONNECTED) .isEqualTo(mService.getConnectionState(mLeftDevice)); .isEqualTo(mService.getConnectionState(mLeftDevice)); assertThat(mService.getDevices().contains(mLeftDevice)).isTrue(); assertThat(mService.getDevices().contains(mLeftDevice)).isTrue(); Loading