/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/classifier/brightline/ |
D | TypeClassifierTest.java | 30 import static org.mockito.Mockito.when; 61 when(mDataProvider.getInteractionType()).thenReturn(QUICK_SETTINGS); in testPass_QuickSettings() 62 when(mDataProvider.isVertical()).thenReturn(true); in testPass_QuickSettings() 63 when(mDataProvider.isUp()).thenReturn(false); in testPass_QuickSettings() 65 when(mDataProvider.isRight()).thenReturn(false); // right should cause no effect. in testPass_QuickSettings() 68 when(mDataProvider.isRight()).thenReturn(true); in testPass_QuickSettings() 74 when(mDataProvider.getInteractionType()).thenReturn(QUICK_SETTINGS); in testFalse_QuickSettings() 76 when(mDataProvider.isVertical()).thenReturn(false); in testFalse_QuickSettings() 77 when(mDataProvider.isUp()).thenReturn(false); in testFalse_QuickSettings() 80 when(mDataProvider.isVertical()).thenReturn(true); in testFalse_QuickSettings() [all …]
|
D | DiagonalClassifierTest.java | 24 import static org.mockito.Mockito.when; 71 when(mDataProvider.getAngle()).thenReturn(Float.MAX_VALUE); in testPass_UnknownAngle() 77 when(mDataProvider.getAngle()).thenReturn(UP_IN_RADIANS); in testPass_VerticalSwipe() 80 when(mDataProvider.getAngle()).thenReturn(DOWN_IN_RADIANS); in testPass_VerticalSwipe() 86 when(mDataProvider.getAngle()).thenReturn(UP_IN_RADIANS + 2 * FIVE_DEG_IN_RADIANS); in testPass_MostlyVerticalSwipe() 89 when(mDataProvider.getAngle()).thenReturn(UP_IN_RADIANS - 2 * FIVE_DEG_IN_RADIANS); in testPass_MostlyVerticalSwipe() 92 when(mDataProvider.getAngle()).thenReturn(DOWN_IN_RADIANS + 2 * FIVE_DEG_IN_RADIANS); in testPass_MostlyVerticalSwipe() 95 when(mDataProvider.getAngle()).thenReturn(DOWN_IN_RADIANS - 2 * FIVE_DEG_IN_RADIANS * 2); in testPass_MostlyVerticalSwipe() 101 when(mDataProvider.getAngle()).thenReturn( in testPass_BarelyVerticalSwipe() 105 when(mDataProvider.getAngle()).thenReturn( in testPass_BarelyVerticalSwipe() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
D | MultiSimSettingControllerTest.java | 111 doReturn(DUAL_SIM).when(mTelephonyManager).getPhoneCount(); in setUp() 112 doReturn(DUAL_SIM).when(mTelephonyManager).getActiveModemCount(); in setUp() 113 doReturn(1).when(mSubControllerMock).getDefaultDataSubId(); in setUp() 114 doReturn(1).when(mSubControllerMock).getDefaultVoiceSubId(); in setUp() 115 doReturn(1).when(mSubControllerMock).getDefaultSmsSubId(); in setUp() 116 doReturn(true).when(mSubControllerMock).isActiveSubId(1); in setUp() 117 doReturn(true).when(mSubControllerMock).isActiveSubId(2); in setUp() 118 doReturn(0).when(mSubControllerMock).getPhoneId(1); in setUp() 119 doReturn(1).when(mSubControllerMock).getPhoneId(2); in setUp() 120 doReturn(true).when(mSubControllerMock).isOpportunistic(5); in setUp() [all …]
|
D | NetworkTypeControllerTest.java | 95 doReturn(TelephonyManager.NETWORK_MODE_NR_LTE_CDMA_EVDO_GSM_WCDMA).when(mPhone) in setUp() 110 doReturn(TelephonyManager.NETWORK_TYPE_LTE).when(mServiceState).getDataNetworkType(); in testUpdateOverrideNetworkTypeNrNsa() 113 doReturn(NetworkRegistrationInfo.NR_STATE_NONE).when(mServiceState).getNrState(); in testUpdateOverrideNetworkTypeNrNsa() 119 doReturn(NetworkRegistrationInfo.NR_STATE_RESTRICTED).when(mServiceState).getNrState(); in testUpdateOverrideNetworkTypeNrNsa() 125 doReturn(NetworkRegistrationInfo.NR_STATE_NOT_RESTRICTED).when(mServiceState).getNrState(); in testUpdateOverrideNetworkTypeNrNsa() 131 doReturn(NetworkRegistrationInfo.NR_STATE_CONNECTED).when(mServiceState).getNrState(); in testUpdateOverrideNetworkTypeNrNsa() 132 doReturn(ServiceState.FREQUENCY_RANGE_LOW).when(mServiceState).getNrFrequencyRange(); in testUpdateOverrideNetworkTypeNrNsa() 138 doReturn(ServiceState.FREQUENCY_RANGE_MMWAVE).when(mServiceState).getNrFrequencyRange(); in testUpdateOverrideNetworkTypeNrNsa() 146 doReturn(TelephonyManager.NETWORK_TYPE_LTE).when(mServiceState).getDataNetworkType(); in testUpdateOverrideNetworkTypeLte() 154 doReturn(true).when(mServiceState).isUsingCarrierAggregation(); in testUpdateOverrideNetworkTypeLte() [all …]
|
D | TelephonyPermissionsTest.java | 27 import static org.mockito.Mockito.when; 98 when(mMockContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn( in setUp() 100 when(mTelephonyManagerMock.createForSubscriptionId(anyInt())).thenReturn( in setUp() 102 when(mMockContext.getSystemService(Context.APP_OPS_SERVICE)).thenReturn(mMockAppOps); in setUp() 103 when(mMockContext.getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE)).thenReturn( in setUp() 105 when(mMockContext.getSystemService(Context.DEVICE_POLICY_SERVICE)).thenReturn( in setUp() 107 when(mMockSubscriptionManager.getCompleteActiveSubscriptionIdList()).thenReturn( in setUp() 111 doThrow(new SecurityException()).when(mMockContext) in setUp() 113 doThrow(new SecurityException()).when(mMockContext) in setUp() 115 when(mMockAppOps.noteOp(anyString(), eq(UID), eq(PACKAGE))) in setUp() [all …]
|
D | PhoneSubInfoControllerTest.java | 55 doReturn(0).when(mSubscriptionController).getPhoneId(eq(0)); in setUp() 56 doReturn(1).when(mSubscriptionController).getPhoneId(eq(1)); in setUp() 57 doReturn(2).when(mTelephonyManager).getPhoneCount(); in setUp() 58 doReturn(2).when(mTelephonyManager).getActiveModemCount(); in setUp() 59 doReturn(true).when(mSubscriptionController).isActiveSubId(0, TAG, FEATURE_ID); in setUp() 60 doReturn(true).when(mSubscriptionController).isActiveSubId(1, TAG, FEATURE_ID); in setUp() 61 doReturn(new int[]{0, 1}).when(mSubscriptionManager) in setUp() 65 doReturn(mSubscriptionController).when(mSubscriptionController) in setUp() 67 doReturn(mContext).when(mSecondPhone).getContext(); in setUp() 79 doReturn(AppOpsManager.MODE_ERRORED).when(mAppOsMgr).noteOpNoThrow( in setUp() [all …]
|
D | TelephonyTest.java | 424 doReturn(mUiccCard).when(mPhone).getUiccCard(); in setUp() 425 doReturn(mUiccProfile).when(mUiccCard).getUiccProfile(); in setUp() 442 doReturn(mTelephonyComponentFactory).when(mTelephonyComponentFactory).inject(anyString()); in setUp() 443 doReturn(mSST).when(mTelephonyComponentFactory) in setUp() 446 doReturn(mEmergencyNumberTracker).when(mTelephonyComponentFactory) in setUp() 449 doReturn(getTestEmergencyNumber()).when(mEmergencyNumberTracker) in setUp() 451 doReturn(mUiccProfile).when(mTelephonyComponentFactory) in setUp() 455 doReturn(mCT).when(mTelephonyComponentFactory) in setUp() 457 doReturn(mIccPhoneBookIntManager).when(mTelephonyComponentFactory) in setUp() 459 doReturn(mDcTracker).when(mTelephonyComponentFactory) in setUp() [all …]
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/metrics/ |
D | VoiceCallSessionStatsTest.java | 139 doReturn(mSecondServiceStateTracker).when(mSecondPhone).getServiceStateTracker(); in setUp() 140 doReturn(mSecondServiceState).when(mSecondServiceStateTracker).getServiceState(); in setUp() 142 doReturn(TelephonyManager.NETWORK_TYPE_UNKNOWN).when(mServiceState).getDataNetworkType(); in setUp() 143 doReturn(TelephonyManager.NETWORK_TYPE_UNKNOWN).when(mServiceState).getVoiceNetworkType(); in setUp() 144 doReturn(false).when(mServiceState).getVoiceRoaming(); in setUp() 146 .when(mSecondServiceState) in setUp() 149 .when(mSecondServiceState) in setUp() 151 doReturn(false).when(mSecondServiceState).getVoiceRoaming(); in setUp() 153 doReturn(true).when(mPhysicalSlot).isActive(); in setUp() 154 doReturn(CardState.CARDSTATE_PRESENT).when(mPhysicalSlot).getCardState(); in setUp() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ |
D | NotificationMenuRowTest.java | 29 import static org.mockito.Mockito.when; 66 when(mRow.getEntry()).thenReturn(entry); in setup() 152 when(row.isMenuVisible()).thenReturn(true); in testIsSnappedAndOnSameSide() 153 when(row.isMenuSnapped()).thenReturn(true); in testIsSnappedAndOnSameSide() 154 when(row.isMenuOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide() 155 when(row.isMenuSnappedOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide() 160 when(row.isMenuOnLeft()).thenReturn(false); in testIsSnappedAndOnSameSide() 161 when(row.isMenuSnappedOnLeft()).thenReturn(false); in testIsSnappedAndOnSameSide() 164 when(row.isMenuOnLeft()).thenReturn(true); in testIsSnappedAndOnSameSide() 165 when(row.isMenuSnapped()).thenReturn(false); in testIsSnappedAndOnSameSide() [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/packages/SystemUI/tests/src/com/android/systemui/doze/ |
D | DozeConfigurationUtil.java | 23 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.getPolicy()).thenReturn(mock(AlwaysOnDisplayPolicy.class)); in createMockParameters() 41 when(params.doubleTapReportsTouchCoordinates()).thenReturn(false); in createMockParameters() 42 when(params.getDisplayNeedsBlanking()).thenReturn(false); in createMockParameters() 52 when(config.doubleTapGestureEnabled(anyInt())).thenReturn(false); in createMockConfig() 53 when(config.pickupGestureEnabled(anyInt())).thenReturn(false); in createMockConfig() 54 when(config.pulseOnNotificationEnabled(anyInt())).thenReturn(true); in createMockConfig() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/ |
D | NotificationSwipeHelperTest.java | 28 import static org.mockito.Mockito.when; 104 doNothing().when(mSwipeHelper).setExposedMenuView(mView); in testClearExposedMenuView() 120 doNothing().when(mSwipeHelper).setTranslatingParentView(null); in testClearTranslatingParentView() 139 doNothing().when(mSwipeHelper).setCurrentMenuRow(null); in testClearCurrentMenuRow() 146 when(mSwipeHelper.getHandler()).thenReturn(mHandler); in testOnDownUpdate_ExpandableNotificationRow() 147 when(mSwipeHelper.getFalsingCheck()).thenReturn(mFalsingCheck); in testOnDownUpdate_ExpandableNotificationRow() 148 doNothing().when(mSwipeHelper).resetExposedMenuView(true, false); in testOnDownUpdate_ExpandableNotificationRow() 149 doNothing().when(mSwipeHelper).clearCurrentMenuRow(); in testOnDownUpdate_ExpandableNotificationRow() 150 doNothing().when(mSwipeHelper).initializeRow(any()); in testOnDownUpdate_ExpandableNotificationRow() 162 when(mSwipeHelper.getHandler()).thenReturn(mHandler); in testOnDownUpdate_notExpandableNotificationRow() [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/SettingsLib/tests/robotests/src/com/android/settingslib/media/ |
D | BluetoothMediaManagerTest.java | 25 import static org.mockito.Mockito.when; 80 when(mLocalBluetoothManager.getProfileManager()).thenReturn(mProfileManager); in setUp() 81 when(mLocalBluetoothManager.getCachedDeviceManager()).thenReturn(mCachedDeviceManager); in setUp() 82 when(mProfileManager.getA2dpProfile()).thenReturn(mA2dpProfile); in setUp() 83 when(mProfileManager.getHearingAidProfile()).thenReturn(mHapProfile); in setUp() 84 when(mLocalBluetoothManager.getEventManager()).thenReturn(mEventManager); in setUp() 96 when(mA2dpProfile.getConnectableDevices()).thenReturn(devices); in startScan_haveA2dpProfileDeviceIsPreferredAndBonded_shouldAddDevice() 97 when(mCachedDeviceManager.findDevice(bluetoothDevice)).thenReturn(cachedDevice); in startScan_haveA2dpProfileDeviceIsPreferredAndBonded_shouldAddDevice() 98 when(cachedDevice.getBondState()).thenReturn(BluetoothDevice.BOND_BONDED); in startScan_haveA2dpProfileDeviceIsPreferredAndBonded_shouldAddDevice() 99 when(mA2dpProfile.isEnabled(bluetoothDevice)).thenReturn(true); in startScan_haveA2dpProfileDeviceIsPreferredAndBonded_shouldAddDevice() [all …]
|
D | PhoneMediaDeviceTest.java | 21 import static org.mockito.Mockito.when; 62 when(mLocalBluetoothManager.getProfileManager()).thenReturn(mLocalProfileManager); in setUp() 63 when(mLocalProfileManager.getA2dpProfile()).thenReturn(mA2dpProfile); in setUp() 64 when(mLocalProfileManager.getHearingAidProfile()).thenReturn(mHapProfile); in setUp() 65 when(mA2dpProfile.getActiveDevice()).thenReturn(mDevice); in setUp() 72 when(mA2dpProfile.setActiveDevice(null)).thenReturn(true); in connect_phoneDeviceSetActiveSuccess_isConnectedReturnTrue() 73 when(mHapProfile.setActiveDevice(null)).thenReturn(true); in connect_phoneDeviceSetActiveSuccess_isConnectedReturnTrue() 80 when(mA2dpProfile.setActiveDevice(null)).thenReturn(false); in connect_a2dpProfileSetActiveFail_isConnectedReturnFalse() 81 when(mHapProfile.setActiveDevice(null)).thenReturn(true); in connect_a2dpProfileSetActiveFail_isConnectedReturnFalse() 88 when(mA2dpProfile.setActiveDevice(null)).thenReturn(true); in connect_hearingAidProfileSetActiveFail_isConnectedReturnFalse() [all …]
|
D | MediaDeviceTest.java | 20 import static org.mockito.Mockito.when; 108 when(mCachedDevice1.getAddress()).thenReturn(DEVICE_ADDRESS_1); in setUp() 109 when(mCachedDevice2.getAddress()).thenReturn(DEVICE_ADDRESS_2); in setUp() 110 when(mCachedDevice3.getAddress()).thenReturn(DEVICE_ADDRESS_3); in setUp() 111 when(mCachedDevice1.getName()).thenReturn(DEVICE_NAME_1); in setUp() 112 when(mCachedDevice2.getName()).thenReturn(DEVICE_NAME_2); in setUp() 113 when(mCachedDevice3.getName()).thenReturn(DEVICE_NAME_3); in setUp() 114 when(mCachedDevice1.getDevice()).thenReturn(mDevice1); in setUp() 115 when(mCachedDevice2.getDevice()).thenReturn(mDevice2); in setUp() 116 when(mCachedDevice3.getDevice()).thenReturn(mDevice3); in setUp() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | WifiServiceImplTest.java | 72 import static org.mockito.Mockito.when; 342 when(mRequestInfo.getPid()).thenReturn(mPid); in setUp() 343 when(mRequestInfo2.getPid()).thenReturn(mPid2); in setUp() 344 when(mWifiInjector.getUserManager()).thenReturn(mUserManager); in setUp() 345 when(mWifiInjector.getWifiCountryCode()).thenReturn(mWifiCountryCode); in setUp() 346 when(mWifiInjector.getWifiController()).thenReturn(mWifiController); in setUp() 347 when(mWifiInjector.getWifiMetrics()).thenReturn(mWifiMetrics); in setUp() 348 when(mWifiInjector.getClientModeImpl()).thenReturn(mClientModeImpl); in setUp() 349 when(mClientModeImpl.syncInitialize(any())).thenReturn(true); in setUp() 350 when(mClientModeImpl.getHandler()).thenReturn(new Handler()); in setUp() [all …]
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
D | PasspointNetworkEvaluatorTest.java | 31 import static org.mockito.Mockito.when; 119 when(provider.getConfig()).thenReturn(passpointConfig); in generateProvider() 120 when(provider.getWifiConfig()).thenReturn(config); in generateProvider() 133 when(networkDetail.isInterworking()).thenReturn(true); in generateScanDetail() 134 when(networkDetail.getAnt()).thenReturn(NetworkDetail.Ant.FreePublic); in generateScanDetail() 140 when(scanDetail.getSSID()).thenReturn(ssid); in generateScanDetail() 141 when(scanDetail.getBSSIDString()).thenReturn(bssid); in generateScanDetail() 142 when(scanDetail.getScanResult()).thenReturn(scanResult); in generateScanDetail() 143 when(scanDetail.getNetworkDetail()).thenReturn(networkDetail); in generateScanDetail() 156 when(mWifiInjector.makeTelephonyManager()).thenReturn(mTelephonyManager); in setUp() [all …]
|
D | ANQPRequestManagerTest.java | 27 import static org.mockito.Mockito.when; 111 when(mHandler.requestANQP(TEST_BSSID, R1_ANQP_WITHOUT_RC)).thenReturn(true); in requestR1ANQPElementsWithoutRC() 124 when(mHandler.requestANQP(TEST_BSSID, R1_ANQP_WITH_RC)).thenReturn(true); in requestR1ANQPElementsWithRC() 137 when(mHandler.requestANQP(TEST_BSSID, R1R2_ANQP_WITHOUT_RC)).thenReturn(true); in requestR1R2ANQPElementsWithoutRC() 150 when(mHandler.requestANQP(TEST_BSSID, R1R2_ANQP_WITH_RC)).thenReturn(true); in requestR1R2ANQPElementsWithRC() 164 when(mHandler.requestANQP(TEST_BSSID, R1_ANQP_WITHOUT_RC)).thenReturn(true); in requestANQPElementsWithPendingRequest() 165 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime); in requestANQPElementsWithPendingRequest() 171 when(mClock.getElapsedSinceBootMillis()).thenReturn(startTime + 1); in requestANQPElementsWithPendingRequest() 177 when(mHandler.requestANQP(TEST_BSSID, R1_ANQP_WITHOUT_RC)).thenReturn(true); in requestANQPElementsWithPendingRequest() 178 when(mClock.getElapsedSinceBootMillis()) in requestANQPElementsWithPendingRequest() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/ |
D | PlatformKeyManagerTest.java | 30 import static org.mockito.Mockito.when; 100 when(mContext.getSystemService(anyString())).thenReturn(mKeyguardManager); in setUp() 101 when(mContext.getSystemServiceName(any())).thenReturn("test"); in setUp() 102 when(mKeyguardManager.isDeviceSecure(USER_ID_FIXTURE)).thenReturn(true); in setUp() 103 when(mGateKeeperService.getSecureUserId(USER_ID_FIXTURE)).thenReturn(USER_SID); in setUp() 216 when(mGateKeeperService.getSecureUserId(USER_ID_FIXTURE)) in init_doesNotCreateDecryptKeyIfNoSid() 229 when(mGateKeeperService.getSecureUserId(USER_ID_FIXTURE)).thenThrow(new RemoteException()); in init_doesNotCreateDecryptKeyOnGateKeeperException() 277 when(mKeyStoreProxy in init_doesNotIncrementGenerationIdIfKeyAvailable() 280 when(mKeyStoreProxy in init_doesNotIncrementGenerationIdIfKeyAvailable() 296 when(mKeyStoreProxy in getDecryptKey_getsDecryptKeyWithCorrectAlias() [all …]
|
/frameworks/base/services/robotests/backup/src/com/android/server/backup/testing/ |
D | TransportTestUtils.java | 25 import static org.mockito.Mockito.when; 89 when(transportManager.getCurrentTransportName()).thenReturn(transport.transportName); in setUpCurrentTransport() 93 when(transportManager.getCurrentTransportClient(any())) in setUpCurrentTransport() 95 when(transportManager.getCurrentTransportClientOrThrow(any())) in setUpCurrentTransport() 99 when(transportManager.getCurrentTransportClient(any())).thenReturn(null); in setUpCurrentTransport() 100 when(transportManager.getCurrentTransportClientOrThrow(any())) in setUpCurrentTransport() 125 when(transportManager.getTransportClient(eq(transportName), any())) in setUpTransport() 127 when(transportManager.getTransportClientOrThrow(eq(transportName), any())) in setUpTransport() 129 when(transportManager.getTransportName(transportComponent)).thenReturn(transportName); in setUpTransport() 130 when(transportManager.getTransportDirName(eq(transportName))) in setUpTransport() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ |
D | BiometricsUnlockControllerTest.java | 28 import static org.mockito.Mockito.when; 83 when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true); in setUp() 84 when(mUpdateMonitor.isDeviceInteractive()).thenReturn(true); in setUp() 85 when(mUnlockMethodCache.isFaceAuthEnabled()).thenReturn(true); in setUp() 86 when(mKeyguardBypassController.onBiometricAuthenticated(any())).thenReturn(true); in setUp() 87 when(mKeyguardBypassController.canPlaySubtleWindowAnimations()).thenReturn(true); in setUp() 110 when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true); in onBiometricAuthenticated_whenFingerprintAndNotInteractive_wakeAndUnlock() 111 when(mUpdateMonitor.isUnlockingWithBiometricAllowed()).thenReturn(true); in onBiometricAuthenticated_whenFingerprintAndNotInteractive_wakeAndUnlock() 112 when(mDozeScrimController.isPulsing()).thenReturn(true); in onBiometricAuthenticated_whenFingerprintAndNotInteractive_wakeAndUnlock() 121 when(mUpdateMonitor.isUnlockingWithBiometricAllowed()).thenReturn(true); in onBiometricAuthenticated_whenFingerprint_dismissKeyguard() [all …]
|