Home
last modified time | relevance | path

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

12345678910>>...32

/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/
DPhoneSubInfoControllerTest.java52 doReturn(0).when(mSubscriptionController).getPhoneId(eq(0)); in setUp()
53 doReturn(1).when(mSubscriptionController).getPhoneId(eq(1)); in setUp()
54 doReturn(2).when(mTelephonyManager).getPhoneCount(); in setUp()
57 doReturn(mSubscriptionController).when(mSubscriptionController) in setUp()
59 doReturn(mContext).when(mSecondPhone).getContext(); in setUp()
75 doReturn("353626073736741").when(mPhone).getDeviceId(); in testGetDeviceId()
76 doReturn("353626073736742").when(mSecondPhone).getDeviceId(); in testGetDeviceId()
85 doReturn("353626073736741").when(mPhone).getDeviceId(); in testGetDeviceIdWithOutPermission()
86 doReturn("353626073736742").when(mSecondPhone).getDeviceId(); in testGetDeviceIdWithOutPermission()
108 doReturn(AppOpsManager.MODE_ERRORED).when(mAppOsMgr).noteOp( in testGetDeviceIdWithOutPermission()
[all …]
DTelephonyTest.java330 doReturn(mSST).when(mTelephonyComponentFactory) in setUp()
333 doReturn(mUiccProfile).when(mTelephonyComponentFactory) in setUp()
337 doReturn(mCT).when(mTelephonyComponentFactory) in setUp()
339 doReturn(mIccPhoneBookIntManager).when(mTelephonyComponentFactory) in setUp()
341 doReturn(mDcTracker).when(mTelephonyComponentFactory) in setUp()
343 doReturn(mWspTypeDecoder).when(mTelephonyComponentFactory) in setUp()
345 doReturn(mInboundSmsTracker).when(mTelephonyComponentFactory) in setUp()
349 doReturn(mInboundSmsTracker).when(mTelephonyComponentFactory) in setUp()
353 doReturn(mInboundSmsTracker).when(mTelephonyComponentFactory) in setUp()
355 doReturn(mImsCT).when(mTelephonyComponentFactory) in setUp()
[all …]
DCallManagerTest.java103 doReturn(ServiceState.STATE_IN_SERVICE).when(mServiceState).getState(); in setUp()
104 doReturn(mBgCall).when(mPhone).getBackgroundCall(); in setUp()
105 doReturn(mFgCall).when(mPhone).getForegroundCall(); in setUp()
106 doReturn(mRingingCall).when(mPhone).getRingingCall(); in setUp()
107 doReturn(mPhone).when(mBgCall).getPhone(); in setUp()
108 doReturn(mPhone).when(mFgCall).getPhone(); in setUp()
109 doReturn(mPhone).when(mRingingCall).getPhone(); in setUp()
110 doReturn(Call.State.IDLE).when(mBgCall).getState(); in setUp()
111 doReturn(Call.State.IDLE).when(mFgCall).getState(); in setUp()
112 doReturn(Call.State.IDLE).when(mRingingCall).getState(); in setUp()
[all …]
DDefaultPhoneNotifierTest.java67 doReturn(mTelephonyRegisteryMock).when(mTelephonyRegisteryMock) in setUp()
83 doReturn(true).when(mPhone).getCallForwardingIndicator(); in testNotifyCallForwarding()
84 doReturn(1).when(mPhone).getSubId(); in testNotifyCallForwarding()
92 doReturn(Phone.DataActivityState.NONE).when(mPhone).getDataActivityState(); in testNotifyDataActivity()
97 doReturn(1).when(mPhone).getSubId(); in testNotifyDataActivity()
98 doReturn(Phone.DataActivityState.DATAIN).when(mPhone).getDataActivityState(); in testNotifyDataActivity()
107 doReturn(99).when(mSignalStrength).getGsmSignalStrength(); in testNotifySignalStrength()
108 doReturn(mSignalStrength).when(mPhone).getSignalStrength(); in testNotifySignalStrength()
117 doReturn(1).when(mPhone).getSubId(); in testNotifySignalStrength()
118 doReturn(2).when(mPhone).getPhoneId(); in testNotifySignalStrength()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/bluetooth/
DA2dpProfileTest.java23 import static org.mockito.Mockito.when;
67 }).when(mAdapter).getProfileProxy(any(Context.class), any(), eq(BluetoothProfile.A2DP)); in setUp()
76 when(mBluetoothA2dpWrapper.supportsOptionalCodecs(any())).thenReturn( in supportsHighQualityAudio()
80 when(mBluetoothA2dpWrapper.supportsOptionalCodecs(any())).thenReturn( in supportsHighQualityAudio()
84 when(mBluetoothA2dpWrapper.supportsOptionalCodecs(any())).thenReturn( in supportsHighQualityAudio()
91 when(mBluetoothA2dpWrapper.getOptionalCodecsEnabled(any())).thenReturn( in isHighQualityAudioEnabled()
95 when(mBluetoothA2dpWrapper.getOptionalCodecsEnabled(any())).thenReturn( in isHighQualityAudioEnabled()
103 when(mBluetoothA2dpWrapper.getOptionalCodecsEnabled(any())).thenReturn( in isHighQualityAudioEnabled()
105 when(mBluetoothA2dp.getConnectionState(any())).thenReturn( in isHighQualityAudioEnabled()
108 when(mBluetoothA2dpWrapper.supportsOptionalCodecs(any())).thenReturn( in isHighQualityAudioEnabled()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/power/
DPowerUITest.java28 import static org.mockito.Mockito.when;
145 when(mHardProps.getDeviceTemperatures(DEVICE_TEMPERATURE_SKIN, TEMPERATURE_SHUTDOWN)) in testShutdownBasedThreshold()
159 when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true); in testShouldShowLowBatteryWarning_showHybridOnly_overrideThresholdHigh_returnsNoShow()
160 when(mEnhancedEstimates.getLowWarningThreshold()) in testShouldShowLowBatteryWarning_showHybridOnly_overrideThresholdHigh_returnsNoShow()
162 when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS); in testShouldShowLowBatteryWarning_showHybridOnly_overrideThresholdHigh_returnsNoShow()
176 when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true); in testShouldShowLowBatteryWarning_showHybridOnly_overrideThresholdHigh_returnsShow()
177 when(mEnhancedEstimates.getLowWarningThreshold()) in testShouldShowLowBatteryWarning_showHybridOnly_overrideThresholdHigh_returnsShow()
179 when(mEnhancedEstimates.getSevereWarningThreshold()).thenReturn(ONE_HOUR_MILLIS); in testShouldShowLowBatteryWarning_showHybridOnly_overrideThresholdHigh_returnsShow()
193 when(mEnhancedEstimates.isHybridNotificationEnabled()).thenReturn(true); in testShouldShowLowBatteryWarning_showHybridOnly_returnsShow()
194 when(mEnhancedEstimates.getLowWarningThreshold()).thenReturn(PowerUI.THREE_HOURS_IN_MILLIS); in testShouldShowLowBatteryWarning_showHybridOnly_returnsShow()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/
DStatusBarTest.java38 import static org.mockito.Mockito.when;
181 when(commandQueue.asBinder()).thenReturn(new Binder()); in setup()
186 when(mStackScroller.generateLayoutParams(any())).thenReturn(new LayoutParams(0, 0)); in setup()
187 when(mNotificationPanelView.getLayoutParams()).thenReturn(new LayoutParams(0, 0)); in setup()
188 when(powerManagerService.isInteractive()).thenReturn(true); in setup()
189 when(mStackScroller.getActivatedChild()).thenReturn(null); in setup()
195 }).when(mStatusBarKeyguardViewManager).dismissWithAction(any(), any(), anyBoolean()); in setup()
201 }).when(mStatusBarKeyguardViewManager).addAfterKeyguardGoneRunnable(any()); in setup()
205 when(mRemoteInputManager.getController()).thenReturn(mRemoteInputController); in setup()
239 when(mStatusBarKeyguardViewManager.isShowing()).thenReturn(true); in executeRunnableDismissingKeyguard_nullRunnable_showingAndOccluded()
[all …]
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/gsm/
DGsmInboundSmsHandlerTest.java137 doReturn(true).when(mTelephonyManager).getSmsReceiveCapableForPhone(anyInt(), anyBoolean()); in setUp()
138 doReturn(true).when(mSmsStorageMonitor).isStorageAvailable(); in setUp()
141 doReturn(true).when(userManager).isUserUnlocked(); in setUp()
144 doReturn(new int[]{UserHandle.USER_SYSTEM}).when(mIActivityManager).getRunningUserIds(); in setUp()
160 doReturn(1).when(mInboundSmsTracker).getMessageCount(); in setUp()
161 doReturn(1).when(mInboundSmsTracker).getReferenceNumber(); in setUp()
162 doReturn("1234567890").when(mInboundSmsTracker).getAddress(); in setUp()
163 doReturn(1).when(mInboundSmsTracker).getSequenceNumber(); in setUp()
164 doReturn(1).when(mInboundSmsTracker).getIndexOffset(); in setUp()
165 doReturn(-1).when(mInboundSmsTracker).getDestPort(); in setUp()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/
DANQPRequestManagerTest.java27 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/
DPlatformKeyManagerTest.java29 import static org.mockito.Mockito.when;
85 when(mContext.getSystemService(anyString())).thenReturn(mKeyguardManager); in setUp()
86 when(mContext.getSystemServiceName(any())).thenReturn("test"); in setUp()
87 when(mKeyguardManager.isDeviceSecure(USER_ID_FIXTURE)).thenReturn(true); in setUp()
236 when(mKeyStoreProxy in init_doesNotIncrementGenerationIdIfKeyAvailable()
239 when(mKeyStoreProxy in init_doesNotIncrementGenerationIdIfKeyAvailable()
255 when(mKeyStoreProxy in getDecryptKey_getsDecryptKeyWithCorrectAlias()
258 when(mKeyStoreProxy in getDecryptKey_getsDecryptKeyWithCorrectAlias()
271 when(mKeyStoreProxy in getDecryptKey_generatesNewKeyIfOldDecryptKeyWasRemoved()
274 when(mKeyStoreProxy in getDecryptKey_generatesNewKeyIfOldDecryptKeyWasRemoved()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/
DWifiServiceImplTest.java270 when(mRequestInfo.getPid()).thenReturn(mPid); in setUp()
271 when(mRequestInfo2.getPid()).thenReturn(mPid2); in setUp()
272 when(mWifiInjector.getUserManager()).thenReturn(mUserManager); in setUp()
273 when(mWifiInjector.getWifiCountryCode()).thenReturn(mWifiCountryCode); in setUp()
274 when(mWifiInjector.getWifiController()).thenReturn(mWifiController); in setUp()
275 when(mWifiInjector.getWifiMetrics()).thenReturn(mWifiMetrics); in setUp()
276 when(mWifiInjector.getWifiStateMachine()).thenReturn(mWifiStateMachine); in setUp()
277 when(mWifiStateMachine.syncInitialize(any())).thenReturn(true); in setUp()
278 when(mWifiInjector.getWifiStateMachinePrime()).thenReturn(mWifiStateMachinePrime); in setUp()
279 when(mWifiInjector.getWifiServiceHandlerThread()).thenReturn(mHandlerThread); in setUp()
[all …]
DWifiConnectivityManagerTest.java98 when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()); in setUp()
103 when(mCarrierNetworkConfig.isCarrierEncryptionInfoAvailable()).thenReturn(true); in setUp()
157 when(resource.getInteger(R.integer.config_wifi_framework_SECURITY_AWARD)).thenReturn(80); in mockResource()
158 when(resource.getInteger(R.integer.config_wifi_framework_SAME_BSSID_AWARD)).thenReturn(24); in mockResource()
159 when(resource.getBoolean( in mockResource()
161 when(resource.getInteger( in mockResource()
164 when(resource.getInteger( in mockResource()
166 when(resource.getInteger( in mockResource()
168 when(resource.getInteger( in mockResource()
176 when(context.getResources()).thenReturn(mResource); in mockContext()
[all …]
DWificondControlTest.java172 when(mWifiInjector.makeWificond()).thenReturn(mWificond); in setUp()
173 when(mWificond.asBinder()).thenReturn(mWifiCondBinder); in setUp()
174 when(mClientInterface.getWifiScannerImpl()).thenReturn(mWifiScannerImpl); in setUp()
175 when(mWificond.createClientInterface(any())).thenReturn(mClientInterface); in setUp()
176 when(mWificond.createApInterface(any())).thenReturn(mApInterface); in setUp()
177 when(mWificond.tearDownClientInterface(any())).thenReturn(true); in setUp()
178 when(mWificond.tearDownApInterface(any())).thenReturn(true); in setUp()
179 when(mClientInterface.getWifiScannerImpl()).thenReturn(mWifiScannerImpl); in setUp()
180 when(mClientInterface.getInterfaceName()).thenReturn(TEST_INTERFACE_NAME); in setUp()
181 when(mWifiInjector.getWifiMetrics()).thenReturn(mWifiMetrics); in setUp()
[all …]
DWifiControllerTest.java81 when(mSettingsStore.isAirplaneModeOn()).thenReturn(false); in initializeSettingsStore()
82 when(mSettingsStore.isWifiToggleEnabled()).thenReturn(false); in initializeSettingsStore()
83 when(mSettingsStore.isScanAlwaysAvailable()).thenReturn(false); in initializeSettingsStore()
84 when(mSettingsStore.getLocationModeSetting(eq(mContext))) in initializeSettingsStore()
147 when(mSettingsStore.isWifiToggleEnabled()).thenReturn(true); in enableWifi()
158 when(mSettingsStore.isScanAlwaysAvailable()).thenReturn(true); in enableScanMode()
169 when(mSettingsStore.isScanAlwaysAvailable()).thenReturn(true); in testEnterScanModeAtStartWhenSet()
192 when(mSettingsStore.isAirplaneModeOn()).thenReturn(false); in testDoesNotEnterScanModeWhenLocationModeDisabled()
193 when(mSettingsStore.isWifiToggleEnabled()).thenReturn(false); in testDoesNotEnterScanModeWhenLocationModeDisabled()
194 when(mSettingsStore.isScanAlwaysAvailable()).thenReturn(false); in testDoesNotEnterScanModeWhenLocationModeDisabled()
[all …]
/frameworks/base/services/robotests/src/com/android/server/backup/testing/
DTransportTestUtils.java25 import static org.mockito.Mockito.when;
84 when(transportManager.getCurrentTransportClient(any())) in setUpCurrentTransport()
109 when(transportManager.getTransportClient(eq(transportName), any())) in setUpTransport()
111 when(transportManager.getTransportClientOrThrow(eq(transportName), any())) in setUpTransport()
113 when(transportManager.getTransportName(transportComponent)).thenReturn(transportName); in setUpTransport()
114 when(transportManager.getTransportDirName(eq(transportName))) in setUpTransport()
116 when(transportManager.getTransportDirName(eq(transportComponent))) in setUpTransport()
118 when(transportManager.isTransportRegistered(eq(transportName))).thenReturn(true); in setUpTransport()
122 when(transportManager.getTransportClient(eq(transportName), any())).thenReturn(null); in setUpTransport()
123 when(transportManager.getTransportClientOrThrow(eq(transportName), any())) in setUpTransport()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/p2p/
DSupplicantP2pIfaceHalTest.java27 import static org.mockito.Mockito.when;
187 when(mServiceManagerMock.linkToDeath(any(IHwBinder.DeathRecipient.class), in setUp()
189 when(mServiceManagerMock.registerForNotifications(anyString(), anyString(), in setUp()
191 when(mISupplicantMock.linkToDeath(any(IHwBinder.DeathRecipient.class), in setUp()
193 when(mISupplicantP2pIfaceMock.linkToDeath(any(IHwBinder.DeathRecipient.class), in setUp()
195 when(mISupplicantP2pIfaceMock.registerCallback(any(ISupplicantP2pIfaceCallback.class))) in setUp()
289 when(mISupplicantMockV1_1.removeInterface(any(ISupplicant.IfaceInfo.class))) in testTeardown_successV1_1()
315 .when(mISupplicantP2pIfaceMock).getName(any(ISupplicantIface.getNameCallback.class)); in testGetName_success()
334 .when(mISupplicantP2pIfaceMock).getName(any(ISupplicantIface.getNameCallback.class)); in testGetName_failure()
351 .when(mISupplicantP2pIfaceMock).getName(any(ISupplicantIface.getNameCallback.class)); in testGetName_exception()
[all …]
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/util/
DTelephonyUtilTest.java51 when(tm.getSubscriberId()).thenReturn("3214561234567890"); in getSimIdentityEapSim()
52 when(tm.getSimState()).thenReturn(TelephonyManager.SIM_STATE_READY); in getSimIdentityEapSim()
53 when(tm.getSimOperator()).thenReturn("321456"); in getSimIdentityEapSim()
54 when(tm.getCarrierInfoForImsiEncryption(anyInt())).thenReturn(null); in getSimIdentityEapSim()
70 when(tm.getSubscriberId()).thenReturn("3214561234567890"); in getSimIdentityEapAka()
72 when(tm.getSimState()).thenReturn(TelephonyManager.SIM_STATE_READY); in getSimIdentityEapAka()
73 when(tm.getSimOperator()).thenReturn("321456"); in getSimIdentityEapAka()
74 when(tm.getCarrierInfoForImsiEncryption(anyInt())).thenReturn(null); in getSimIdentityEapAka()
91 when(tm.getSubscriberId()).thenReturn("3214561234567890"); in getSimIdentityEapAkaPrime()
92 when(tm.getSimState()).thenReturn(TelephonyManager.SIM_STATE_READY); in getSimIdentityEapAkaPrime()
[all …]
/frameworks/base/packages/Shell/tests/src/com/android/shell/
DBugreportProgressServiceTest.java25 import static org.mockito.Mockito.when;
115 when(mTestContext.userManager.getUserProfiles()).thenReturn( in findSendToAccount_noWorkProfile()
119 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
128 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
139 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
150 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
161 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_noWorkProfile()
178 when(mTestContext.userManager.getUserProfiles()).thenReturn( in findSendToAccount_withWorkProfile_noAccounts()
182 when(mTestContext.accountManager.getAccountsAsUser(eq(10))).thenReturn( in findSendToAccount_withWorkProfile_noAccounts()
186 when(mTestContext.accountManager.getAccountsAsUser(eq(UserHandle.USER_SYSTEM))).thenReturn( in findSendToAccount_withWorkProfile_noAccounts()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/notification/
DEnableZenModeDialogTest.java30 import static org.mockito.Mockito.when;
71 when(mContext.getApplicationContext()).thenReturn(mContext); in setup()
72 when(mContext.getResources()).thenReturn(mResources); in setup()
73 when(mFragment.getContext()).thenReturn(mShadowContext); in setup()
80 when(mContext.getString(com.android.internal.R.string.zen_mode_forever)) in setup()
84 doReturn(alarmsEnabledPolicy).when(mNotificationManager).getNotificationPolicy(); in setup()
90 doNothing().when(mController).bindGenericCountdown(); in setup()
91 doReturn(null).when(mController).getTimeUntilNextAlarmCondition(); in setup()
92 doReturn(0L).when(mController).getNextAlarm(); in setup()
93 doNothing().when(mController).bindNextAlarm(any()); in setup()
[all …]
/frameworks/support/leanback/src/androidTest/java/androidx/leanback/widget/
DPlaybackTransportRowPresenterTest.java28 import static org.mockito.Mockito.when;
167 when(mImpl.isPrepared()).thenReturn(true); in progressUpdating()
168 when(mImpl.getCurrentPosition()).thenReturn(123L); in progressUpdating()
169 when(mImpl.getDuration()).thenReturn(20000L); in progressUpdating()
170 when(mImpl.getBufferedPosition()).thenReturn(321L); in progressUpdating()
188 when(mImpl.getCurrentPosition()).thenReturn(124L); in progressUpdating()
192 when(mImpl.getBufferedPosition()).thenReturn(333L); in progressUpdating()
196 when(mImpl.getDuration()).thenReturn((long) (Integer.MAX_VALUE) * 2); in progressUpdating()
321 when(mImpl.isPrepared()).thenReturn(true); in seekAndConfirm()
322 when(mImpl.getCurrentPosition()).thenReturn(0L); in seekAndConfirm()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/
DQSSecurityFooterTest.java21 import static org.mockito.Mockito.when;
95 when(mSecurityController.isDeviceManaged()).thenReturn(false); in testUnmanaged()
104 when(mSecurityController.isDeviceManaged()).thenReturn(true); in testManagedNoOwnerName()
105 when(mSecurityController.getDeviceOwnerOrganizationName()).thenReturn(null); in testManagedNoOwnerName()
119 when(mSecurityController.isDeviceManaged()).thenReturn(true); in testManagedOwnerName()
120 when(mSecurityController.getDeviceOwnerOrganizationName()) in testManagedOwnerName()
136 when(mSecurityController.isDeviceManaged()).thenReturn(true); in testManagedDemoMode()
137 when(mSecurityController.getDeviceOwnerOrganizationName()).thenReturn(null); in testManagedDemoMode()
139 when(mockUserInfo.isDemo()).thenReturn(true); in testManagedDemoMode()
140 when(mUserManager.getUserInfo(anyInt())).thenReturn(mockUserInfo); in testManagedDemoMode()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DRestrictedLockUtilsTest.java28 import static org.mockito.Mockito.when;
71 when(mContext.getSystemService(Context.DEVICE_POLICY_SERVICE)) in setUp()
73 when(mContext.getSystemService(Context.USER_SERVICE)) in setUp()
75 when(mContext.getPackageManager()) in setUp()
86 when(mUserManager.getUserRestrictionSources(userRestriction, in checkIfRestrictionEnforced_deviceOwner()
104 when(mUserManager.getUserRestrictionSources(userRestriction, in checkIfRestrictionEnforced_profileOwner()
119 when(mContext.getSystemService(Context.DEVICE_POLICY_SERVICE)).thenReturn(null); in checkIfDevicePolicyServiceDisabled_noEnforceAdminForManagedProfile()
128 when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN)) in checkIfDeviceAdminFeatureDisabled_noEnforceAdminForManagedProfile()
150 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesDisabled_oneEnforcedAdminForManagedProfile()
163 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesDisabled_multipleEnforcedAdminForManagedProfile()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
DDozeConfigurationUtil.java21 import static org.mockito.Mockito.when;
35 when(params.getPulseOnSigMotion()).thenReturn(false); in createMockParameters()
36 when(params.getPickupVibrationThreshold()).thenReturn(0); in createMockParameters()
37 when(params.getProxCheckBeforePulse()).thenReturn(true); in createMockParameters()
38 when(params.getPickupSubtypePerformsProxCheck(anyInt())).thenReturn(true); in createMockParameters()
48 when(config.pulseOnDoubleTapEnabled(anyInt())).thenReturn(false); in createMockConfig()
49 when(config.pulseOnPickupEnabled(anyInt())).thenReturn(false); in createMockConfig()
50 when(config.pulseOnNotificationEnabled(anyInt())).thenReturn(true); in createMockConfig()
52 when(config.doubleTapSensorType()).thenReturn(null); in createMockConfig()
53 when(config.pulseOnPickupAvailable()).thenReturn(false); in createMockConfig()
/frameworks/base/services/tests/servicestests/src/com/android/server/wm/
DTaskSnapshotSurfaceTest.java29 import static org.mockito.Mockito.when;
80 when(mockCanvas.getWidth()).thenReturn(200); in fillEmptyBackground_fillHorizontally()
81 when(mockCanvas.getHeight()).thenReturn(100); in fillEmptyBackground_fillHorizontally()
90 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_fillVertically()
91 when(mockCanvas.getHeight()).thenReturn(200); in fillEmptyBackground_fillVertically()
100 when(mockCanvas.getWidth()).thenReturn(200); in fillEmptyBackground_fillBoth()
101 when(mockCanvas.getHeight()).thenReturn(200); in fillEmptyBackground_fillBoth()
111 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_dontFill_sameSize()
112 when(mockCanvas.getHeight()).thenReturn(100); in fillEmptyBackground_dontFill_sameSize()
121 when(mockCanvas.getWidth()).thenReturn(100); in fillEmptyBackground_dontFill_bitmapLarger()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DLockSettingsShellCommandTest.java30 import static org.mockito.Mockito.when;
88 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false); in testWrongPassword()
89 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true); in testWrongPassword()
90 when(mLockPatternUtils.checkPassword("1234", mUserId)).thenReturn(false); in testWrongPassword()
99 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false); in testChangePin()
100 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true); in testChangePin()
101 when(mLockPatternUtils.checkPassword("1234", mUserId)).thenReturn(true); in testChangePin()
111 when(mLockPatternUtils.isLockPatternEnabled(mUserId)).thenReturn(false); in testChangePassword()
112 when(mLockPatternUtils.isLockPasswordEnabled(mUserId)).thenReturn(true); in testChangePassword()
113 when(mLockPatternUtils.checkPassword("1234", mUserId)).thenReturn(true); in testChangePassword()
[all …]

12345678910>>...32