Home
last modified time | relevance | path

Searched refs:mBluetoothDevice (Results 1 – 20 of 20) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DSavedBluetoothDeviceUpdaterTest.java65 private BluetoothDevice mBluetoothDevice; field in SavedBluetoothDeviceUpdaterTest
83 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
85 when(mBluetoothDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED); in setUp()
100 doReturn(BluetoothDevice.BOND_BONDED).when(mBluetoothDevice).getBondState(); in update_filterMatch_addPreference()
101 doReturn(false).when(mBluetoothDevice).isConnected(); in update_filterMatch_addPreference()
111 doReturn(BluetoothDevice.BOND_NONE).when(mBluetoothDevice).getBondState(); in update_filterNotMatch_removePreference()
112 doReturn(true).when(mBluetoothDevice).isConnected(); in update_filterNotMatch_removePreference()
121 when(mBluetoothDevice.isConnected()).thenReturn(true); in onProfileConnectionStateChanged_deviceConnected_removePreference()
131 when(mBluetoothDevice.isConnected()).thenReturn(false); in onProfileConnectionStateChanged_deviceDisconnected_addPreference()
150 bluetoothDevices.add(mBluetoothDevice); in forceUpdate_findCachedBluetoothDeviceIsMatched_addPreference()
[all …]
DAdvancedBluetoothDetailsHeaderControllerTest.java70 private BluetoothDevice mBluetoothDevice; field in AdvancedBluetoothDetailsHeaderControllerTest
88 when(mCachedDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
94 when(mCachedDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
112 when(mBluetoothDevice.getMetadata( in refresh_connected_updateCorrectInfo()
115 when(mBluetoothDevice.getMetadata( in refresh_connected_updateCorrectInfo()
118 when(mBluetoothDevice.getMetadata( in refresh_connected_updateCorrectInfo()
152 when(mBluetoothDevice.getMetadata( in refresh_withLowBatteryAndUncharged_showAlertIcon()
155 when(mBluetoothDevice.getMetadata( in refresh_withLowBatteryAndUncharged_showAlertIcon()
158 when(mBluetoothDevice.getMetadata( in refresh_withLowBatteryAndUncharged_showAlertIcon()
161 when(mBluetoothDevice.getMetadata( in refresh_withLowBatteryAndUncharged_showAlertIcon()
[all …]
DBluetoothPairingControllerTest.java45 private BluetoothDevice mBluetoothDevice; field in BluetoothPairingControllerTest
55 intent.putExtra(BluetoothDevice.EXTRA_DEVICE, mBluetoothDevice); in setUp()
66 verify(mBluetoothDevice).setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); in onDialogPositiveClick_confirmationDialog_setPBAP()
71 when(mBluetoothDevice.getPhonebookAccessPermission()).thenReturn( in onSetContactSharingState_permissionAllowed_setPBAPAllowed()
76 verify(mBluetoothDevice).setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); in onSetContactSharingState_permissionAllowed_setPBAPAllowed()
81 when(mBluetoothDevice.getPhonebookAccessPermission()).thenReturn( in onSetContactSharingState_permissionUnknown_audioVideoHandsfree_setPBAPAllowed()
83 when(mBluetoothDevice.getBluetoothClass()).thenReturn(mBluetoothClass); in onSetContactSharingState_permissionUnknown_audioVideoHandsfree_setPBAPAllowed()
87 verify(mBluetoothDevice).setPhonebookAccessPermission(BluetoothDevice.ACCESS_ALLOWED); in onSetContactSharingState_permissionUnknown_audioVideoHandsfree_setPBAPAllowed()
92 when(mBluetoothDevice.getPhonebookAccessPermission()).thenReturn( in onSetContactSharingState_permissionRejected_setPBAPRejected()
94 when(mBluetoothDevice.getBluetoothClass()).thenReturn(mBluetoothClass); in onSetContactSharingState_permissionRejected_setPBAPRejected()
[all …]
DBluetoothDeviceUpdaterTest.java71 private BluetoothDevice mBluetoothDevice; field in BluetoothDeviceUpdaterTest
95 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
122 mBluetoothDeviceUpdater.mPreferenceMap.put(mBluetoothDevice, mPreference); in testAddPreference_deviceExist_doNothing()
133 final Preference preference = mBluetoothDeviceUpdater.mPreferenceMap.get(mBluetoothDevice); in testAddPreference_deviceNotExist_addPreference()
140 mBluetoothDeviceUpdater.mPreferenceMap.put(mBluetoothDevice, mPreference); in testRemovePreference_deviceExist_removePreference()
145 assertThat(mBluetoothDeviceUpdater.mPreferenceMap.containsKey(mBluetoothDevice)).isFalse(); in testRemovePreference_deviceExist_removePreference()
150 mBluetoothDeviceUpdater.mPreferenceMap.put(mBluetoothDevice, mPreference); in testOnDeviceDeleted_deviceExists_removePreference()
155 assertThat(mBluetoothDeviceUpdater.mPreferenceMap.containsKey(mBluetoothDevice)).isFalse(); in testOnDeviceDeleted_deviceExists_removePreference()
193 doReturn(BluetoothDevice.BOND_BONDED).when(mBluetoothDevice).getBondState(); in isDeviceConnected_deviceConnected()
194 doReturn(true).when(mBluetoothDevice).isConnected(); in isDeviceConnected_deviceConnected()
[all …]
DForgetDeviceDialogFragmentTest.java61 private BluetoothDevice mBluetoothDevice; field in ForgetDeviceDialogFragmentTest
76 when(mCachedDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
103 when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET)) in createDialog_untetheredDevice_showUntetheredMessage()
117 when(mBluetoothDevice.getMetadata(BluetoothDevice.METADATA_IS_UNTETHERED_HEADSET)) in createDialog_normalDevice_showNormalMessage()
DBluetoothDetailsHeaderControllerTest.java62 private BluetoothDevice mBluetoothDevice; field in BluetoothDetailsHeaderControllerTest
78 when(mCachedDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
132 when(mBluetoothDevice.getMetadata( in isAvailable_untetheredHeadsetWithConfigOn_returnFalse()
143 when(mBluetoothDevice.getMetadata( in isAvailable_untetheredHeadsetWithConfigOff_returnTrue()
DBluetoothFeatureProviderImplTest.java39 private BluetoothDevice mBluetoothDevice; field in BluetoothFeatureProviderImplTest
51 when(mBluetoothDevice.getMetadata( in getBluetoothDeviceSettingsUri_containCorrectMacAddress()
54 final Uri uri = mBluetoothFeatureProvider.getBluetoothDeviceSettingsUri(mBluetoothDevice); in getBluetoothDeviceSettingsUri_containCorrectMacAddress()
DBluetoothPairingDetailTest.java79 private BluetoothDevice mBluetoothDevice; field in BluetoothPairingDetailTest
95 mBluetoothDevice = mBluetoothAdapter.getRemoteDevice(TEST_DEVICE_ADDRESS); in setUp()
228 mFragment.mSelectedList.add(mBluetoothDevice); in onProfileConnectionStateChanged_deviceInSelectedListAndConnected_finish()
246 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in onProfileConnectionStateChanged_deviceNotInSelectedList_doNothing()
257 mFragment.mSelectedList.add(mBluetoothDevice); in onProfileConnectionStateChanged_deviceDisconnected_doNothing()
DConnectedBluetoothDeviceUpdaterTest.java67 private BluetoothDevice mBluetoothDevice; field in ConnectedBluetoothDeviceUpdaterTest
89 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
244 mBluetoothDeviceUpdater.mPreferenceMap.put(mBluetoothDevice, btPreference); in addPreference_addPreference_shouldHideSecondTarget()
DAvailableMediaBluetoothDeviceUpdaterTest.java64 private BluetoothDevice mBluetoothDevice; field in AvailableMediaBluetoothDeviceUpdaterTest
88 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
/packages/apps/Settings/tests/robotests/src/com/android/settings/sound/
DHandsFreeProfileOutputPreferenceControllerTest.java107 private BluetoothDevice mBluetoothDevice; field in HandsFreeProfileOutputPreferenceControllerTest
135 mBluetoothDevice = spy(mBluetoothAdapter.getRemoteDevice(TEST_DEVICE_ADDRESS_1)); in setUp()
136 when(mBluetoothDevice.getName()).thenReturn(TEST_DEVICE_NAME_1); in setUp()
137 when(mBluetoothDevice.isConnected()).thenReturn(true); in setUp()
193 mController.setActiveBluetoothDevice(mBluetoothDevice); in setActiveBluetoothDevice_btDeviceWithoutHisyncId_shouldSetBtDeviceActive()
195 verify(mHeadsetProfile).setActiveDevice(mBluetoothDevice); in setActiveBluetoothDevice_btDeviceWithoutHisyncId_shouldSetBtDeviceActive()
196 verify(mHearingAidProfile, never()).setActiveDevice(mBluetoothDevice); in setActiveBluetoothDevice_btDeviceWithoutHisyncId_shouldSetBtDeviceActive()
222 mController.setActiveBluetoothDevice(mBluetoothDevice); in setActiveBluetoothDevice_inNormalMode_shouldNotSetActiveDeviceToHeadsetProfile()
252 mProfileConnectedDevices.add(mBluetoothDevice); in updateState_oneHeadsetsAvailableAndActivated_shouldSetDeviceName()
254 when(mHeadsetProfile.getActiveDevice()).thenReturn(mBluetoothDevice); in updateState_oneHeadsetsAvailableAndActivated_shouldSetDeviceName()
[all …]
DAudioOutputSwitchPreferenceControllerTest.java111 private BluetoothDevice mBluetoothDevice; field in AudioOutputSwitchPreferenceControllerTest
143 mBluetoothDevice = spy(mBluetoothAdapter.getRemoteDevice(TEST_DEVICE_ADDRESS_1)); in setUp()
144 when(mBluetoothDevice.getName()).thenReturn(TEST_DEVICE_NAME_1); in setUp()
145 when(mBluetoothDevice.isConnected()).thenReturn(true); in setUp()
257 mController.mConnectedDevices.add(mBluetoothDevice); in findActiveHearingAidDevice_leftActiveDevice_returnLeftDeviceAsActiveHapDevice()
262 when(mHeadsetProfile.getActiveDevice()).thenReturn(mBluetoothDevice); in findActiveHearingAidDevice_leftActiveDevice_returnLeftDeviceAsActiveHapDevice()
275 mController.mConnectedDevices.add(mBluetoothDevice); in findActiveHearingAidDevice_rightActiveDevice_returnRightDeviceAsActiveHapDevice()
280 when(mHeadsetProfile.getActiveDevice()).thenReturn(mBluetoothDevice); in findActiveHearingAidDevice_rightActiveDevice_returnRightDeviceAsActiveHapDevice()
293 mController.mConnectedDevices.add(mBluetoothDevice); in findActiveHearingAidDevice_twoActiveDevice_returnActiveDeviceInConnectedDevices()
298 when(mHeadsetProfile.getActiveDevice()).thenReturn(mBluetoothDevice); in findActiveHearingAidDevice_twoActiveDevice_returnActiveDeviceInConnectedDevices()
[all …]
DMediaOutputPreferenceControllerTest.java123 private BluetoothDevice mBluetoothDevice; field in MediaOutputPreferenceControllerTest
175 mBluetoothDevice = spy(mBluetoothAdapter.getRemoteDevice(TEST_DEVICE_ADDRESS_1)); in setUp()
176 when(mBluetoothDevice.getName()).thenReturn(TEST_DEVICE_NAME_1); in setUp()
177 when(mBluetoothDevice.isConnected()).thenReturn(true); in setUp()
219 mProfileConnectedDevices.add(mBluetoothDevice); in updateState_withConnectedBtDevice_withoutActiveBtDevice_setDefaultSummary()
240 mProfileConnectedDevices.add(mBluetoothDevice); in updateState_withActiveBtDevice_setActivatedDeviceName()
243 when(mA2dpProfile.getActiveDevice()).thenReturn(mBluetoothDevice); in updateState_withActiveBtDevice_setActivatedDeviceName()
338 when(mA2dpProfile.getActiveDevice()).thenReturn(mBluetoothDevice); in findActiveDevice_onlyA2dpDeviceActive_returnA2dpDevice()
340 assertThat(mController.findActiveDevice()).isEqualTo(mBluetoothDevice); in findActiveDevice_onlyA2dpDeviceActive_returnA2dpDevice()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/trust/
DBleMessageStreamV1Test.java65 private BluetoothDevice mBluetoothDevice; field in BleMessageStreamV1Test
85 mBluetoothDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(ADDRESS_MOCK); in setUp()
87 mHandlerMock, mBlePeripheralManager, mBluetoothDevice, mWriteCharacteristicMock, in setUp()
110 verify(mBlePeripheralManager).notifyCharacteristicChanged(mBluetoothDevice, in writeMessage_noChunkingRequired_sendsCorrectMessage()
135 mBluetoothDevice, in writeMessage_chunkingRequired_sendsCorrectMessage()
148 .notifyCharacteristicChanged(mBluetoothDevice, in writeMessage_chunkingRequired_sendsCorrectMessage()
194 .notifyCharacteristicChanged(mBluetoothDevice, mWriteCharacteristicMock, false); in writeMessage_chunkingRequired_retriesSamePayloadIfNoAckReceived()
239 .notifyCharacteristicChanged(mBluetoothDevice, mWriteCharacteristicMock, false); in writeMessage_chunkingRequired_notifiesCallbackIfNoAck()
254 mBluetoothDevice, in processClientMessage_noChunking_notifiesCallbackForCompleteMessage()
278 mBluetoothDevice, in processClientMessage_chunkingRequired_notifiesCallbackForCompleteMessage()
[all …]
DCarTrustAgentEnrollmentServiceTest.java78 private BluetoothDevice mBluetoothDevice; field in CarTrustAgentEnrollmentServiceTest
101 mBluetoothDevice = BluetoothAdapter.getDefaultAdapter().getRemoteDevice(ADDRESS); in setUp()
111 mCarTrustAgentEnrollmentService.onRemoteDeviceConnected(mBluetoothDevice); in setUp()
167 mCarTrustAgentEnrollmentService.enrollmentHandshakeAccepted(mBluetoothDevice); in testEncryptionHandshake()
306 mCarTrustAgentEnrollmentService.enrollmentHandshakeAccepted(mBluetoothDevice); in setupEncryptionHandshake()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/bluetooth/
DMapMceTestFragment.java112 TextView mBluetoothDevice; field in MapMceTestFragment
129 mBluetoothDevice = (TextView) v.findViewById(R.id.bluetoothDevice); in onCreateView()
203 disconnectDevice(mBluetoothDevice.getText().toString()); in onCreateView()
256 mBluetoothDevice.getText().toString()); in getMessages()
296 mBluetoothDevice.getText().toString()); in getUploadingFeatureValue()
324 mBluetoothDevice.getText().toString()); in sendMessage()
337 if (mBluetoothDevice == null) { in sendMessage()
377 mBluetoothDevice.setText(connectedDevices.get(0).getAddress()); in onServiceConnected()
398 mBluetoothDevice.setText(((BluetoothDevice) intent.getParcelableExtra( in onReceive()
402 mBluetoothDevice.setText("Disconnected"); in onReceive()
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/
DTelecomActivityViewModel.java52 private BluetoothDevice mBluetoothDevice; field in TelecomActivityViewModel
77 if (!hfpDeviceList.contains(mBluetoothDevice)) { in TelecomActivityViewModel()
78 mBluetoothDevice = hfpDeviceList.get(0); in TelecomActivityViewModel()
82 if (mBluetoothDevice != null) { in TelecomActivityViewModel()
83 mBluetoothDevice = null; in TelecomActivityViewModel()
DTelecomActivity.java71 private BluetoothDevice mBluetoothDevice; field in TelecomActivity
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/
DAccessibilityHearingAidPreferenceControllerTest.java74 private BluetoothDevice mBluetoothDevice; field in AccessibilityHearingAidPreferenceControllerTest
162 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in handleHearingAidPreferenceClick_withHearingAid_launchBluetoothDeviceDetailSetting()
187 when(mLocalBluetoothManager.getCachedDeviceManager().isSubDevice(mBluetoothDevice)) in getConnectedHearingAidDevice_doNotReturnSubDevice()
206 mBluetoothDevice = mBluetoothAdapter.getRemoteDevice(TEST_DEVICE_ADDRESS); in setupHearingAidEnvironment()
209 when(mCachedDeviceManager.findDevice(mBluetoothDevice)).thenReturn(mCachedBluetoothDevice); in setupHearingAidEnvironment()
222 deviceList.add(mBluetoothDevice); in generateHearingAidDeviceList()
/packages/services/Car/service/src/com/android/car/
DBluetoothProfileInhibitManager.java92 private final BluetoothDevice mBluetoothDevice; field in BluetoothProfileInhibitManager.BluetoothConnection
97 mBluetoothDevice = device; in BluetoothConnection()
101 return mBluetoothDevice; in getDevice()
117 return Objects.equals(mBluetoothDevice, otherParams.mBluetoothDevice) in equals()
123 return Objects.hash(mBluetoothDevice, mBluetoothProfile); in hashCode()
137 return mBluetoothDevice + "/" + mBluetoothProfile; in encode()