Home
last modified time | relevance | path

Searched refs:when (Results 1 – 25 of 3281) sorted by relevance

12345678910>>...132

/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/
H A DTypeClassifierTest.java32 import static org.mockito.Mockito.when;
62 when(mDataProvider.isUp()).thenReturn(false); in testPass_QuickSettings()
74 when(mDataProvider.isUp()).thenReturn(false); in testFalse_QuickSettings()
78 when(mDataProvider.isUp()).thenReturn(true); in testFalse_QuickSettings()
85 when(mDataProvider.isUp()).thenReturn(false); in testPass_PulseExpand()
97 when(mDataProvider.isUp()).thenReturn(false); in testFalse_PulseExpand()
101 when(mDataProvider.isUp()).thenReturn(true); in testFalse_PulseExpand()
124 when(mDataProvider.isUp()).thenReturn(true); in testFalse_NotificationDragDown()
136 when(mDataProvider.isUp()).thenReturn(true); in testPass_NotificationDismiss()
144 when(mDataProvider.isUp()).thenReturn(true); in testPass_NotificationDismiss()
[all …]
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/
H A DFakeHdmiCecConfig.java49 doReturn(true).when(resources).getBoolean( in buildResources()
51 doReturn(true).when(resources).getBoolean( in buildResources()
53 doReturn(true).when(resources).getBoolean( in buildResources()
55 doReturn(true).when(resources).getBoolean( in buildResources()
60 doReturn(true).when(resources).getBoolean( in buildResources()
62 doReturn(true).when(resources).getBoolean( in buildResources()
64 doReturn(true).when(resources).getBoolean( in buildResources()
66 doReturn(true).when(resources).getBoolean( in buildResources()
71 doReturn(true).when(resources).getBoolean( in buildResources()
73 doReturn(true).when(resources).getBoolean( in buildResources()
[all …]
/aosp12/packages/apps/Settings/tests/unit/src/com/android/settings/network/
H A DSubscriptionUtilTest.java25 import static org.mockito.Mockito.when;
68 when(mTelMgr.getUiccSlotsInfo()).thenReturn(null); in setUp()
145 when(info1.getSubscriptionId()).thenReturn(SUBID_1); in getUniqueDisplayNames_uniqueCarriers_originalUsed()
146 when(info2.getSubscriptionId()).thenReturn(SUBID_2); in getUniqueDisplayNames_uniqueCarriers_originalUsed()
147 when(info1.getDisplayName()).thenReturn(CARRIER_1); in getUniqueDisplayNames_uniqueCarriers_originalUsed()
148 when(info2.getDisplayName()).thenReturn(CARRIER_2); in getUniqueDisplayNames_uniqueCarriers_originalUsed()
177 when(info1.getDisplayName()).thenReturn(CARRIER_1); in getUniqueDisplayNames_identicalCarriers_fourDigitsUsed()
178 when(info2.getDisplayName()).thenReturn(CARRIER_1); in getUniqueDisplayNames_identicalCarriers_fourDigitsUsed()
206 when(info1.getDisplayName()).thenReturn(CARRIER_1); in getUniqueDisplayNames_identicalCarriersAfterTrim_fourDigitsUsed()
242 when(sub1Telmgr.getLine1Number()).thenReturn(""); in getUniqueDisplayNames_phoneNumberBlocked_subscriptoinIdFallback()
[all …]
/aosp12/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
H A DWifiKeyStoreTest.java32 import static org.mockito.Mockito.when;
91 when(mWifiEnterpriseConfig.getCaCertificates()) in setUp()
250 when(mWifiEnterpriseConfig.getCaCertificates()) in testConfigureSuiteBRsa3072()
278 when(mWifiEnterpriseConfig.getCaCertificates()) in testConfigureSuiteBEcdsa()
306 when(mWifiEnterpriseConfig.getCaCertificates()) in testConfigurationFailureSuiteB()
332 when(mWifiEnterpriseConfig.getCaCertificates()) in testConfigurationFailureSuiteBNon3072Rsa()
620 when(mFrameworkFacade.getWifiKeyGrantAsUser( in testUpdateKeysKeyChainAliasNotGranted()
633 when(mFrameworkFacade.getWifiKeyGrantAsUser( in testUpdateKeysKeyChainAliasGranted()
646 when(mFrameworkFacade.hasWifiKeyGrantAsUser( in testValidateKeyChainAliasNotGranted()
656 when(mFrameworkFacade.hasWifiKeyGrantAsUser( in testValidateKeyChainAliasEmpty()
[all …]
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/people/prediction/
H A DSharesheetModelScorerTest.java26 import static org.mockito.Mockito.when;
168 when(mEventIndex1.getActiveTimeSlots()).thenReturn( in testComputeScore()
172 when(mEventIndex4.getActiveTimeSlots()).thenReturn( in testComputeScore()
174 when(mEventIndex5.getActiveTimeSlots()).thenReturn(List.of()); in testComputeScore()
191 when(mEventIndex8.getActiveTimeSlots()).thenReturn(List.of()); in testComputeScore()
193 when(mEventIndex10.getActiveTimeSlots()).thenReturn(List.of()); in testComputeScore()
219 when(mEventIndex1.getActiveTimeSlots()).thenReturn( in testComputeScoreForAppShare()
223 when(mEventIndex4.getActiveTimeSlots()).thenReturn( in testComputeScoreForAppShare()
225 when(mEventIndex5.getActiveTimeSlots()).thenReturn(List.of()); in testComputeScoreForAppShare()
242 when(mEventIndex8.getActiveTimeSlots()).thenReturn(List.of()); in testComputeScoreForAppShare()
[all …]
/aosp12/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
H A DMultiSimSettingControllerTest.java133 doReturn(0).when(mSubControllerMock).getPhoneId(1); in setUp()
134 doReturn(1).when(mSubControllerMock).getPhoneId(2); in setUp()
136 doReturn(1).when(mPhoneMock1).getSubId(); in setUp()
137 doReturn(2).when(mPhoneMock2).getSubId(); in setUp()
141 doReturn(infoList).when(mSubControllerMock) in setUp()
289 doReturn(2).when(mPhoneMock1).getSubId(); in testSingleActiveDsds()
333 doReturn(2).when(mPhoneMock2).getSubId(); in testActivatingSecondSub()
356 doReturn(3).when(mPhoneMock2).getSubId(); in testActivatingSecondSub()
722 doReturn(3).when(mPhoneMock2).getSubId(); in testCarrierConfigLoading()
751 doReturn(3).when(mPhoneMock2).getSubId(); in testGroupChangeOnInactiveSub_shouldNotMarkAsDefaultDataSub()
[all …]
H A DNetworkTypeControllerTest.java145 TelephonyManager.NETWORK_MODE_NR_LTE_CDMA_EVDO_GSM_WCDMA)).when( in setUp()
149 doReturn(new int[] {0}).when(mServiceState).getCellBandwidths(); in setUp()
250 doReturn(true).when(mServiceState).isUsingCarrierAggregation(); in testUpdateOverrideNetworkTypeLte()
251 doReturn(new int[] {20000}).when(mServiceState).getCellBandwidths(); in testUpdateOverrideNetworkTypeLte()
747 doReturn(true).when(mServiceState).isUsingCarrierAggregation(); in testEventPhysicalChannelChangeFromLteToLteCaInLegacyState()
748 doReturn(new int[] {30000}).when(mServiceState).getCellBandwidths(); in testEventPhysicalChannelChangeFromLteToLteCaInLegacyState()
776 doReturn(true).when(mServiceState).isUsingCarrierAggregation(); in testEventPhysicalChannelChangeFromLteToLteCaInLteConnectedState()
777 doReturn(new int[] {30000}).when(mServiceState).getCellBandwidths(); in testEventPhysicalChannelChangeFromLteToLteCaInLteConnectedState()
805 doReturn(true).when(mServiceState).isUsingCarrierAggregation(); in testEventPhysicalChannelChangeFromLteToLteCaInIdleState()
806 doReturn(new int[] {30000}).when(mServiceState).getCellBandwidths(); in testEventPhysicalChannelChangeFromLteToLteCaInIdleState()
[all …]
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/
H A DAccountPreferenceControllerTest.java30 import static org.mockito.Mockito.when;
113 when(mUserManager.isManagedProfile()).thenReturn(true); in onResume_managedProfile_shouldNotAddAccountCategory()
122 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_linkedUser_shouldAddOneAccountCategory()
135 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_oneProfile_shouldAddOneAccountCategory()
149 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_twoProfiles_shouldAddTwoAccountCategory()
163 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_noProfileChange_shouldNotAddOrRemoveAccountCategory()
179 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_oneNewProfile_shouldAddOneAccountCategory()
197 when(mUserManager.isManagedProfile()).thenReturn(false); in onResume_oneProfileRemoved_shouldRemoveOneAccountCategory()
259 when(mUserManager.isManagedProfile()).thenReturn(true); in updateRawDataToIndex_ManagedProfile_shouldNotUpdate()
311 when(mAccountHelper.hasBaseUserRestriction( in updateDynamicRawDataToIndex_disallowRemove_shouldAddOne()
[all …]
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
H A DLockSettingsShellCommandTest.java35 import static org.mockito.Mockito.when;
103 when(mLockPatternUtils.checkCredential( in testWrongPassword()
118 when(mLockPatternUtils.checkCredential( in testChangePin()
138 when(mLockPatternUtils.checkCredential( in testChangePin_nonCompliant()
165 when(mLockPatternUtils.checkCredential( in testChangePassword()
185 when(mLockPatternUtils.checkCredential( in testChangePassword_nonCompliant()
210 when(mLockPatternUtils.checkCredential( in testChangePattern()
229 when(mLockPatternUtils.checkCredential( in testChangePattern_nonCompliant()
255 when(mLockPatternUtils.checkCredential( in testClear()
274 when(mLockPatternUtils.checkCredential( in testClear_nonCompliant()
[all …]
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
H A DDozeConfigurationUtil.java21 import static org.mockito.Mockito.when;
37 when(params.getPulseOnSigMotion()).thenReturn(false); in createMockParameters()
38 when(params.getPickupVibrationThreshold()).thenReturn(0); in createMockParameters()
39 when(params.getProxCheckBeforePulse()).thenReturn(true); in createMockParameters()
44 when(params.longPressUsesProx()).thenReturn(true); in createMockParameters()
60 when(config.enabled(anyInt())).thenReturn(true); in createMockConfig()
63 when(config.doubleTapSensorType()).thenReturn(null); in createMockConfig()
64 when(config.longPressSensorType()).thenReturn(null); in createMockConfig()
66 when(config.quickPickupSensorType()).thenReturn(null); in createMockConfig()
69 when(config.tapSensorAvailable()).thenReturn(true); in createMockConfig()
[all …]
/aosp12/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/
H A DOneHandedControllerTest.java34 import static org.mockito.Mockito.when;
113 when(mMockDisplayAreaOrganizer.isReady()).thenReturn(true); in setUp()
114 when(mMockBackgroundOrganizer.isRegistered()).thenReturn(true); in setUp()
313 when(mMockDisplayAreaOrganizer.isReady()).thenReturn(true); in testRotation180CanStartOneHanded()
401 when(mSpiedTransitionState.getState()).thenReturn(STATE_NONE); in testStateNotActive_shortcutRequestInActivate_skipAction()
413 when(mSpiedTransitionState.getState()).thenReturn(STATE_NONE); in testStateNotActive_shortcutRequestActivate_doAction()
449 when(mSpiedTransitionState.getState()).thenReturn(STATE_NONE); in testOneHandedDisabled_shortcutTrigger_thenAutoEnabled()
462 when(mSpiedTransitionState.getState()).thenReturn(STATE_NONE); in testControllerInit_tutorialAddStateChangeListener()
472 when(mSpiedTransitionState.getState()).thenReturn(STATE_NONE); in testNotifyEventCallbackWithMainExecutor()
485 when(mSpiedTransitionState.getState()).thenReturn(STATE_NONE); in testNotifyShortcutState_whenSetOneHandedEnabled()
[all …]
/aosp12/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/window/
H A DOverlayViewGlobalStateControllerTest.java28 import static org.mockito.Mockito.when;
501 when(mOverlayViewController2.isInflated()).thenReturn(false); in showView_viewControllerNotInflated_inflateViewController()
538 when(mOverlayViewController2.isInflated()).thenReturn(false); in hideView_viewControllerNotInflated_hideRunnableNotCalled()
547 when(mOverlayViewController2.isInflated()).thenReturn(true); in hideView_nothingShown_hideRunnableNotCalled()
559 when(mOverlayViewController2.isInflated()).thenReturn(true); in hideView_viewControllerNotShown_hideRunnableNotCalled()
952 when(mOverlayViewController2.isInflated()).thenReturn(true); in inflateView_alreadyInflated_doesNotInflate()
1042 when(overlayViewController.getLayout()).thenReturn(layout); in setupOverlayViewController()
1043 when(overlayViewController.isInflated()).thenReturn(true); in setupOverlayViewController()
1044 when(overlayViewController.getInsetSidesToFit()).thenReturn( in setupOverlayViewController()
1054 when(overlayViewController.getLayout()).thenReturn(layout); in setOverlayViewControllerAsShowing()
[all …]
/aosp12/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/metrics/
H A DVoiceCallSessionStatsTest.java150 doReturn(true).when(mPhysicalSlot).isActive(); in setUp()
153 doReturn(true).when(mEmptySlot).isActive(); in setUp()
155 doReturn(true).when(mEsimSlot).isActive(); in setUp()
157 doReturn(true).when(mEsimSlot).isEuicc(); in setUp()
1282 .when(mGsmConnection0) in singleCsCall_moRejected()
1459 .when(mGsmConnection0) in singleCsCall_mtRejected()
1775 .when(mImsPhone) in concurrentCalls_srvcc()
2011 .when(mPersistAtomsStorage) in setupRatUsageCapture()
2021 doReturn(regInfo).when(mock) in setServiceState()
2031 doReturn(wwanRegInfo).when(mock) in setServiceStateWithWifiCalling()
[all …]
/aosp12/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/
H A DMainFragmentTest.java71 doReturn(false).when(listener).isCellConnected(); in testUpdateConnectivity_NoNetwork()
88 doReturn(false).when(listener).isCellConnected(); in testUpdateConnectivity_hasEthernet()
125 doReturn(true).when(listener).isWifiConnected(); in testUpdateConnectivity_wifiSignal()
230 doReturn(accountsPref).when(mMainFragment) in testUpdateAccountPrefInfo_hasOneAccount()
232 doReturn(true).when(accountsPref).isVisible(); in testUpdateAccountPrefInfo_hasOneAccount()
246 doReturn(accountsPref).when(mMainFragment) in testUpdateAccountPrefInfo_hasNoAccount()
248 doReturn(true).when(accountsPref).isVisible(); in testUpdateAccountPrefInfo_hasNoAccount()
262 doReturn(accountsPref).when(mMainFragment) in testUpdateAccountPrefInfo_hasMoreThanOneAccount()
264 doReturn(true).when(accountsPref).isVisible(); in testUpdateAccountPrefInfo_hasMoreThanOneAccount()
281 doReturn(accessoryPref).when(mMainFragment) in testUpdateAccessoryPref_hasNoAccessory()
[all …]
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/telephony/
H A DBluetoothInCallServiceTest.java129 doReturn(null).when(mMockCallInfo) in setUp()
236 when(mMockTelephonyManager.getLine1Number()) in testGetSubscriberNumberFallbackToTelephony()
340 when(confCall2.isIncoming()).thenReturn(true); in testConferenceInProgressCDMA()
341 when(confCall1.getGatewayInfo()).thenReturn( in testConferenceInProgressCDMA()
343 when(confCall2.getGatewayInfo()).thenReturn( in testConferenceInProgressCDMA()
404 when(heldCall.isIncoming()).thenReturn(true); in testListCurrentCallsCdmaHold()
407 when(heldCall.getGatewayInfo()).thenReturn( in testListCurrentCallsCdmaHold()
456 when(confCall2.isIncoming()).thenReturn(true); in testListCurrentCallsCdmaConference()
457 when(confCall1.getGatewayInfo()).thenReturn( in testListCurrentCallsCdmaConference()
459 when(confCall2.getGatewayInfo()).thenReturn( in testListCurrentCallsCdmaConference()
[all …]
/aosp12/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/
H A DPhonePolicyTest.java85 doReturn(mA2dpService).when(mServiceFactory).getA2dpService(); in setUp()
92 doReturn(true).when(mAdapterService).isMock(); in setUp()
116 when(mHeadsetService.getConnectionPolicy(device)) in testProcessInitProfilePriorities()
120 when(mA2dpService.getConnectionPolicy(device)) in testProcessInitProfilePriorities()
486 when(mA2dpService.getConnectionPolicy(testDevice)) in testSetConnectionPolicyMultipleDevices()
493 when(mA2dpService.getConnectionPolicy(testDevice)) in testSetConnectionPolicyMultipleDevices()
670 when(mHeadsetService.getConnectedDevices()).thenReturn( in testNoReconnectOnNoConnect_MultiDevice()
672 when(mA2dpService.getConnectedDevices()).thenReturn( in testNoReconnectOnNoConnect_MultiDevice()
725 when(mHeadsetService.getConnectedDevices()).thenReturn( in testReconnectOnPartialConnect_MultiDevice()
755 when(mHeadsetService.getConnectionPolicy(device)) in testNoSupportedUuids()
[all …]
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
H A DSavedBluetoothDeviceUpdaterTest.java25 import static org.mockito.Mockito.when;
107 doReturn(false).when(mBluetoothDevice).isConnected(); in update_filterMatch_addPreference()
118 doReturn(true).when(mBluetoothDevice).isConnected(); in update_filterNotMatch_removePreference()
127 when(mBluetoothDevice.isConnected()).thenReturn(true); in onProfileConnectionStateChanged_deviceConnected_removePreference()
137 when(mBluetoothDevice.isConnected()).thenReturn(false); in onProfileConnectionStateChanged_deviceDisconnected_addPreference()
167 when(mBluetoothAdapter.isEnabled()).thenReturn(true); in forceUpdate_findCachedBluetoothDeviceIsMatched_addPreference()
185 when(mBluetoothAdapter.isEnabled()).thenReturn(true); in forceUpdate_findCachedBluetoothDeviceNotMatched_removePreference()
190 when(mBluetoothDevice.isConnected()).thenReturn(true); in forceUpdate_findCachedBluetoothDeviceNotMatched_removePreference()
202 when(mBluetoothAdapter.isEnabled()).thenReturn(true); in forceUpdate_notFindCachedBluetoothDevice_doNothing()
237 when(cachedDevice2.getDevice()).thenReturn(device2); in forceUpdate_deviceNotContain_removePreference()
[all …]
/aosp12/packages/apps/CellBroadcastReceiver/tests/unit/src/com/android/cellbroadcastreceiver/unit/
H A DCellBroadcastReceiverTest.java127 doReturn(false).when(mUserManager).isSystemUser(); in setUp()
144 doReturn(true).when(mIntent) in testOnReceive_actionCarrierConfigChangedOnRebroadcast()
173 .when(mIntent).getAction(); in testOnReceive_actionDefaultSmsSubscriptionChanged()
195 doReturn(null).when(mContext).startService(any()); in testOnReceive_smsCbReceivedAction()
205 .when(mIntent).getAction(); in testOnReceive_smsServiceCategoryProgramDataReceivedAction()
215 doReturn(true).when(mUserManager).isSystemUser(); in testInitializeSharedPreference_ifSystemUser_invalidSub()
235 doReturn(true).when(mUserManager).isSystemUser(); in testInitializeSharedPreference_ifSystemUser_firstSub()
268 doReturn(true).when(mUserManager).isSystemUser(); in testInitializeSharedPreference_ifSystemUser_carrierChange()
313 doReturn(null).when(mContentProviderClient).call( in testMigrateSharedPreferenceFromLegacyWhenBundleNull()
367 doReturn(true).when(mResources) in testEnableLauncherIfEnableTrue()
[all …]
/aosp12/packages/apps/Settings/tests/unit/src/com/android/settings/deviceinfo/simstatus/
H A DSimStatusDialogControllerTest.java46 import static org.mockito.Mockito.when;
129 when(mDialog.getContext()).thenReturn(mContext); in setup()
169 doReturn(0).when(mCellSignalStrengthCdma).getDbm(); in setup()
171 doReturn(0).when(mCellSignalStrengthLte).getDbm(); in setup()
184 when(mEuiccManager.isEnabled()).thenReturn(false); in setup()
436 when(mEuiccManager.isEnabled()).thenReturn(true); in initialize_updateEid_shouldNotSetEid()
475 when(mEuiccManager.isEnabled()).thenReturn(true); in initialize_updateEid_shouldSetEidFromCard()
515 when(mEuiccManager.isEnabled()).thenReturn(true); in initialize_updateEid_shouldSetEidFromManager()
518 when(mEuiccManager.createForCardId(0)).thenThrow( in initialize_updateEid_shouldSetEidFromManager()
558 when(mEuiccManager.isEnabled()).thenReturn(true); in initialize_updateEid_shouldRemoveEid()
[all …]
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/globalactions/
H A DGlobalActionsColumnLayoutTest.java83 doReturn(50f).when(mColumnLayout).getAnimationDistance(); in testGetAnimationOffsetX()
97 doReturn(50f).when(mColumnLayout).getAnimationDistance(); in testGetAnimationOffsetY()
140 doReturn(true).when(mColumnLayout).shouldSnapToPowerButton(); in testUpdateSnap_snapThenSnap()
174 doReturn(1000).when(mColumnLayout).getMeasuredHeight(); in testShouldSnapToPowerButton_vertical()
176 doReturn(wrapper).when(mColumnLayout).getWrapper(); in testShouldSnapToPowerButton_vertical()
177 doReturn(500).when(wrapper).getMeasuredHeight(); in testShouldSnapToPowerButton_vertical()
181 doReturn(600).when(mColumnLayout).getMeasuredHeight(); in testShouldSnapToPowerButton_vertical()
190 doReturn(1000).when(mColumnLayout).getMeasuredWidth(); in testShouldSnapToPowerButton_horizontal()
192 doReturn(wrapper).when(mColumnLayout).getWrapper(); in testShouldSnapToPowerButton_horizontal()
193 doReturn(500).when(wrapper).getMeasuredWidth(); in testShouldSnapToPowerButton_horizontal()
[all …]
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/
H A DNotificationSwipeHelperTest.java28 import static org.mockito.Mockito.when;
152 doNothing().when(mSwipeHelper).initializeRow(any()); in testOnDownUpdate_ExpandableNotificationRow()
441 doReturn(5f).when(mEvent).getRawX(); in testIsTouchInView()
442 doReturn(10f).when(mEvent).getRawY(); in testIsTouchInView()
444 doReturn(20).when(mView).getWidth(); in testIsTouchInView()
445 doReturn(20).when(mView).getHeight(); in testIsTouchInView()
458 doReturn(50f).when(mEvent).getRawX(); in testIsTouchInView()
469 doReturn(5f).when(mEvent).getRawX(); in testIsTouchInView_expandable()
470 doReturn(10f).when(mEvent).getRawY(); in testIsTouchInView_expandable()
472 doReturn(20).when(mNotificationRow).getWidth(); in testIsTouchInView_expandable()
[all …]
/aosp12/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
H A DShortcutHelperTest.java27 import static org.mockito.Mockito.when;
255 when(si.getPackage()).thenReturn(PKG); in testGetValidShortcutInfo_notLongLived()
259 when(si.isEnabled()).thenReturn(true); in testGetValidShortcutInfo_notLongLived()
273 when(si.getPackage()).thenReturn(PKG); in testGetValidShortcutInfo_notSharingShortcut()
277 when(si.isEnabled()).thenReturn(true); in testGetValidShortcutInfo_notSharingShortcut()
290 when(si.getPackage()).thenReturn(PKG); in testGetValidShortcutInfo_notEnabled()
294 when(si.isEnabled()).thenReturn(false); in testGetValidShortcutInfo_notEnabled()
307 when(si.getPackage()).thenReturn(PKG); in testGetValidShortcutInfo_isValid()
311 when(si.isEnabled()).thenReturn(true); in testGetValidShortcutInfo_isValid()
328 when(si.getPackage()).thenReturn(PKG); in testGetValidShortcutInfo_isValidButUserLocked()
[all …]
/aosp12/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
H A DHearingAidDeviceManagerTest.java24 import static org.mockito.Mockito.when;
76 when(mDevice1.getName()).thenReturn(DEVICE_NAME_1); in setUp()
77 when(mDevice2.getName()).thenReturn(DEVICE_NAME_2); in setUp()
78 when(mDevice1.getAlias()).thenReturn(DEVICE_ALIAS_1); in setUp()
79 when(mDevice2.getAlias()).thenReturn(DEVICE_ALIAS_2); in setUp()
154 when(mCachedDevice1.isConnected()).thenReturn(true); in updateHearingAidsDevices_firstPairedDevicesConnected_verifySubDevice()
178 when(mCachedDevice2.isConnected()).thenReturn(true); in updateHearingAidsDevices_secondPairedDeviceConnected_verifySubDevice()
199 when(mCachedDevice1.isConnected()).thenReturn(true); in updateHearingAidsDevices_BothConnected_verifySubDevice()
200 when(mCachedDevice2.isConnected()).thenReturn(true); in updateHearingAidsDevices_BothConnected_verifySubDevice()
231 when(mHearingAidProfile.getHiSyncId(mDevice1)). in updateHearingAidsDevices_invalidHiSyncId_doNothing()
[all …]
/aosp12/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/
H A DNotificationMenuRowTest.java30 import static org.mockito.Mockito.when;
69 when(mRow.getEntry()).thenReturn(entry); in setup()
160 when(row.isMenuOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide()
170 when(row.isMenuOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide()
174 when(row.isMenuOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide()
191 doReturn(30).when(row).getSpaceForMenu(); in testGetMenuSnapTarget()
290 when(row.getParent()).thenReturn(parent); in testCanBeDismissed()
330 doNothing().when(row).cancelDrag(); in onSnapBack()
368 doNothing().when(row).cancelDrag(); in testOnDismiss()
385 doNothing().when(row).beginDrag(); in testOnDown()
[all …]
/aosp12/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/
H A DDefaultAppsPreferenceControllerTest.java23 import static org.mockito.Mockito.when;
67 when(mContext.getPackageManager()).thenReturn(mPackageManager); in setUp()
90 when(mRoleManager.getRoleHolders(RoleManager.ROLE_BROWSER)).thenReturn( in getSummary_allAvailable_shouldReturnAll()
92 when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn( in getSummary_allAvailable_shouldReturnAll()
94 when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn( in getSummary_allAvailable_shouldReturnAll()
104 when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn( in getSummary_browserAndDialerAvailable_shouldReturnBrowserAndDialer()
115 when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn( in getSummary_browserAndSmsAvailable_shouldReturnBrowserAndSms()
117 when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn( in getSummary_browserAndSmsAvailable_shouldReturnBrowserAndSms()
127 when(mRoleManager.getRoleHolders(RoleManager.ROLE_DIALER)).thenReturn( in getSummary_dialerAndSmsAvailable_shouldReturnDialerAndSms()
129 when(mRoleManager.getRoleHolders(RoleManager.ROLE_SMS)).thenReturn( in getSummary_dialerAndSmsAvailable_shouldReturnDialerAndSms()
[all …]

12345678910>>...132