Loading tests/src/com/android/server/telecom/tests/BluetoothRouteManagerTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import java.util.Arrays; import java.util.Objects; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.nullable; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.atLeast; Loading Loading @@ -130,6 +131,8 @@ public class BluetoothRouteManagerTest extends TelecomTestCase { when(mDeviceManager.getNumConnectedDevices()).thenReturn(devices.length); when(mDeviceManager.getConnectedDevices()).thenReturn(Arrays.asList(devices)); when(mHeadsetProxy.getConnectedDevices()).thenReturn(Arrays.asList(devices)); when(mHeadsetProxy.getAudioState(any(BluetoothDevice.class))) .thenReturn(BluetoothHeadset.STATE_AUDIO_DISCONNECTED); if (activeDevice != null) { when(mHeadsetProxy.getAudioState(eq(activeDevice))) .thenReturn(BluetoothHeadset.STATE_AUDIO_CONNECTED); Loading tests/src/com/android/server/telecom/tests/BluetoothRouteTransitionTests.java +3 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import static com.android.server.telecom.tests.BluetoothRouteManagerTest.DEVICE2 import static com.android.server.telecom.tests.BluetoothRouteManagerTest.DEVICE3; import static com.android.server.telecom.tests.BluetoothRouteManagerTest.executeRoutingAction; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.nullable; import static org.mockito.Mockito.doAnswer; Loading Loading @@ -306,6 +307,8 @@ public class BluetoothRouteTransitionTests extends TelecomTestCase { when(mDeviceManager.getConnectedDevices()).thenReturn(Arrays.asList(devices)); when(mHeadsetProxy.getConnectedDevices()).thenReturn(Arrays.asList(devices)); when(mHeadsetProxy.getActiveDevice()).thenReturn(activeDevice); when(mHeadsetProxy.getAudioState(any(BluetoothDevice.class))) .thenReturn(BluetoothHeadset.STATE_AUDIO_DISCONNECTED); if (audioOnDevice != null) { when(mHeadsetProxy.getAudioState(eq(audioOnDevice))) .thenReturn(BluetoothHeadset.STATE_AUDIO_CONNECTED); Loading Loading
tests/src/com/android/server/telecom/tests/BluetoothRouteManagerTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ import java.util.Arrays; import java.util.Objects; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.nullable; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.atLeast; Loading Loading @@ -130,6 +131,8 @@ public class BluetoothRouteManagerTest extends TelecomTestCase { when(mDeviceManager.getNumConnectedDevices()).thenReturn(devices.length); when(mDeviceManager.getConnectedDevices()).thenReturn(Arrays.asList(devices)); when(mHeadsetProxy.getConnectedDevices()).thenReturn(Arrays.asList(devices)); when(mHeadsetProxy.getAudioState(any(BluetoothDevice.class))) .thenReturn(BluetoothHeadset.STATE_AUDIO_DISCONNECTED); if (activeDevice != null) { when(mHeadsetProxy.getAudioState(eq(activeDevice))) .thenReturn(BluetoothHeadset.STATE_AUDIO_CONNECTED); Loading
tests/src/com/android/server/telecom/tests/BluetoothRouteTransitionTests.java +3 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import static com.android.server.telecom.tests.BluetoothRouteManagerTest.DEVICE2 import static com.android.server.telecom.tests.BluetoothRouteManagerTest.DEVICE3; import static com.android.server.telecom.tests.BluetoothRouteManagerTest.executeRoutingAction; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.nullable; import static org.mockito.Mockito.doAnswer; Loading Loading @@ -306,6 +307,8 @@ public class BluetoothRouteTransitionTests extends TelecomTestCase { when(mDeviceManager.getConnectedDevices()).thenReturn(Arrays.asList(devices)); when(mHeadsetProxy.getConnectedDevices()).thenReturn(Arrays.asList(devices)); when(mHeadsetProxy.getActiveDevice()).thenReturn(activeDevice); when(mHeadsetProxy.getAudioState(any(BluetoothDevice.class))) .thenReturn(BluetoothHeadset.STATE_AUDIO_DISCONNECTED); if (audioOnDevice != null) { when(mHeadsetProxy.getAudioState(eq(audioOnDevice))) .thenReturn(BluetoothHeadset.STATE_AUDIO_CONNECTED); Loading