/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/avrcpcontroller/ |
D | AvrcpCoverArtStorageTest.java | 45 private BluetoothDevice mDevice1; field in AvrcpCoverArtStorageTest 57 mDevice1 = BluetoothAdapter.getDefaultAdapter().getRemoteDevice("AA:BB:CC:DD:EE:FF"); in setUp() 72 mAvrcpCoverArtStorage.removeImagesForDevice(mDevice1); in tearDown() 78 mDevice1 = null; in tearDown() 91 Uri expectedUri = AvrcpCoverArtProvider.getImageUri(mDevice1, mHandle1); in addNewImage_imageExists() 92 Assert.assertFalse(mAvrcpCoverArtStorage.doesImageExist(mDevice1, mHandle1)); in addNewImage_imageExists() 94 Uri uri = mAvrcpCoverArtStorage.addImage(mDevice1, mHandle1, mImage1); in addNewImage_imageExists() 97 Assert.assertTrue(mAvrcpCoverArtStorage.doesImageExist(mDevice1, mHandle1)); in addNewImage_imageExists() 102 Uri expectedUri = AvrcpCoverArtProvider.getImageUri(mDevice1, mHandle1); in addExistingImage_imageUpdated() 103 Assert.assertFalse(mAvrcpCoverArtStorage.doesImageExist(mDevice1, mHandle1)); in addExistingImage_imageUpdated() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/ |
D | RemoteDevicesTest.java | 51 private BluetoothDevice mDevice1; field in RemoteDevicesTest 67 mDevice1 = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(TEST_BT_ADDR_1); in setUp() 96 mRemoteDevices.updateUuids(mDevice1); in testSendUuidIntent() 112 Assert.assertNull(mRemoteDevices.getDeviceProperties(mDevice1)); in testUpdateBatteryLevel_normalSequence() 115 mRemoteDevices.updateBatteryLevel(mDevice1, batteryLevel, /* fromBas= */ false); in testUpdateBatteryLevel_normalSequence() 119 verifyBatteryLevelChangedIntent(mDevice1, batteryLevel, mIntentArgument); in testUpdateBatteryLevel_normalSequence() 123 Assert.assertNotNull(mRemoteDevices.getDeviceProperties(mDevice1)); in testUpdateBatteryLevel_normalSequence() 125 mRemoteDevices.getDeviceProperties(mDevice1).getBatteryLevel(), batteryLevel); in testUpdateBatteryLevel_normalSequence() 128 mRemoteDevices.updateBatteryLevel(mDevice1, batteryLevel, /* fromBas= */ false); in testUpdateBatteryLevel_normalSequence() 133 mRemoteDevices.updateBatteryLevel(mDevice1, batteryLevel, /* fromBas= */ false); in testUpdateBatteryLevel_normalSequence() [all …]
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkServiceTest.java | 67 private BluetoothDevice mDevice1; field in A2dpSinkServiceTest 87 mDevice1 = mAdapter.getRemoteDevice("11:11:11:11:11:11"); in setUp() 94 new BluetoothDevice[] {mDevice1, mDevice2, mDevice3, mDevice4, mDevice5, mDevice6}; in setUp() 165 mockDevicePriority(mDevice1, BluetoothProfile.CONNECTION_POLICY_ALLOWED); in testConnectPolicyAllowedDevice() 166 setupDeviceConnection(mDevice1); in testConnectPolicyAllowedDevice() 172 mockDevicePriority(mDevice1, BluetoothProfile.CONNECTION_POLICY_FORBIDDEN); in testConnectPolicyForbiddenDevice() 173 assertThat(mService.connect(mDevice1)).isFalse(); in testConnectPolicyForbiddenDevice() 174 assertThat(mService.getConnectionState(mDevice1)) in testConnectPolicyForbiddenDevice() 181 mockDevicePriority(mDevice1, BluetoothProfile.CONNECTION_POLICY_UNKNOWN); in testConnectPolicyUnknownDevice() 182 setupDeviceConnection(mDevice1); in testConnectPolicyUnknownDevice() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/connecteddevice/audiosharing/ |
D | AudioSharingCallAudioPreferenceControllerTest.java | 128 @Mock private BluetoothDevice mDevice1; field in AudioSharingCallAudioPreferenceControllerTest 339 when(mCachedDevice1.getDevice()).thenReturn(mDevice1); in onFallbackDeviceChanged_updateSummary() 341 when(mCacheManager.findDevice(mDevice1)).thenReturn(mCachedDevice1); in onFallbackDeviceChanged_updateSummary() 345 .thenReturn(ImmutableList.of(mDevice1)); in onFallbackDeviceChanged_updateSummary() 360 when(mCachedDevice1.getDevice()).thenReturn(mDevice1); in displayPreference_showCorrectSummary() 368 when(mCacheManager.findDevice(mDevice1)).thenReturn(mCachedDevice1); in displayPreference_showCorrectSummary() 374 .thenReturn(ImmutableList.of(mDevice1, mDevice2, mDevice3)); in displayPreference_showCorrectSummary() 388 when(mCachedDevice1.getDevice()).thenReturn(mDevice1); in displayPreference_noFallbackDeviceInSharing_showEmptySummary() 390 when(mCacheManager.findDevice(mDevice1)).thenReturn(mCachedDevice1); in displayPreference_noFallbackDeviceInSharing_showEmptySummary() 394 .thenReturn(ImmutableList.of(mDevice1)); in displayPreference_noFallbackDeviceInSharing_showEmptySummary() [all …]
|
D | AudioSharingDialogHandlerTest.java | 115 @Mock private BluetoothDevice mDevice1; field in AudioSharingDialogHandlerTest 156 when(mCachedDevice1.getDevice()).thenReturn(mDevice1); in setup() 173 when(mCacheManager.findDevice(mDevice1)).thenReturn(mCachedDevice1); in setup() 240 ImmutableList<BluetoothDevice> deviceList = ImmutableList.of(mDevice1); in handleUserTriggeredLeaDeviceConnected_noSharingNoTwoLeaDevices_setActive() 253 ImmutableList<BluetoothDevice> deviceList = ImmutableList.of(mDevice1, mDevice3); in handleUserTriggeredLeaDeviceConnected_noSharingTwoLeaDevices_showJoinDialog() 296 ImmutableList<BluetoothDevice> deviceList = ImmutableList.of(mDevice1, mDevice3); in handleUserTriggeredLeaDeviceConnected_sharing_showJoinDialog() 300 when(mAssistant.getAllSources(mDevice1)).thenReturn(ImmutableList.of()); in handleUserTriggeredLeaDeviceConnected_sharing_showJoinDialog() 334 verify(mAssistant).addSource(mDevice1, mMetadata, /* isGroupOp= */ false); in handleUserTriggeredLeaDeviceConnected_sharing_showJoinDialog() 341 ImmutableList<BluetoothDevice> deviceList = ImmutableList.of(mDevice1, mDevice3, mDevice4); in handleUserTriggeredLeaDeviceConnected_sharingWithTwoLeaDevices_showDisconnectDialog() 345 when(mAssistant.getAllSources(mDevice1)).thenReturn(ImmutableList.of()); in handleUserTriggeredLeaDeviceConnected_sharingWithTwoLeaDevices_showDisconnectDialog() [all …]
|
D | AudioSharingDeviceVolumeGroupControllerTest.java | 116 @Mock private BluetoothDevice mDevice1; field in AudioSharingDeviceVolumeGroupControllerTest 173 doReturn(mDevice1).when(mCachedDevice1).getDevice(); in setUp() 175 when(mCachedDeviceManager.findDevice(mDevice1)).thenReturn(mCachedDevice1); in setUp() 455 mController.mVolumeControlCallback.onDeviceVolumeChanged(mDevice1, TEST_VOLUME_VALUE); in onDeviceVolumeChanged_updatePreference() 466 mDevice1, /* sourceId= */ 1, mState); in testBluetoothLeBroadcastAssistantCallbacks_updateGroup() 474 mDevice1, /* sourceId= */ 1, mState); in testBluetoothLeBroadcastAssistantCallbacks_updateGroup() 479 mDevice1, /* sourceId= */ 1, /* reason= */ 1); in testBluetoothLeBroadcastAssistantCallbacks_updateGroup() 490 mDevice1, /* sourceId= */ 1, /* reason= */ 1); in testBluetoothLeBroadcastAssistantCallbacks_doNothing() 492 mDevice1, mSource, /* reason= */ 1); in testBluetoothLeBroadcastAssistantCallbacks_doNothing() 494 mDevice1, /* sourceId= */ 1, /* reason= */ 1); in testBluetoothLeBroadcastAssistantCallbacks_doNothing() [all …]
|
D | AudioSharingSwitchBarControllerTest.java | 131 @Mock private BluetoothDevice mDevice1; field in AudioSharingSwitchBarControllerTest 158 when(mDeviceManager.findDevice(mDevice1)).thenReturn(mCachedDevice1); in setUp() 159 when(mCachedDevice1.getDevice()).thenReturn(mDevice1); in setUp() 408 .thenReturn(ImmutableList.of(mDevice1)); in onCheckedChangedToChecked_notSharing_withConnectedLeaDevices_startAudioSharing() 440 .thenReturn(ImmutableList.of(mDevice2, mDevice1)); in onPlaybackStarted_showJoinAudioSharingDialog()
|
D | AudioSharingDisconnectDialogFragmentTest.java | 97 @Mock private BluetoothDevice mDevice1; field in AudioSharingDisconnectDialogFragmentTest 117 when(mDevice1.getAnonymizedAddress()).thenReturn(TEST_ADDRESS1); in setUp() 120 when(mCachedDevice1.getDevice()).thenReturn(mDevice1); in setUp()
|
D | AudioSharingStopDialogFragmentTest.java | 97 @Mock private BluetoothDevice mDevice1; field in AudioSharingStopDialogFragmentTest 116 when(mCachedDevice1.getDevice()).thenReturn(mDevice1); in setUp()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/media/ |
D | MediaOutputIndicatorSliceTest.java | 96 private MediaDevice mDevice1; field in MediaOutputIndicatorSliceTest 127 when(mDevice1.getName()).thenReturn(TEST_DEVICE_1_NAME); in setUp() 128 when(mDevice1.getIcon()).thenReturn(mTestDrawable); in setUp() 129 when(mDevice1.getMaxVolume()).thenReturn(100); in setUp() 130 when(mDevice1.isConnected()).thenReturn(true); in setUp() 143 mDevices.add(mDevice1); in getSlice_withConnectedDevice_verifyMetadata() 148 doReturn(mDevice1).when(sMediaOutputIndicatorWorker).getCurrentConnectedMediaDevice(); in getSlice_withConnectedDevice_verifyMetadata() 177 mDevices.add(mDevice1); in getSlice_audioModeIsInCommunication_returnErrorSlice() 180 doReturn(mDevice1).when(sMediaOutputIndicatorWorker).getCurrentConnectedMediaDevice(); in getSlice_audioModeIsInCommunication_returnErrorSlice() 192 mDevices.add(mDevice1); in getSlice_audioModeIsRingtone_returnErrorSlice() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/ |
D | BluetoothDevicesGroupPreferenceControllerTest.java | 75 private BluetoothDevice mDevice1; field in BluetoothDevicesGroupPreferenceControllerTest 90 mDevice1 = BluetoothAdapter.getDefaultAdapter().getRemoteDevice("00:11:22:33:AA:BB"); in setUp() 91 when(mCachedDevice1.getDevice()).thenReturn(mDevice1); in setUp() 123 when(mFilter.matches(mDevice1)).thenReturn(true); in refreshUi_filterMatch_addsToGroup() 137 when(mFilter.matches(mDevice1)).thenReturn(true); in refreshUi_filterMatch_addsToPreferenceMap() 151 when(mFilter.matches(mDevice1)).thenReturn(true); in refreshUi_filterMismatch_removesFromGroup() 158 when(mFilter.matches(mDevice1)).thenReturn(false); in refreshUi_filterMismatch_removesFromGroup() 168 when(mFilter.matches(mDevice1)).thenReturn(true); in refreshUi_filterMismatch_removesFromPreferenceMap() 175 when(mFilter.matches(mDevice1)).thenReturn(false); in refreshUi_filterMismatch_removesFromPreferenceMap() 192 when(mFilter.matches(mDevice1)).thenReturn(true); in refreshUi_devices_showsGroup() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | MediaVolumePreferenceControllerTest.java | 77 @Mock private MediaDevice mDevice1; field in MediaVolumePreferenceControllerTest 88 when(mDevice1.isBLEDevice()).thenReturn(true); in setUp() 125 doReturn(mDevice1).when(sMediaOutputIndicatorWorker).getCurrentConnectedMediaDevice(); in isSupportEndItem_flagOff_returnsFalse() 135 doReturn(mDevice1).when(sMediaOutputIndicatorWorker).getCurrentConnectedMediaDevice(); in isSupportEndItem_withBleDevice_returnsTrue() 144 doReturn(mDevice1).when(sMediaOutputIndicatorWorker).getCurrentConnectedMediaDevice(); in isSupportEndItem_notSupportedBroadcast_returnsFalse() 207 doReturn(mDevice1).when(sMediaOutputIndicatorWorker).getCurrentConnectedMediaDevice(); in getSliceEndItem_deviceIsBroadcasting_getsBroadcastIntent()
|