Home
last modified time | relevance | path

Searched refs:mCachedBluetoothDevice (Results 1 – 13 of 13) sorted by relevance

/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
H A DAvailableMediaBluetoothDeviceUpdaterTest.java64 private CachedBluetoothDevice mCachedBluetoothDevice; field in AvailableMediaBluetoothDeviceUpdaterTest
93 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
94 when(mCachedBluetoothDevice.getAddress()).thenReturn(MAC_ADDRESS); in setUp()
111 when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true); in onAudioModeChanged_hfpDeviceConnected_inCall_addPreference()
112 mCachedDevices.add(mCachedBluetoothDevice); in onAudioModeChanged_hfpDeviceConnected_inCall_addPreference()
116 verify(mBluetoothDeviceUpdater).addPreference(mCachedBluetoothDevice); in onAudioModeChanged_hfpDeviceConnected_inCall_addPreference()
124 when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true); in onAudioModeChanged_hfpDeviceConnected_notInCall_removePreference()
125 mCachedDevices.add(mCachedBluetoothDevice); in onAudioModeChanged_hfpDeviceConnected_notInCall_removePreference()
138 mCachedDevices.add(mCachedBluetoothDevice); in onAudioModeChanged_a2dpDeviceConnected_inCall_removePreference()
151 mCachedDevices.add(mCachedBluetoothDevice); in onAudioModeChanged_a2dpDeviceConnected_notInCall_addPreference()
[all …]
H A DConnectedBluetoothDeviceUpdaterTest.java67 private CachedBluetoothDevice mCachedBluetoothDevice; field in ConnectedBluetoothDeviceUpdaterTest
94 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
95 when(mCachedBluetoothDevice.getAddress()).thenReturn(MAC_ADDRESS); in setUp()
110 when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true); in onAudioModeChanged_hfpDeviceConnected_notInCall_addPreference()
111 mCachedDevices.add(mCachedBluetoothDevice); in onAudioModeChanged_hfpDeviceConnected_notInCall_addPreference()
115 verify(mBluetoothDeviceUpdater).addPreference(mCachedBluetoothDevice); in onAudioModeChanged_hfpDeviceConnected_notInCall_addPreference()
123 when(mCachedBluetoothDevice.isConnectedHfpDevice()).thenReturn(true); in onAudioModeChanged_hfpDeviceConnected_inCall_removePreference()
124 mCachedDevices.add(mCachedBluetoothDevice); in onAudioModeChanged_hfpDeviceConnected_inCall_removePreference()
137 mCachedDevices.add(mCachedBluetoothDevice); in onAudioModeChanged_a2dpDeviceConnected_notInCall_removePreference()
150 mCachedDevices.add(mCachedBluetoothDevice); in onAudioModeChanged_a2dpDeviceConnected_inCall_addPreference()
[all …]
H A DSavedBluetoothDeviceUpdaterTest.java65 private CachedBluetoothDevice mCachedBluetoothDevice; field in SavedBluetoothDeviceUpdaterTest
88 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
89 when(mCachedBluetoothDevice.getAddress()).thenReturn(MAC_ADDRESS); in setUp()
109 mBluetoothDeviceUpdater.update(mCachedBluetoothDevice); in update_filterMatch_addPreference()
111 verify(mBluetoothDeviceUpdater).addPreference(mCachedBluetoothDevice, in update_filterMatch_addPreference()
120 mBluetoothDeviceUpdater.update(mCachedBluetoothDevice); in update_filterNotMatch_removePreference()
142 verify(mBluetoothDeviceUpdater).addPreference(mCachedBluetoothDevice, in onProfileConnectionStateChanged_deviceDisconnected_addPreference()
150 verify(mCachedBluetoothDevice).connect(); in onClick_Preference_setConnect()
155 when(mCachedBluetoothDevice.isConnected()).thenReturn(true); in onClick_Preference_connected_setActive()
159 verify(mCachedBluetoothDevice).setActive(); in onClick_Preference_connected_setActive()
[all …]
H A DBluetoothDevicePreferenceTest.java72 private CachedBluetoothDevice mCachedBluetoothDevice; field in BluetoothDevicePreferenceTest
94 when(mCachedBluetoothDevice.getAddress()).thenReturn(MAC_ADDRESS); in setUp()
95 when(mCachedBluetoothDevice.getDrawableWithDescription()) in setUp()
112 when(mCachedBluetoothDevice.isConnected()).thenReturn(true); in onClicked_deviceConnected_shouldLogBluetoothDisconnectEvent()
122 when(mCachedBluetoothDevice.isConnected()).thenReturn(false); in onClicked_deviceBonded_shouldLogBluetoothConnectEvent()
133 when(mCachedBluetoothDevice.isConnected()).thenReturn(false); in onClicked_deviceNotBonded_shouldLogBluetoothPairEvent()
135 when(mCachedBluetoothDevice.startPairing()).thenReturn(true); in onClicked_deviceNotBonded_shouldLogBluetoothPairEvent()
149 when(mCachedBluetoothDevice.isConnected()).thenReturn(false); in onClicked_deviceNotBonded_shouldLogBluetoothPairEventAndPairWithoutNameEvent()
151 when(mCachedBluetoothDevice.startPairing()).thenReturn(true); in onClicked_deviceNotBonded_shouldLogBluetoothPairEventAndPairWithoutNameEvent()
283 verify(mCachedBluetoothDevice, never()).unregisterCallback(any()); in onAttached_callbackNotRemoved_doNotRegisterCallback()
[all …]
H A DBluetoothPairingDetailTest.java74 private CachedBluetoothDevice mCachedBluetoothDevice; field in BluetoothPairingDetailTest
238 when(mCachedBluetoothDevice.isConnected()).thenReturn(true); in onProfileConnectionStateChanged_deviceInSelectedListAndConnected_finish()
239 when(mCachedBluetoothDevice.getDevice()).thenReturn(device); in onProfileConnectionStateChanged_deviceInSelectedListAndConnected_finish()
241 mFragment.onProfileConnectionStateChanged(mCachedBluetoothDevice, in onProfileConnectionStateChanged_deviceInSelectedListAndConnected_finish()
252 when(mCachedBluetoothDevice.isConnected()).thenReturn(true); in onProfileConnectionStateChanged_deviceNotInSelectedList_doNothing()
267 when(mCachedBluetoothDevice.isConnected()).thenReturn(false); in onProfileConnectionStateChanged_deviceDisconnected_doNothing()
268 when(mCachedBluetoothDevice.getDevice()).thenReturn(device); in onProfileConnectionStateChanged_deviceDisconnected_doNothing()
284 when(mCachedBluetoothDevice.isConnected()).thenReturn(true); in onProfileConnectionStateChanged_deviceInPreferenceMapAndConnected_removed()
285 when(mCachedBluetoothDevice.getDevice()).thenReturn(device); in onProfileConnectionStateChanged_deviceInPreferenceMapAndConnected_removed()
303 when(mCachedBluetoothDevice.isConnected()).thenReturn(true); in onProfileConnectionStateChanged_deviceNotInPreferenceMap_doNothing()
[all …]
H A DBluetoothDeviceUpdaterTest.java70 private CachedBluetoothDevice mCachedBluetoothDevice; field in BluetoothDeviceUpdaterTest
99 mCachedDevices.add(mCachedBluetoothDevice); in setUp()
101 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
105 when(mCachedBluetoothDevice.getAddress()).thenReturn(MAC_ADDRESS); in setUp()
131 mBluetoothDeviceUpdater.addPreference(mCachedBluetoothDevice); in testAddPreference_deviceExist_doNothing()
138 mBluetoothDeviceUpdater.addPreference(mCachedBluetoothDevice); in testAddPreference_deviceNotExist_addPreference()
149 mBluetoothDeviceUpdater.removePreference(mCachedBluetoothDevice); in testRemovePreference_deviceExist_removePreference()
159 mBluetoothDeviceUpdater.onDeviceDeleted(mCachedBluetoothDevice); in testOnDeviceDeleted_deviceExists_removePreference()
167 mBluetoothDeviceUpdater.removePreference(mCachedBluetoothDevice); in testRemovePreference_deviceNotExist_doNothing()
179 mBluetoothDeviceUpdater.removePreference(mCachedBluetoothDevice); in testRemovePreference_subDeviceExist_removePreference()
[all …]
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/
H A DBluetoothDevicesSliceTest.java78 private CachedBluetoothDevice mCachedBluetoothDevice; field in BluetoothDevicesSliceTest
238 mCachedBluetoothDevice.hashCode()); in onNotifyChange_connectedDevice_shouldActivateDevice()
242 verify(mCachedBluetoothDevice).setActive(); in onNotifyChange_connectedDevice_shouldActivateDevice()
253 mCachedBluetoothDevice.hashCode()); in onNotifyChange_availableDisconnectedDevice_shouldConnectToDevice()
257 verify(mCachedBluetoothDevice).connect(); in onNotifyChange_availableDisconnectedDevice_shouldConnectToDevice()
268 mCachedBluetoothDevice.hashCode()); in onNotifyChange_busyDisconnectedDevice_shouldDoNothing()
272 verify(mCachedBluetoothDevice, never()).setActive(); in onNotifyChange_busyDisconnectedDevice_shouldDoNothing()
273 verify(mCachedBluetoothDevice, never()).connect(); in onNotifyChange_busyDisconnectedDevice_shouldDoNothing()
279 doReturn(device).when(mCachedBluetoothDevice).getDevice(); in mockBluetoothDeviceList()
280 doReturn(BLUETOOTH_MOCK_TITLE).when(mCachedBluetoothDevice).getName(); in mockBluetoothDeviceList()
[all …]
/aosp12/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
H A DBluetoothUtilsTest.java46 private CachedBluetoothDevice mCachedBluetoothDevice; field in BluetoothUtilsTest
64 when(mCachedBluetoothDevice.getBtClass().getMajorDeviceClass()).thenReturn( in getBtClassDrawableWithDescription_typePhone_returnPhoneDrawable()
67 mContext, mCachedBluetoothDevice); in getBtClassDrawableWithDescription_typePhone_returnPhoneDrawable()
74 when(mCachedBluetoothDevice.getBtClass().getMajorDeviceClass()).thenReturn( in getBtClassDrawableWithDescription_typeComputer_returnComputerDrawable()
77 mContext, mCachedBluetoothDevice); in getBtClassDrawableWithDescription_typeComputer_returnComputerDrawable()
86 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in getBtRainbowDrawableWithDescription_normalHeadset_returnAdaptiveIcon()
87 when(mCachedBluetoothDevice.getAddress()).thenReturn("1f:aa:bb"); in getBtRainbowDrawableWithDescription_normalHeadset_returnAdaptiveIcon()
91 mCachedBluetoothDevice).first).isInstanceOf(AdaptiveIcon.class); in getBtRainbowDrawableWithDescription_normalHeadset_returnAdaptiveIcon()
H A DLocalBluetoothProfileManagerTest.java67 private CachedBluetoothDevice mCachedBluetoothDevice; field in LocalBluetoothProfileManagerTest
83 when(mDeviceManager.findDevice(mDevice)).thenReturn(mCachedBluetoothDevice); in setUp()
84 when(mCachedBluetoothDevice.getDevice()).thenReturn(mDevice); in setUp()
166 mCachedBluetoothDevice, BluetoothProfile.STATE_CONNECTED, BluetoothProfile.A2DP); in stateChangedHandler_receiveA2dpConnectionStateChanged_shouldDispatchCallback()
186 verify(mEventManager).dispatchProfileConnectionStateChanged(mCachedBluetoothDevice, in stateChangedHandler_receiveHeadsetConnectionStateChanged_shouldDispatchCallback()
199 when(mCachedBluetoothDevice.getHiSyncId()).thenReturn(HISYNCID); in stateChangedHandler_receiveHAPConnectionStateChanged_shouldDispatchDeviceManager()
208 verify(mDeviceManager).onProfileConnectionStateChangedIfProcessed(mCachedBluetoothDevice, in stateChangedHandler_receiveHAPConnectionStateChanged_shouldDispatchDeviceManager()
250 verify(mCachedBluetoothDevice, never()).refresh(); in stateChangedHandler_receivePanConnectionStateChangedWithoutProfile_shouldNotRefresh()
270 verify(mCachedBluetoothDevice).refresh(); in stateChangedHandler_receivePanConnectionStateChangedWithProfile_shouldRefresh()
H A DBluetoothEventManagerTest.java63 private CachedBluetoothDevice mCachedBluetoothDevice; field in BluetoothEventManagerTest
94 when(mCachedDeviceManager.findDevice(mBluetoothDevice)).thenReturn(mCachedBluetoothDevice); in setUp()
160 mBluetoothEventManager.dispatchProfileConnectionStateChanged(mCachedBluetoothDevice, in dispatchProfileConnectionStateChanged_registerCallback_shouldDispatchCallback()
163 verify(mBluetoothCallback).onProfileConnectionStateChanged(mCachedBluetoothDevice, in dispatchProfileConnectionStateChanged_registerCallback_shouldDispatchCallback()
175 verify(mBluetoothCallback).onAclConnectionStateChanged(mCachedBluetoothDevice, in dispatchAclConnectionStateChanged_aclDisconnected_shouldDispatchCallback()
187 verify(mBluetoothCallback).onAclConnectionStateChanged(mCachedBluetoothDevice, in dispatchAclConnectionStateChanged_aclConnected_shouldDispatchCallback()
200 verify(mBluetoothCallback, never()).onAclConnectionStateChanged(mCachedBluetoothDevice, in dispatchAclConnectionStateChanged_aclDisconnected_shouldNotCallbackSubDevice()
213 verify(mBluetoothCallback, never()).onAclConnectionStateChanged(mCachedBluetoothDevice, in dispatchAclConnectionStateChanged_aclConnected_shouldNotCallbackSubDevice()
226 verify(mBluetoothCallback, never()).onAclConnectionStateChanged(mCachedBluetoothDevice, in dispatchAclConnectionStateChanged_findDeviceReturnNull_shouldNotDispatchCallback()
H A DHearingAidProfileTest.java51 private CachedBluetoothDevice mCachedBluetoothDevice; field in HearingAidProfileTest
65 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
H A DHeadsetProfileTest.java37 private CachedBluetoothDevice mCachedBluetoothDevice; field in HeadsetProfileTest
50 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in setUp()
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/
H A DAccessibilityHearingAidPreferenceControllerTest.java81 private CachedBluetoothDevice mCachedBluetoothDevice; field in AccessibilityHearingAidPreferenceControllerTest
162 when(mCachedBluetoothDevice.getDevice()).thenReturn(mBluetoothDevice); in handleHearingAidPreferenceClick_withHearingAid_launchBluetoothDeviceDetailSetting()
165 verify(mPreferenceController).launchBluetoothDeviceDetailSetting(mCachedBluetoothDevice); in handleHearingAidPreferenceClick_withHearingAid_launchBluetoothDeviceDetailSetting()
209 when(mCachedDeviceManager.findDevice(mBluetoothDevice)).thenReturn(mCachedBluetoothDevice); in setupHearingAidEnvironment()
210 when(mCachedBluetoothDevice.getName()).thenReturn(TEST_DEVICE_NAME); in setupHearingAidEnvironment()
211 when(mCachedBluetoothDevice.isConnectedHearingAidDevice()).thenReturn(true); in setupHearingAidEnvironment()