Home
last modified time | relevance | path

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

12345678910>>...60

/frameworks/base/services/tests/servicestests/src/com/android/server/hdmi/
DFakeHdmiCecConfig.java42 doReturn(buildResources(context)).when(contextSpy).getResources(); in buildContext()
49 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()
57 doReturn(false).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()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/
DTypeClassifierTest.java34 import static org.mockito.Mockito.when;
63 when(mDataProvider.isVertical()).thenReturn(true); in testPass_QuickSettings()
64 when(mDataProvider.isUp()).thenReturn(false); in testPass_QuickSettings()
66 when(mDataProvider.isRight()).thenReturn(false); // right should cause no effect. in testPass_QuickSettings()
69 when(mDataProvider.isRight()).thenReturn(true); in testPass_QuickSettings()
75 when(mDataProvider.isVertical()).thenReturn(false); in testFalse_QuickSettings()
76 when(mDataProvider.isUp()).thenReturn(false); in testFalse_QuickSettings()
79 when(mDataProvider.isVertical()).thenReturn(true); in testFalse_QuickSettings()
80 when(mDataProvider.isUp()).thenReturn(true); in testFalse_QuickSettings()
86 when(mDataProvider.isVertical()).thenReturn(true); in testPass_PulseExpand()
[all …]
DDiagonalClassifierTest.java25 import static org.mockito.Mockito.when;
72 when(mDataProvider.getAngle()).thenReturn(Float.MAX_VALUE); in testPass_UnknownAngle()
78 when(mDataProvider.getAngle()).thenReturn(UP_IN_RADIANS); in testPass_VerticalSwipe()
81 when(mDataProvider.getAngle()).thenReturn(DOWN_IN_RADIANS); in testPass_VerticalSwipe()
87 when(mDataProvider.getAngle()).thenReturn(UP_IN_RADIANS + 2 * FIVE_DEG_IN_RADIANS); in testPass_MostlyVerticalSwipe()
90 when(mDataProvider.getAngle()).thenReturn(UP_IN_RADIANS - 2 * FIVE_DEG_IN_RADIANS); in testPass_MostlyVerticalSwipe()
93 when(mDataProvider.getAngle()).thenReturn(DOWN_IN_RADIANS + 2 * FIVE_DEG_IN_RADIANS); in testPass_MostlyVerticalSwipe()
96 when(mDataProvider.getAngle()).thenReturn(DOWN_IN_RADIANS - 2 * FIVE_DEG_IN_RADIANS * 2); in testPass_MostlyVerticalSwipe()
102 when(mDataProvider.getAngle()).thenReturn( in testPass_BarelyVerticalSwipe()
106 when(mDataProvider.getAngle()).thenReturn( in testPass_BarelyVerticalSwipe()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/metrics/
DPerSimStatusTest.java82 doReturn(0).when(mPhone).getPhoneId(); in onPullAtom_perSimStatus()
83 doReturn(1).when(mPhone).getSubId(); in onPullAtom_perSimStatus()
84 doReturn(100).when(mPhone).getCarrierId(); in onPullAtom_perSimStatus()
86 .when(mSubscriptionManagerService) in onPullAtom_perSimStatus()
89 .when(mSubscriptionManagerService) in onPullAtom_perSimStatus()
92 .when(mSubscriptionManagerService) in onPullAtom_perSimStatus()
95 doReturn("us").when(subscriptionInfo1).getCountryIso(); in onPullAtom_perSimStatus()
97 .setCountryIso("us").build()).when(mSubscriptionManagerService) in onPullAtom_perSimStatus()
102 doReturn(imsMmTelManager1).when(imsManager).getImsMmTelManager(1); in onPullAtom_perSimStatus()
103 doReturn(true).when(imsMmTelManager1).isAdvancedCallingSettingEnabled(); in onPullAtom_perSimStatus()
[all …]
DVoiceCallSessionStatsTest.java162 doReturn(CARRIER_ID_SLOT_0).when(mPhone).getCarrierId(); in setUp()
164 doReturn(CARRIER_ID_SLOT_1).when(mSecondPhone).getCarrierId(); in setUp()
165 doReturn(mContext).when(mSecondPhone).getContext(); in setUp()
166 doReturn(mSignalStrength).when(mSecondPhone).getSignalStrength(); in setUp()
167 doReturn(mSecondServiceStateTracker).when(mSecondPhone).getServiceStateTracker(); in setUp()
168 doReturn(mSecondServiceState).when(mSecondServiceStateTracker).getServiceState(); in setUp()
173 doReturn(true).when(mPhysicalSlot).isActive(); in setUp()
174 doReturn(CardState.CARDSTATE_PRESENT).when(mPhysicalSlot).getCardState(); in setUp()
175 doReturn(false).when(mPhysicalSlot).isEuicc(); in setUp()
176 doReturn(true).when(mEmptySlot).isActive(); in setUp()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
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()
40 when(params.doubleTapReportsTouchCoordinates()).thenReturn(false); in createMockParameters()
41 when(params.getDisplayNeedsBlanking()).thenReturn(false); in createMockParameters()
42 when(params.getSelectivelyRegisterSensorsUsingProx()).thenReturn(false); in createMockParameters()
43 when(params.singleTapUsesProx(anyInt())).thenReturn(true); in createMockParameters()
44 when(params.longPressUsesProx()).thenReturn(true); in createMockParameters()
45 when(params.getQuickPickupAodDuration()).thenReturn(500); in createMockParameters()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/people/prediction/
DSharesheetModelScorerTest.java26 import static org.mockito.Mockito.when;
163 when(mEventHistory1.getEventIndex(anySet())).thenReturn(mEventIndex1); in testComputeScore()
164 when(mEventHistory2.getEventIndex(anySet())).thenReturn(mEventIndex2); in testComputeScore()
165 when(mEventHistory3.getEventIndex(anySet())).thenReturn(mEventIndex3); in testComputeScore()
166 when(mEventHistory4.getEventIndex(anySet())).thenReturn(mEventIndex4); in testComputeScore()
167 when(mEventHistory5.getEventIndex(anySet())).thenReturn(mEventIndex5); in testComputeScore()
169 when(mEventIndex1.getActiveTimeSlots()).thenReturn( in testComputeScore()
171 when(mEventIndex2.getActiveTimeSlots()).thenReturn(List.of(TWO_DAYS_AGO, TWELVE_DAYS_AGO)); in testComputeScore()
172 when(mEventIndex3.getActiveTimeSlots()).thenReturn(List.of(FIVE_DAYS_AGO, TWENTY_DAYS_AGO)); in testComputeScore()
173 when(mEventIndex4.getActiveTimeSlots()).thenReturn( in testComputeScore()
[all …]
DShareTargetPredictorTest.java30 import static org.mockito.Mockito.when;
116 when(mDataManager.getShareShortcuts(any(), anyInt())).thenReturn(mShareShortcuts); in setUp()
117 when(mDataManager.getPackage(PACKAGE_1, USER_ID)).thenReturn(mPackageData1); in setUp()
118 when(mDataManager.getPackage(PACKAGE_2, USER_ID)).thenReturn(mPackageData2); in setUp()
119 when(mContext.createContextAsUser(any(), any())).thenReturn(mContext); in setUp()
120 when(mContext.getSystemServiceName(AppPredictionManager.class)).thenReturn( in setUp()
122 when(mContext.getSystemService(AppPredictionManager.class)) in setUp()
155 when(mPackageData1.getConversationInfo("sc1")).thenReturn(mock(ConversationInfo.class)); in testPredictTargets()
156 when(mPackageData1.getConversationInfo("sc2")).thenReturn(mock(ConversationInfo.class)); in testPredictTargets()
157 when(mPackageData2.getConversationInfo("sc3")).thenReturn(mock(ConversationInfo.class)); in testPredictTargets()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/
DNotificationSwipeHelperTest.java34 import static org.mockito.Mockito.when;
130 doNothing().when(mSwipeHelper).setExposedMenuView(mView); in testClearExposedMenuView()
146 doNothing().when(mSwipeHelper).setTranslatingParentView(null); in testClearTranslatingParentView()
165 doNothing().when(mSwipeHelper).setCurrentMenuRow(null); in testClearCurrentMenuRow()
172 when(mSwipeHelper.getHandler()).thenReturn(mHandler); in testOnDownUpdate_ExpandableNotificationRow()
173 when(mSwipeHelper.getFalsingCheck()).thenReturn(mFalsingCheck); in testOnDownUpdate_ExpandableNotificationRow()
174 doNothing().when(mSwipeHelper).resetExposedMenuView(true, false); in testOnDownUpdate_ExpandableNotificationRow()
175 doNothing().when(mSwipeHelper).clearCurrentMenuRow(); in testOnDownUpdate_ExpandableNotificationRow()
176 doNothing().when(mSwipeHelper).initializeRow(any()); in testOnDownUpdate_ExpandableNotificationRow()
188 when(mSwipeHelper.getHandler()).thenReturn(mHandler); in testOnDownUpdate_notExpandableNotificationRow()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DLockSettingsShellCommandTest.java37 import static org.mockito.Mockito.when;
98 when(mLockPatternUtils.hasSecureLockScreen()).thenReturn(true); in setUp()
103 when(mLockPatternUtils.isSecure(mUserId)).thenReturn(true); in testWrongPassword()
104 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false); in testWrongPassword()
105 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true); in testWrongPassword()
106 when(mLockPatternUtils.checkCredential( in testWrongPassword()
116 when(mLockPatternUtils.isSecure(mUserId)).thenReturn(true); in testChangePin()
117 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false); in testChangePin()
118 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true); in testChangePin()
119 when(mLockPatternUtils.getKeyguardStoredPasswordQuality(mUserId)).thenReturn( in testChangePin()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/globalactions/
DGlobalActionsColumnLayoutTest.java58 doReturn(View.LAYOUT_DIRECTION_LTR).when(mColumnLayout).getCurrentLayoutDirection(); in testShouldReverseListItems()
60 doReturn(RotationUtils.ROTATION_LANDSCAPE).when(mColumnLayout).getCurrentRotation(); in testShouldReverseListItems()
63 doReturn(RotationUtils.ROTATION_NONE).when(mColumnLayout).getCurrentRotation(); in testShouldReverseListItems()
66 doReturn(RotationUtils.ROTATION_SEASCAPE).when(mColumnLayout).getCurrentRotation(); in testShouldReverseListItems()
69 doReturn(View.LAYOUT_DIRECTION_RTL).when(mColumnLayout).getCurrentLayoutDirection(); in testShouldReverseListItems()
71 doReturn(RotationUtils.ROTATION_LANDSCAPE).when(mColumnLayout).getCurrentRotation(); in testShouldReverseListItems()
74 doReturn(RotationUtils.ROTATION_NONE).when(mColumnLayout).getCurrentRotation(); in testShouldReverseListItems()
77 doReturn(RotationUtils.ROTATION_SEASCAPE).when(mColumnLayout).getCurrentRotation(); in testShouldReverseListItems()
83 doReturn(50f).when(mColumnLayout).getAnimationDistance(); in testGetAnimationOffsetX()
85 doReturn(RotationUtils.ROTATION_NONE).when(mColumnLayout).getCurrentRotation(); in testGetAnimationOffsetX()
[all …]
DGlobalActionsLayoutTest.java161 doReturn(0).when(mAdapter).countSeparatedItems(); in testOnUpdateList_noItems()
162 doReturn(0).when(mAdapter).countListItems(); in testOnUpdateList_noItems()
173 doReturn(1).when(mAdapter).countSeparatedItems(); in testOnUpdateList_oneSeparatedOneList()
174 doReturn(1).when(mAdapter).countListItems(); in testOnUpdateList_oneSeparatedOneList()
178 doReturn(view1).when(mAdapter).getView(eq(0), any(), any()); in testOnUpdateList_oneSeparatedOneList()
179 doReturn(true).when(mAdapter).shouldBeSeparated(0); in testOnUpdateList_oneSeparatedOneList()
181 doReturn(view2).when(mAdapter).getView(eq(1), any(), any()); in testOnUpdateList_oneSeparatedOneList()
182 doReturn(false).when(mAdapter).shouldBeSeparated(1); in testOnUpdateList_oneSeparatedOneList()
195 doReturn(2).when(mAdapter).countSeparatedItems(); in testOnUpdateList_twoSeparatedItems()
196 doReturn(0).when(mAdapter).countListItems(); in testOnUpdateList_twoSeparatedItems()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/wifi/
DWifiStatusTrackerTest.java24 import static org.mockito.Mockito.when;
88 when(primaryWifiInfo.makeCopy(anyLong())).thenReturn(primaryWifiInfo); in testWifiInfoClearedOnPrimaryNetworkLost()
89 when(primaryWifiInfo.isPrimary()).thenReturn(true); in testWifiInfoClearedOnPrimaryNetworkLost()
91 when(primaryWifiInfo.getRssi()).thenReturn(primaryRssi); in testWifiInfoClearedOnPrimaryNetworkLost()
99 when(primaryNetwork.getNetId()).thenReturn(primaryNetworkId); in testWifiInfoClearedOnPrimaryNetworkLost()
108 when(nonPrimaryWifiInfo.makeCopy(anyLong())).thenReturn(nonPrimaryWifiInfo); in testWifiInfoClearedOnPrimaryNetworkLost()
109 when(nonPrimaryWifiInfo.isPrimary()).thenReturn(false); in testWifiInfoClearedOnPrimaryNetworkLost()
111 when(primaryWifiInfo.getRssi()).thenReturn(nonPrimaryRssi); in testWifiInfoClearedOnPrimaryNetworkLost()
119 when(nonPrimaryNetwork.getNetId()).thenReturn(nonPrimaryNetworkId); in testWifiInfoClearedOnPrimaryNetworkLost()
143 when(primaryWifiInfo.isPrimary()).thenReturn(true); in isCarrierMerged_typicalWifi_false()
[all …]
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/
DOneHandedControllerTest.java35 import static org.mockito.Mockito.when;
113 when(mMockDisplayController.getDisplay(anyInt())).thenReturn(mDisplay); in setUp()
114 when(mMockDisplayController.getDisplayLayout(anyInt())).thenReturn(null); in setUp()
115 when(mMockDisplayAreaOrganizer.getDisplayAreaTokenMap()).thenReturn(new ArrayMap<>()); in setUp()
116 when(mMockDisplayAreaOrganizer.isReady()).thenReturn(true); in setUp()
117 when(mMockSettingsUitl.getSettingsOneHandedModeEnabled(any(), anyInt())).thenReturn( in setUp()
119 when(mMockSettingsUitl.getSettingsOneHandedModeTimeout(any(), anyInt())).thenReturn( in setUp()
121 when(mMockSettingsUitl.getSettingsTapsAppToExit(any(), anyInt())).thenReturn( in setUp()
123 when(mMockSettingsUitl.getSettingsSwipeToNotificationEnabled(any(), anyInt())).thenReturn( in setUp()
125 when(mMockSettingsUitl.getShortcutEnabled(any(), anyInt())).thenReturn(false); in setUp()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DBiometricsUnlockControllerTest.java34 import static org.mockito.Mockito.when;
138 when(mKeyguardStateController.isShowing()).thenReturn(true); in setUp()
139 when(mUpdateMonitor.isDeviceInteractive()).thenReturn(true); in setUp()
140 when(mKeyguardStateController.isFaceAuthEnabled()).thenReturn(true); in setUp()
141 when(mKeyguardStateController.isUnlocked()).thenReturn(false); in setUp()
142 when(mKeyguardBypassController.onBiometricAuthenticated(any(), anyBoolean())) in setUp()
144 when(mAuthController.isUdfpsFingerDown()).thenReturn(false); in setUp()
145 when(mVibratorHelper.hasVibrator()).thenReturn(true); in setUp()
148 when(mUpdateMonitor.getStrongAuthTracker()).thenReturn(mStrongAuthTracker); in setUp()
149 when(mStatusBarKeyguardViewManager.getViewRootImpl()).thenReturn(mViewRootImpl); in setUp()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/
DNotificationMenuRowTest.java29 import static org.mockito.Mockito.when;
68 when(mRow.getEntry()).thenReturn(entry); in setup()
102 when(mRow.getShowSnooze()).thenReturn(false); in testNoAppOpsInSlowSwipe()
115 when(mRow.getShowSnooze()).thenReturn(false); in testNoSnoozeInSlowSwipe()
128 when(mRow.getShowSnooze()).thenReturn(true); in testSnoozeInSlowSwipe()
141 when(mRow.getShowSnooze()).thenReturn(true); in testSlowSwipe_newDismiss()
157 when(row.isMenuVisible()).thenReturn(true); in testIsSnappedAndOnSameSide()
158 when(row.isMenuSnapped()).thenReturn(true); in testIsSnappedAndOnSameSide()
159 when(row.isMenuOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide()
160 when(row.isMenuSnappedOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/dialog/
DMediaOutputDialogTest.java25 import static org.mockito.Mockito.when;
117 when(mLocalBluetoothManager.getProfileManager()).thenReturn(mLocalBluetoothProfileManager); in setUp()
118 when(mLocalBluetoothProfileManager.getLeAudioBroadcastProfile()).thenReturn(null); in setUp()
119 when(mMediaController.getPlaybackState()).thenReturn(mPlaybackState); in setUp()
120 when(mPlaybackState.getState()).thenReturn(PlaybackState.STATE_NONE); in setUp()
121 when(mMediaController.getPackageName()).thenReturn(TEST_PACKAGE); in setUp()
122 when(mMediaController.getMetadata()).thenReturn(mMediaMetadata); in setUp()
123 when(mMediaMetadata.getDescription()).thenReturn(mMediaDescription); in setUp()
126 when(mUserTracker.getUserHandle()).thenReturn(userHandle); in setUp()
127 when(mMediaSessionManager.getActiveSessionsForUser(any(), in setUp()
[all …]
DMediaOutputControllerTest.java34 import static org.mockito.Mockito.when;
184 when(mUserTracker.getUserHandle()).thenReturn(userHandle); in setUp()
185 when(mSessionMediaController.getPackageName()).thenReturn(TEST_PACKAGE_NAME); in setUp()
186 when(mSessionMediaController.getPlaybackState()).thenReturn(mPlaybackState); in setUp()
188 when(mMediaSessionManager.getActiveSessionsForUser(any(), in setUp()
191 doReturn(mMediaSessionManager).when(mSpyContext).getSystemService( in setUp()
193 when(mLocalBluetoothManager.getCachedDeviceManager()).thenReturn( in setUp()
202 when(mLocalMediaManager.isPreferenceRouteListingExist()).thenReturn(false); in setUp()
208 when(mMediaMetadata.getDescription()).thenReturn(mMediaDescription); in setUp()
209 when(mMediaDevice1.getId()).thenReturn(TEST_DEVICE_1_ID); in setUp()
[all …]
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/
DShortcutHelperTest.java27 import static org.mockito.Mockito.when;
99 when(mSbn.getPackageName()).thenReturn(PKG); in setUp()
100 when(mShortcutInfo.getId()).thenReturn(SHORTCUT_ID); in setUp()
101 when(mNotif.getBubbleMetadata()).thenReturn(mBubbleMetadata); in setUp()
102 when(mBubbleMetadata.getShortcutId()).thenReturn(SHORTCUT_ID); in setUp()
103 when(mUserManager.isUserUnlocked(any(UserHandle.class))).thenReturn(true); in setUp()
109 when(mockRecord.getKey()).thenReturn(key); in setUpMockNotificationRecord()
110 when(mockRecord.getSbn()).thenReturn(mSbn); in setUpMockNotificationRecord()
111 when(mockRecord.getNotification()).thenReturn(mNotif); in setUpMockNotificationRecord()
112 when(mockRecord.getShortcutInfo()).thenReturn(mShortcutInfo); in setUpMockNotificationRecord()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DDisplayRotationImmersiveAppCompatPolicyTests.java30 import static com.android.dx.mockito.inline.extended.ExtendedMockito.when;
67 when(mMockTask.getWindowingMode()).thenReturn(WINDOWING_MODE_FULLSCREEN); in setUp()
68 when(mMockActivityRecord.getTask()).thenReturn(mMockTask); in setUp()
69 when(mMockActivityRecord.areBoundsLetterboxed()).thenReturn(false); in setUp()
70 when(mMockActivityRecord.getRequestedConfigurationOrientation()).thenReturn( in setUp()
73 when(mMockWindowState.getRequestedVisibleTypes()).thenReturn(0); in setUp()
74 when(mMockActivityRecord.findMainWindow()).thenReturn(mMockWindowState); in setUp()
77 doReturn(mMockActivityRecord).when(mDisplayContent).topRunningActivity(); in setUp()
78 when(mDisplayContent.getIgnoreOrientationRequest()).thenReturn(true); in setUp()
81 when(mMockLetterboxConfiguration.isDisplayRotationImmersiveAppCompatPolicyEnabled()) in setUp()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DPhoneSubInfoControllerTest.java79 doReturn(0).when(mSubscriptionManagerService).getPhoneId(eq(0)); in setUp()
80 doReturn(1).when(mSubscriptionManagerService).getPhoneId(eq(1)); in setUp()
81 doReturn(2).when(mTelephonyManager).getPhoneCount(); in setUp()
82 doReturn(2).when(mTelephonyManager).getActiveModemCount(); in setUp()
83 doReturn(true).when(mSubscriptionManagerService).isActiveSubId(0, TAG, FEATURE_ID); in setUp()
84 doReturn(true).when(mSubscriptionManagerService).isActiveSubId(1, TAG, FEATURE_ID); in setUp()
85 doReturn(new int[]{0, 1}).when(mSubscriptionManager) in setUp()
88 doReturn(mContext).when(mSecondPhone).getContext(); in setUp()
101 doReturn(AppOpsManager.MODE_ERRORED).when(mAppOsMgr).noteOpNoThrow( in setUp()
106 doReturn(Binder.getCallingUid()).when(mPm).getPackageUid(eq(TAG), anyInt()); in setUp()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/vibrator/
DInputDeviceDelegateTest.java30 import static org.mockito.Mockito.when;
91 when(mContextSpy.getSystemService(eq(Context.INPUT_SERVICE))) in setUp()
94 .when(mIInputManagerMock).registerInputDevicesChangedListener(any()); in setUp()
108 when(mIInputManagerMock.getInputDeviceIds()).thenReturn(new int[0]); in beforeSystemReady_ignoresAnyUpdate()
126 when(mIInputManagerMock.getInputDeviceIds()).thenReturn(new int[0]); in onInputDeviceAdded_withSettingsDisabled_ignoresNewDevice()
130 when(mIInputManagerMock.getVibratorIds(eq(1))).thenReturn(new int[]{1}); in onInputDeviceAdded_withSettingsDisabled_ignoresNewDevice()
131 when(mIInputManagerMock.getInputDevice(eq(1))).thenReturn(createInputDeviceWithVibrator(1)); in onInputDeviceAdded_withSettingsDisabled_ignoresNewDevice()
140 when(mIInputManagerMock.getInputDeviceIds()).thenReturn(new int[0]); in onInputDeviceAdded_withDeviceWithoutVibrator_ignoresNewDevice()
144 when(mIInputManagerMock.getVibratorIds(eq(1))).thenReturn(new int[0]); in onInputDeviceAdded_withDeviceWithoutVibrator_ignoresNewDevice()
145 when(mIInputManagerMock.getInputDevice(eq(1))) in onInputDeviceAdded_withDeviceWithoutVibrator_ignoresNewDevice()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/
DQSSecurityFooterTest.java31 import static org.mockito.Mockito.when;
123 when(mUserTracker.getUserInfo()).thenReturn(mock(UserInfo.class)); in setUp()
128 when(mSecurityController.getDeviceOwnerComponentOnAnyUser()) in setUp()
130 when(mSecurityController.isFinancedDevice()).thenReturn(false); in setUp()
132 when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) in setUp()
158 when(mSecurityController.isDeviceManaged()).thenReturn(false); in testUnmanaged()
159 when(mSecurityController.isProfileOwnerOfOrganizationOwnedDevice()).thenReturn(false); in testUnmanaged()
165 when(mSecurityController.isDeviceManaged()).thenReturn(true); in testManagedNoOwnerName()
166 when(mSecurityController.getDeviceOwnerOrganizationName()).thenReturn(null); in testManagedNoOwnerName()
177 when(mSecurityController.isDeviceManaged()).thenReturn(true); in testManagedOwnerName()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/
DInternetDialogControllerTest.java32 import static org.mockito.Mockito.when;
196 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(anyInt()); in setUp()
197 when(mTelephonyManager.getSignalStrength()).thenReturn(mSignalStrength); in setUp()
198 when(mSignalStrength.getLevel()).thenReturn(SIGNAL_STRENGTH_GREAT); in setUp()
199 when(mKeyguardStateController.isUnlocked()).thenReturn(true); in setUp()
200 when(mConnectedEntry.isDefaultNetwork()).thenReturn(true); in setUp()
201 when(mConnectedEntry.hasInternetAccess()).thenReturn(true); in setUp()
202 when(mWifiEntry1.getConnectedState()).thenReturn(WifiEntry.CONNECTED_STATE_DISCONNECTED); in setUp()
203 when(mWifiEntry2.getConnectedState()).thenReturn(WifiEntry.CONNECTED_STATE_DISCONNECTED); in setUp()
204 when(mWifiEntry3.getConnectedState()).thenReturn(WifiEntry.CONNECTED_STATE_DISCONNECTED); in setUp()
[all …]
/frameworks/libs/service_entitlement/tests/src/com/android/libraries/entitlement/
DEapAkaHelperTest.java22 import static org.mockito.Mockito.when;
53 when(mContext.getSystemService(TelephonyManager.class)) in setUp()
55 when(mMockTelephonyManager.createForSubscriptionId(SUB_ID)) in setUp()
63 when(mMockTelephonyManagerForSubId.getSubscriberId()).thenReturn("123457813240779"); in getEapAkaRootNai_twoDigitMnc()
64 when(mMockTelephonyManagerForSubId.getSimOperator()).thenReturn("12345"); in getEapAkaRootNai_twoDigitMnc()
73 when(mMockTelephonyManagerForSubId.getSubscriberId()).thenReturn("123457813240779"); in getEapAkaRootNai_threeDigitMnc()
74 when(mMockTelephonyManagerForSubId.getSimOperator()).thenReturn("123457"); in getEapAkaRootNai_threeDigitMnc()
83 when(mMockTelephonyManagerForSubId.getSubscriberId()).thenReturn("123457813240779"); in getEapAkaRootNai_invalidMccMnc_returnNull()
84 when(mMockTelephonyManagerForSubId.getSimOperator()).thenReturn(""); in getEapAkaRootNai_invalidMccMnc_returnNull()
93 when(mMockTelephonyManagerForSubId.getSubscriberId()).thenReturn("234107813240779"); in getEapAkaChallengeResponse()
[all …]

12345678910>>...60