/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/ |
D | TypeClassifierTest.java | 32 import static org.mockito.Mockito.when; 61 when(mDataProvider.isVertical()).thenReturn(true); in testPass_QuickSettings() 62 when(mDataProvider.isUp()).thenReturn(false); in testPass_QuickSettings() 64 when(mDataProvider.isRight()).thenReturn(false); // right should cause no effect. in testPass_QuickSettings() 67 when(mDataProvider.isRight()).thenReturn(true); in testPass_QuickSettings() 73 when(mDataProvider.isVertical()).thenReturn(false); in testFalse_QuickSettings() 74 when(mDataProvider.isUp()).thenReturn(false); in testFalse_QuickSettings() 77 when(mDataProvider.isVertical()).thenReturn(true); in testFalse_QuickSettings() 78 when(mDataProvider.isUp()).thenReturn(true); in testFalse_QuickSettings() 84 when(mDataProvider.isVertical()).thenReturn(true); in testPass_PulseExpand() [all …]
|
D | DiagonalClassifierTest.java | 25 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/base/services/tests/servicestests/src/com/android/server/hdmi/ |
D | FakeHdmiCecConfig.java | 42 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/doze/ |
D | DozeConfigurationUtil.java | 21 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()).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/ |
D | SharesheetModelScorerTest.java | 26 import static org.mockito.Mockito.when; 162 when(mEventHistory1.getEventIndex(anySet())).thenReturn(mEventIndex1); in testComputeScore() 163 when(mEventHistory2.getEventIndex(anySet())).thenReturn(mEventIndex2); in testComputeScore() 164 when(mEventHistory3.getEventIndex(anySet())).thenReturn(mEventIndex3); in testComputeScore() 165 when(mEventHistory4.getEventIndex(anySet())).thenReturn(mEventIndex4); in testComputeScore() 166 when(mEventHistory5.getEventIndex(anySet())).thenReturn(mEventIndex5); in testComputeScore() 168 when(mEventIndex1.getActiveTimeSlots()).thenReturn( in testComputeScore() 170 when(mEventIndex2.getActiveTimeSlots()).thenReturn(List.of(TWO_DAYS_AGO, TWELVE_DAYS_AGO)); in testComputeScore() 171 when(mEventIndex3.getActiveTimeSlots()).thenReturn(List.of(FIVE_DAYS_AGO, TWENTY_DAYS_AGO)); in testComputeScore() 172 when(mEventIndex4.getActiveTimeSlots()).thenReturn( in testComputeScore() [all …]
|
D | ShareTargetPredictorTest.java | 30 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/services/tests/servicestests/src/com/android/server/locksettings/ |
D | LockSettingsShellCommandTest.java | 35 import static org.mockito.Mockito.when; 95 when(mLockPatternUtils.hasSecureLockScreen()).thenReturn(true); in setUp() 100 when(mLockPatternUtils.isSecure(mUserId)).thenReturn(true); in testWrongPassword() 101 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false); in testWrongPassword() 102 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true); in testWrongPassword() 103 when(mLockPatternUtils.checkCredential( in testWrongPassword() 113 when(mLockPatternUtils.isSecure(mUserId)).thenReturn(true); in testChangePin() 114 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false); in testChangePin() 115 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true); in testChangePin() 116 when(mLockPatternUtils.getKeyguardStoredPasswordQuality(mUserId)).thenReturn( in testChangePin() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | MultiSimSettingControllerTest.java | 126 doReturn(DUAL_SIM).when(mTelephonyManager).getPhoneCount(); in setUp() 127 doReturn(DUAL_SIM).when(mTelephonyManager).getActiveModemCount(); in setUp() 128 doReturn(1).when(mSubControllerMock).getDefaultDataSubId(); in setUp() 129 doReturn(1).when(mSubControllerMock).getDefaultVoiceSubId(); in setUp() 130 doReturn(1).when(mSubControllerMock).getDefaultSmsSubId(); in setUp() 131 doReturn(true).when(mSubControllerMock).isActiveSubId(1); in setUp() 132 doReturn(true).when(mSubControllerMock).isActiveSubId(2); in setUp() 133 doReturn(0).when(mSubControllerMock).getPhoneId(1); in setUp() 134 doReturn(1).when(mSubControllerMock).getPhoneId(2); in setUp() 135 doReturn(true).when(mSubControllerMock).isOpportunistic(5); in setUp() [all …]
|
D | NetworkTypeControllerTest.java | 113 TelephonyManager.NETWORK_MODE_NR_LTE_CDMA_EVDO_GSM_WCDMA)).when( in setUp() 115 doReturn(false).when(mTelephonyManager).isRadioInterfaceCapabilitySupported( in setUp() 131 doReturn(NetworkRegistrationInfo.NR_STATE_NONE).when(mServiceState).getNrState(); in testUpdateOverrideNetworkTypeNrNsa() 137 doReturn(NetworkRegistrationInfo.NR_STATE_RESTRICTED).when(mServiceState).getNrState(); in testUpdateOverrideNetworkTypeNrNsa() 143 doReturn(NetworkRegistrationInfo.NR_STATE_NOT_RESTRICTED).when(mServiceState).getNrState(); in testUpdateOverrideNetworkTypeNrNsa() 149 doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); in testUpdateOverrideNetworkTypeNrNsa() 150 doReturn(ServiceState.FREQUENCY_RANGE_LOW).when(mServiceState).getNrFrequencyRange(); in testUpdateOverrideNetworkTypeNrNsa() 156 doReturn(ServiceState.FREQUENCY_RANGE_MMWAVE).when(mServiceState).getNrFrequencyRange(); in testUpdateOverrideNetworkTypeNrNsa() 165 doReturn(TelephonyManager.NETWORK_TYPE_LTE).when(mServiceState).getDataNetworkType(); in testUpdateOverrideNetworkTypeNrSa() 166 doReturn(NetworkRegistrationInfo.NR_STATE_NONE).when(mServiceState).getNrState(); in testUpdateOverrideNetworkTypeNrSa() [all …]
|
D | TelephonyTest.java | 474 doReturn(mUiccCard).when(mPhone).getUiccCard(); in setUp() 475 doReturn(mUiccProfile).when(mUiccCard).getUiccProfile(); in setUp() 496 doReturn(mTelephonyComponentFactory).when(mTelephonyComponentFactory).inject(anyString()); in setUp() 497 doReturn(mSST).when(mTelephonyComponentFactory) in setUp() 500 doReturn(mEmergencyNumberTracker).when(mTelephonyComponentFactory) in setUp() 503 doReturn(getTestEmergencyNumber()).when(mEmergencyNumberTracker) in setUp() 505 doReturn(mUiccProfile).when(mTelephonyComponentFactory) in setUp() 509 doReturn(mCT).when(mTelephonyComponentFactory) in setUp() 511 doReturn(mIccPhoneBookIntManager).when(mTelephonyComponentFactory) in setUp() 513 doReturn(mDcTracker).when(mTelephonyComponentFactory) in setUp() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/metrics/ |
D | VoiceCallSessionStatsTest.java | 134 doReturn(CARRIER_ID_SLOT_0).when(mPhone).getCarrierId(); in setUp() 136 doReturn(CARRIER_ID_SLOT_1).when(mSecondPhone).getCarrierId(); in setUp() 137 doReturn(mSignalStrength).when(mSecondPhone).getSignalStrength(); in setUp() 138 doReturn(mSecondServiceStateTracker).when(mSecondPhone).getServiceStateTracker(); in setUp() 139 doReturn(mSecondServiceState).when(mSecondServiceStateTracker).getServiceState(); in setUp() 141 doReturn(TelephonyManager.NETWORK_TYPE_UNKNOWN).when(mServiceState).getDataNetworkType(); in setUp() 142 doReturn(TelephonyManager.NETWORK_TYPE_UNKNOWN).when(mServiceState).getVoiceNetworkType(); in setUp() 143 doReturn(false).when(mServiceState).getVoiceRoaming(); in setUp() 145 .when(mSecondServiceState) in setUp() 148 .when(mSecondServiceState) in setUp() [all …]
|
/frameworks/base/libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/onehanded/ |
D | OneHandedControllerTest.java | 34 import static org.mockito.Mockito.when; 110 when(mMockDisplayController.getDisplay(anyInt())).thenReturn(mDisplay); in setUp() 111 when(mMockDisplayAreaOrganizer.getDisplayAreaTokenMap()).thenReturn(new ArrayMap<>()); in setUp() 112 when(mMockDisplayAreaOrganizer.isReady()).thenReturn(true); in setUp() 113 when(mMockBackgroundOrganizer.isRegistered()).thenReturn(true); in setUp() 114 when(mMockSettingsUitl.getSettingsOneHandedModeEnabled(any(), anyInt())).thenReturn( in setUp() 116 when(mMockSettingsUitl.getSettingsOneHandedModeTimeout(any(), anyInt())).thenReturn( in setUp() 118 when(mMockSettingsUitl.getSettingsTapsAppToExit(any(), anyInt())).thenReturn( in setUp() 120 when(mMockSettingsUitl.getSettingsSwipeToNotificationEnabled(any(), anyInt())).thenReturn( in setUp() 122 when(mMockSettingsUitl.getShortcutEnabled(any(), anyInt())).thenReturn(false); in setUp() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/globalactions/ |
D | GlobalActionsColumnLayoutTest.java | 58 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 …]
|
D | GlobalActionsLayoutTest.java | 161 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 …]
|
D | GlobalActionsGridLayoutTest.java | 55 doReturn(mListGrid).when(mGridLayout).getListView(); in setUp() 60 doReturn(RotationUtils.ROTATION_NONE).when(mGridLayout).getCurrentRotation(); in testShouldSwapRowsAndColumns() 63 doReturn(RotationUtils.ROTATION_LANDSCAPE).when(mGridLayout).getCurrentRotation(); in testShouldSwapRowsAndColumns() 66 doReturn(RotationUtils.ROTATION_SEASCAPE).when(mGridLayout).getCurrentRotation(); in testShouldSwapRowsAndColumns() 72 doReturn(View.LAYOUT_DIRECTION_LTR).when(mGridLayout).getCurrentLayoutDirection(); in testShouldReverseListItems() 74 doReturn(RotationUtils.ROTATION_LANDSCAPE).when(mGridLayout).getCurrentRotation(); in testShouldReverseListItems() 77 doReturn(RotationUtils.ROTATION_NONE).when(mGridLayout).getCurrentRotation(); in testShouldReverseListItems() 80 doReturn(RotationUtils.ROTATION_SEASCAPE).when(mGridLayout).getCurrentRotation(); in testShouldReverseListItems() 83 doReturn(View.LAYOUT_DIRECTION_RTL).when(mGridLayout).getCurrentLayoutDirection(); in testShouldReverseListItems() 85 doReturn(RotationUtils.ROTATION_LANDSCAPE).when(mGridLayout).getCurrentRotation(); in testShouldReverseListItems() [all …]
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/notification/ |
D | ShortcutHelperTest.java | 27 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/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/ |
D | HearingAidDeviceManagerTest.java | 24 import static org.mockito.Mockito.when; 74 when(mDevice1.getAddress()).thenReturn(DEVICE_ADDRESS_1); in setUp() 75 when(mDevice2.getAddress()).thenReturn(DEVICE_ADDRESS_2); in setUp() 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() 80 when(mDevice1.getBluetoothClass()).thenReturn(DEVICE_CLASS); in setUp() 81 when(mDevice2.getBluetoothClass()).thenReturn(DEVICE_CLASS); in setUp() 82 when(mLocalBluetoothManager.getEventManager()).thenReturn(mBluetoothEventManager); in setUp() [all …]
|
D | A2dpProfileTest.java | 23 import static org.mockito.Mockito.when; 72 when(mBluetoothA2dp.getActiveDevice()).thenReturn(mDevice); in setUp() 77 when(mBluetoothA2dp.isOptionalCodecsSupported(mDevice)).thenReturn( in supportsHighQualityAudio() 81 when(mBluetoothA2dp.isOptionalCodecsSupported(mDevice)).thenReturn( in supportsHighQualityAudio() 85 when(mBluetoothA2dp.isOptionalCodecsSupported(mDevice)).thenReturn( in supportsHighQualityAudio() 92 when(mBluetoothA2dp.isOptionalCodecsEnabled(mDevice)).thenReturn( in isHighQualityAudioEnabled() 96 when(mBluetoothA2dp.isOptionalCodecsEnabled(mDevice)).thenReturn( in isHighQualityAudioEnabled() 104 when(mBluetoothA2dp.isOptionalCodecsEnabled(mDevice)).thenReturn( in isHighQualityAudioEnabled() 106 when(mBluetoothA2dp.getConnectionState(any())).thenReturn( in isHighQualityAudioEnabled() 109 when(mBluetoothA2dp.isOptionalCodecsSupported(mDevice)).thenReturn( in isHighQualityAudioEnabled() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ |
D | NotificationSwipeHelperTest.java | 28 import static org.mockito.Mockito.when; 106 doNothing().when(mSwipeHelper).setExposedMenuView(mView); in testClearExposedMenuView() 122 doNothing().when(mSwipeHelper).setTranslatingParentView(null); in testClearTranslatingParentView() 141 doNothing().when(mSwipeHelper).setCurrentMenuRow(null); in testClearCurrentMenuRow() 148 when(mSwipeHelper.getHandler()).thenReturn(mHandler); in testOnDownUpdate_ExpandableNotificationRow() 149 when(mSwipeHelper.getFalsingCheck()).thenReturn(mFalsingCheck); in testOnDownUpdate_ExpandableNotificationRow() 150 doNothing().when(mSwipeHelper).resetExposedMenuView(true, false); in testOnDownUpdate_ExpandableNotificationRow() 151 doNothing().when(mSwipeHelper).clearCurrentMenuRow(); in testOnDownUpdate_ExpandableNotificationRow() 152 doNothing().when(mSwipeHelper).initializeRow(any()); in testOnDownUpdate_ExpandableNotificationRow() 164 when(mSwipeHelper.getHandler()).thenReturn(mHandler); in testOnDownUpdate_notExpandableNotificationRow() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ |
D | NotificationMenuRowTest.java | 30 import static org.mockito.Mockito.when; 69 when(mRow.getEntry()).thenReturn(entry); in setup() 158 when(row.isMenuVisible()).thenReturn(true); in testIsSnappedAndOnSameSide() 159 when(row.isMenuSnapped()).thenReturn(true); in testIsSnappedAndOnSameSide() 160 when(row.isMenuOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide() 161 when(row.isMenuSnappedOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide() 166 when(row.isMenuOnLeft()).thenReturn(false); in testIsSnappedAndOnSameSide() 167 when(row.isMenuSnappedOnLeft()).thenReturn(false); in testIsSnappedAndOnSameSide() 170 when(row.isMenuOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide() 171 when(row.isMenuSnapped()).thenReturn(false); in testIsSnappedAndOnSameSide() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/vibrator/ |
D | InputDeviceDelegateTest.java | 30 import static org.mockito.Mockito.when; 88 when(mContextSpy.getSystemService(eq(Context.INPUT_SERVICE))).thenReturn(inputManager); in setUp() 90 .when(mIInputManagerMock).registerInputDevicesChangedListener(any()); in setUp() 104 when(mIInputManagerMock.getInputDeviceIds()).thenReturn(new int[0]); in beforeSystemReady_ignoresAnyUpdate() 122 when(mIInputManagerMock.getInputDeviceIds()).thenReturn(new int[0]); in onInputDeviceAdded_withSettingsDisabled_ignoresNewDevice() 126 when(mIInputManagerMock.getVibratorIds(eq(1))).thenReturn(new int[]{1}); in onInputDeviceAdded_withSettingsDisabled_ignoresNewDevice() 127 when(mIInputManagerMock.getInputDevice(eq(1))).thenReturn(createInputDeviceWithVibrator(1)); in onInputDeviceAdded_withSettingsDisabled_ignoresNewDevice() 136 when(mIInputManagerMock.getInputDeviceIds()).thenReturn(new int[0]); in onInputDeviceAdded_withDeviceWithoutVibrator_ignoresNewDevice() 140 when(mIInputManagerMock.getVibratorIds(eq(1))).thenReturn(new int[0]); in onInputDeviceAdded_withDeviceWithoutVibrator_ignoresNewDevice() 141 when(mIInputManagerMock.getInputDevice(eq(1))) in onInputDeviceAdded_withDeviceWithoutVibrator_ignoresNewDevice() [all …]
|
/frameworks/libs/service_entitlement/tests/src/com/android/libraries/entitlement/ |
D | EapAkaHelperTest.java | 22 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 …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/dialog/ |
D | MediaOutputControllerTest.java | 28 import static org.mockito.Mockito.when; 106 when(mMediaController.getPackageName()).thenReturn(TEST_PACKAGE_NAME); in setUp() 108 when(mMediaSessionManager.getActiveSessions(any())).thenReturn(mMediaControllers); in setUp() 109 doReturn(mMediaSessionManager).when(mSpyContext).getSystemService( in setUp() 111 when(mLocalBluetoothManager.getCachedDeviceManager()).thenReturn( in setUp() 123 when(mMediaMetadata.getDescription()).thenReturn(mMediaDescription); in setUp() 124 when(mMediaDevice1.getId()).thenReturn(TEST_DEVICE_1_ID); in setUp() 125 when(mMediaDevice2.getId()).thenReturn(TEST_DEVICE_2_ID); in setUp() 205 when(mLocalMediaManager.getCurrentConnectedDevice()).thenReturn(mMediaDevice2); in onSelectedDeviceStateChanged_verifyCallback() 228 when(mLocalMediaManager.getCurrentConnectedDevice()).thenReturn(mMediaDevice1); in onRequestFailed_verifyCallback() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/ |
D | QSSecurityFooterTest.java | 29 import static org.mockito.Mockito.when; 102 when(mUserTracker.getUserInfo()).thenReturn(mock(UserInfo.class)); in setUp() 112 when(mSecurityController.getDeviceOwnerComponentOnAnyUser()) in setUp() 114 when(mSecurityController.getDeviceOwnerType(DEVICE_OWNER_COMPONENT)) in setUp() 120 when(mSecurityController.isDeviceManaged()).thenReturn(false); in testUnmanaged() 121 when(mSecurityController.isProfileOwnerOfOrganizationOwnedDevice()).thenReturn(false); in testUnmanaged() 130 when(mSecurityController.isDeviceManaged()).thenReturn(true); in testManagedNoOwnerName() 131 when(mSecurityController.getDeviceOwnerOrganizationName()).thenReturn(null); in testManagedNoOwnerName() 144 when(mSecurityController.isDeviceManaged()).thenReturn(true); in testManagedOwnerName() 145 when(mSecurityController.getDeviceOwnerOrganizationName()) in testManagedOwnerName() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/sensors/ |
D | CoexCoordinatorTest.java | 31 import static org.mockito.Mockito.when; 84 when(client.isBiometricPrompt()).thenReturn(true); in testBiometricPrompt_authSuccess() 99 when(client.isBiometricPrompt()).thenReturn(true); in testBiometricPrompt_authReject_whenNotLockedOut() 115 when(client.isBiometricPrompt()).thenReturn(true); in testBiometricPrompt_authReject_whenLockedOut() 131 when(client.isKeyguard()).thenReturn(true); in testKeyguard_faceAuthOnly_success() 146 when(faceClient.isKeyguard()).thenReturn(true); in testKeyguard_faceAuth_udfpsNotTouching_faceSuccess() 150 when(udfpsClient.isKeyguard()).thenReturn(true); in testKeyguard_faceAuth_udfpsNotTouching_faceSuccess() 151 when(((Udfps) udfpsClient).isPointerDown()).thenReturn(false); in testKeyguard_faceAuth_udfpsNotTouching_faceSuccess() 198 when(faceClient.isKeyguard()).thenReturn(true); in testKeyguard_bypass_haptics() 199 when(faceClient.isKeyguardBypassEnabled()).thenReturn(bypassEnabled); in testKeyguard_bypass_haptics() [all …]
|