diff options
Diffstat (limited to 'tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java')
-rw-r--r-- | tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java b/tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java index a12846845..ee6f0f203 100644 --- a/tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java +++ b/tests/src/com/android/server/telecom/tests/BluetoothDeviceManagerTest.java @@ -756,19 +756,14 @@ public class BluetoothDeviceManagerTest extends TelecomTestCase { when(mBluetoothLeAudio.isInbandRingtoneEnabled(1)).thenReturn(true); when(mBluetoothLeAudio.getGroupId(eq(device3))).thenReturn(1); receiverUnderTest.onReceive(mContext, - buildConnectionActionIntent(BluetoothHeadset.STATE_CONNECTED, device1, - BluetoothDeviceManager.DEVICE_TYPE_HEADSET)); - receiverUnderTest.onReceive(mContext, - buildConnectionActionIntent(BluetoothHeadset.STATE_CONNECTED, device2, - BluetoothDeviceManager.DEVICE_TYPE_HEADSET)); - receiverUnderTest.onReceive(mContext, buildConnectionActionIntent(BluetoothHeadset.STATE_CONNECTED, device3, BluetoothDeviceManager.DEVICE_TYPE_LE_AUDIO)); leAudioCallbacksTest.getValue().onGroupNodeAdded(device3, 1); - when(mBluetoothLeAudio.getConnectedGroupLeadDevice(1)).thenReturn(device3); when(mRouteManager.getBluetoothAudioConnectedDevice()).thenReturn(device3); when(mRouteManager.isCachedLeAudioDevice(eq(device3))).thenReturn(true); - assertEquals(3, mBluetoothDeviceManager.getNumConnectedDevices()); + when(mBluetoothLeAudio.getConnectedGroupLeadDevice(1)).thenReturn(device3); + when(mRouteManager.getMostRecentlyReportedActiveDevice()).thenReturn(device3); + assertEquals(1, mBluetoothDeviceManager.getNumConnectedDevices()); assertTrue(mBluetoothDeviceManager.isInbandRingingEnabled()); } |