/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/ |
H A D | AccessibilityManagerTest.java | 27 import static org.mockito.Mockito.when; 82 when(mMockService.addClient(any(IAccessibilityManagerClient.class), anyInt())) 103 when(mMockService.getInstalledAccessibilityServiceList(anyInt()))
|
H A D | FingerprintGestureControllerTest.java | 37 import static org.mockito.Mockito.when; 64 when(mMockAccessibilityServiceConnection.isFingerprintGestureDetectionAvailable()) 67 when(mMockAccessibilityServiceConnection.isFingerprintGestureDetectionAvailable())
|
H A D | AccessibilityGestureDetectorTest.java | 21 import static org.mockito.Mockito.when; 83 when(mockResources.getDisplayMetrics()).thenReturn(displayMetricsMock); 85 when(contextMock.getMainLooper()).thenReturn(Looper.myLooper()); 86 when(contextMock.getResources()).thenReturn(mockResources);
|
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ |
H A D | CoreSettingsObserverTest.java | 23 import static org.mockito.Mockito.when; 92 when(mContext.getApplicationInfo()).thenReturn(originalContext.getApplicationInfo()); 95 when(mContext.getContentResolver()).thenReturn(mContentResolver);
|
/frameworks/base/tests/utils/testutils/java/android/app/test/ |
H A D | TestAlarmManager.java | 51 doAnswer(new SetListenerAnswer()).when(mAlarmManager).set(anyInt(), anyLong(), anyString(), 53 doAnswer(new SetListenerAnswer()).when(mAlarmManager).setExact(anyInt(), anyLong(), 56 .when(mAlarmManager).cancel(any(AlarmManager.OnAlarmListener.class));
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/scanner/ |
H A D | WificondPnoScannerTest.java | 74 when(mWifiNative.getInterfaceName()).thenReturn("a_test_interface_name"); 75 when(mContext.getSystemService(Context.ALARM_SERVICE)) 77 when(mContext.getResources()).thenReturn(mResources); 78 when(mClock.getElapsedSinceBootMillis()).thenReturn(SystemClock.elapsedRealtime()); 83 * OnPnoNetworkFound callback when the scan results are received. 101 * Verify that we pause & resume HW PNO scan when a single scan is scheduled and invokes the 102 * OnPnoNetworkFound callback when the scan results are received. 138 * background scan callbacks when scan results are received. 148 * background scan callbacks when scan results are received. 158 * background scan callbacks when sca [all...] |
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/dataconnection/ |
H A D | DcControllerTest.java | 102 doReturn("fake.action_detached").when(mPhone).getActionDetached(); 104 doReturn(1).when(mApnContexts).size(); 108 doReturn(mResult).when(mDc).updateLinkProperty(any(DataCallResponse.class));
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/gsm/ |
H A D | GsmSmsDispatcherTest.java | 23 import static org.mockito.Mockito.when; 111 when(mCountryDetector.detectCountry()) 129 when(mCountryDetector.detectCountry())
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/ |
H A D | ForegroundServiceControllerTest.java | 36 import static org.mockito.Mockito.when; 272 when(sbn.getNotification()).thenReturn(n); 273 when(sbn.getId()).thenReturn(id); 274 when(sbn.getPackageName()).thenReturn(pkg); 275 when(sbn.getTag()).thenReturn(null); 276 when(sbn.getUserId()).thenReturn(userid); 277 when(sbn.getUser()).thenReturn(new UserHandle(userid)); 278 when(sbn.getKey()).thenReturn("MOCK:"+userid+"|"+pkg+"|"+id+"|"+tag);
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/recents/model/ |
H A D | HighResThumbnailLoaderTest.java | 25 import static org.mockito.Mockito.when; 62 when(mMockSystemServicesProxy.getTaskThumbnail(anyInt(), anyBoolean()))
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ |
H A D | NavigationBarFragmentTest.java | 18 import static org.mockito.Mockito.when; 66 when(windowManager.getDefaultDisplay()).thenReturn(
|
/frameworks/base/services/tests/notification/src/com/android/server/notification/ |
H A D | NotificationComparatorTest.java | 24 import static org.mockito.Mockito.when; 85 when(mContext.getResources()).thenReturn(getContext().getResources()); 86 when(mContext.getContentResolver()).thenReturn(getContext().getContentResolver()); 87 when(mContext.getPackageManager()).thenReturn(mPm); 88 when(mContext.getSystemService(eq(Context.TELECOM_SERVICE))).thenReturn(mTm); 89 when(mTm.getDefaultDialerPackage()).thenReturn(callPkg); 93 when(mPm.getApplicationInfoAsUser(anyString(), anyInt(), anyInt())).thenReturn(legacy); 94 when(mContext.getApplicationInfo()).thenReturn(legacy);
|
/frameworks/base/services/tests/servicestests/src/com/android/server/power/ |
H A D | PowerManagerServiceTest.java | 38 import static org.mockito.Mockito.when; 66 when(mBatterySaverPolicy.getBatterySaverPolicy(
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/aware/ |
H A D | WifiAwareDataPathStateManagerTest.java | 32 import static org.mockito.Mockito.when; 111 when(mMockContext.getSystemService(Context.ALARM_SERVICE)) 114 when(mMockContext.getSystemService(Context.CONNECTIVITY_SERVICE)).thenReturn(mMockCm); 124 when(mMockNative.getCapabilities(anyShort())).thenReturn(true); 125 when(mMockNative.enableAndConfigure(anyShort(), any(), anyBoolean(), 127 when(mMockNative.disable(anyShort())).thenReturn(true); 128 when(mMockNative.publish(anyShort(), anyInt(), any())).thenReturn(true); 129 when(mMockNative.subscribe(anyShort(), anyInt(), any())) 131 when(mMockNative.sendMessage(anyShort(), anyInt(), anyInt(), any(), 133 when(mMockNativ [all...] |
/frameworks/opt/setupwizard/library/test/robotest/src/com/android/setupwizardlib/template/ |
H A D | ListViewScrollHandlingDelegateTest.java | 64 doNothing().when(mListView).setOnScrollListener(mListenerCaptor.capture()); 82 doReturn(20).when(mListView).getLastVisiblePosition();
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/ |
H A D | GsmCdmaCallTest.java | 117 doReturn(Call.State.DISCONNECTED).when(mConnection1).getState(); 121 doReturn(Call.State.DISCONNECTED).when(mConnection2).getState();
|
/frameworks/base/core/tests/coretests/src/android/provider/ |
H A D | FontsContractTest.java | 21 import static org.mockito.Mockito.when; 235 when(mPackageManager.resolveContentProvider(anyString(), anyInt())).thenReturn(null); 248 when(mPackageManager.resolveContentProvider(anyString(), anyInt())).thenReturn(info); 258 when(mPackageManager.resolveContentProvider(anyString(), anyInt())).thenReturn(info); 319 when(mPackageManager.resolveContentProvider(anyString(), anyInt())).thenReturn(info); 322 when(signature.toByteArray()).thenReturn(BYTE_ARRAY_COPY); 324 when(signature2.toByteArray()).thenReturn(BYTE_ARRAY_COPY); 327 when(mPackageManager.getPackageInfo(anyString(), anyInt())).thenReturn(packageInfo); 373 when(mPackageManager.resolveContentProvider(anyString(), anyInt())).thenReturn(info); 376 when(signatur [all...] |
/frameworks/base/services/tests/servicestests/src/com/android/server/retaildemo/ |
H A D | RetailDemoModeServiceTest.java | 29 import static org.mockito.Mockito.when; 119 when(mContext.getSystemServiceName(eq(JobScheduler.class))).thenReturn( 121 when(mContext.getSystemService(Context.JOB_SCHEDULER_SERVICE)).thenReturn(mJobScheduler); 122 when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUm); 127 when(mContext.getContentResolver()).thenReturn(mContentResolver); 157 when(mUm.createUser(anyString(), anyInt())).thenReturn(userInfo); 209 when(mUm.hasUserRestriction(UserManager.DISALLOW_SAFE_BOOT, UserHandle.SYSTEM)) 262 when(mUm.getUserInfo(TEST_DEMO_USER)).thenReturn(userInfo); 263 when(mWifiManager.isWifiEnabled()).thenReturn(false); 266 when(mAudioManage [all...] |
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/hotspot2/ |
H A D | PasspointProviderTest.java | 23 import static org.mockito.Mockito.when; 239 when(mKeyStore.putCertInKeyStore(CA_CERTIFICATE_NAME, FakeKeys.CA_CERT0)) 241 when(mKeyStore.putKeyInKeyStore(CLIENT_PRIVATE_KEY_NAME, FakeKeys.RSA_KEY1)) 243 when(mKeyStore.putCertInKeyStore(CLIENT_CERTIFICATE_NAME, FakeKeys.CLIENT_CERT)) 279 when(mKeyStore.putCertInKeyStore(CA_CERTIFICATE_NAME, FakeKeys.CA_CERT0)) 281 when(mKeyStore.putKeyInKeyStore(CLIENT_PRIVATE_KEY_NAME, FakeKeys.RSA_KEY1)) 283 when(mKeyStore.putCertInKeyStore(CLIENT_CERTIFICATE_NAME, FakeKeys.CLIENT_CERT)) 317 when(mKeyStore.putCertInKeyStore(CA_CERTIFICATE_NAME, FakeKeys.CA_CERT0)) 319 when(mKeyStore.putKeyInKeyStore(CLIENT_PRIVATE_KEY_NAME, FakeKeys.RSA_KEY1)) 321 when(mKeyStor [all...] |
/frameworks/base/core/tests/coretests/src/android/os/ |
H A D | MessageQueueTest.java | 212 if (newMsg.when != 0) { 214 "newMsg.when is %d should be 0 after copyFrom", newMsg.when))); 229 "msg.isInUse is false should be true after when processing %d", 234 "msg.arg1 is %d should be %d when processing # %d", 239 "msg.arg2 is %d should be %d when processing # %d", 244 "msg.obj should be 'this' when processing # %d", msg.what))); 248 "msg.replyTo should be null when processing # %d", msg.what))); 253 " mBundle.getString(\"key\") which is %s when processing # %d", 256 if (msg.when ! [all...] |
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
H A D | ShortcutManagerTest10.java | 157 doReturn(getTestContext().getPackageName()).when(mServiceContext).getPackageName(); 158 doReturn(getTestContext().getContentResolver()).when(mServiceContext).getContentResolver(); 161 when(info.getComponentName()).thenReturn( 163 when(info.getUser()).thenReturn(Process.myUserHandle());
|
/frameworks/native/services/surfaceflinger/ |
H A D | DispSync.h | 52 virtual void onDispSyncEvent(nsecs_t when) = 0; 76 // event timestamps, and finally calling endResync when addResyncSample 88 // value. This should be used to prime the model when a display is first 113 // computeNextRefresh computes when the next refresh is expected to begin.
|
/frameworks/opt/telephony/tests/telephonytests/src/android/telephony/ims/ |
H A D | ImsServiceTest.java | 37 import static org.mockito.Mockito.when; 96 when(mTestImsService.mSpyMMTelFeature.getFeatureState()).thenReturn( 103 // when querying it. 147 doThrow(new SecurityException()).when(mMockContext).enforceCallingOrSelfPermission( 162 doThrow(new SecurityException()).when(mMockContext).enforceCallingOrSelfPermission( 178 * Tests that the new ImsService still sends the IMS_SERVICE_UP broadcast when the feature is 200 * Tests that the new ImsService still sends the IMS_SERVICE_DOWN broadcast when the feature is 213 // IMS_SERVICE_DOWN is sent when the service is STATE_INITIALIZING.
|
/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/metrics/ |
H A D | TelephonyMetricsTest.java | 96 doReturn("123").when(mImsCallSession).getCallId(); 97 doReturn("extramessage").when(mImsReasonInfo).getExtraMessage(); 98 doReturn(123).when(mImsReasonInfo).getCode(); 99 doReturn(456).when(mImsReasonInfo).getExtraCode(); 101 doReturn(ROAMING_TYPE_DOMESTIC).when(mServiceState).getVoiceRoamingType(); 102 doReturn(ROAMING_TYPE_DOMESTIC).when(mServiceState).getDataRoamingType(); 103 doReturn("voiceshort").when(mServiceState).getVoiceOperatorAlphaShort(); 104 doReturn("voicelong").when(mServiceState).getVoiceOperatorAlphaLong(); 105 doReturn("datashort").when(mServiceState).getDataOperatorAlphaShort(); 106 doReturn("datalong").when(mServiceStat [all...] |
/frameworks/support/emoji/core/tests/java/android/support/text/emoji/widget/ |
H A D | EmojiInputConnectionTest.java | 31 import static org.mockito.Mockito.when; 82 doReturn(mEditable).when(textView).getEditableText(); 83 when(mInputConnection.deleteSurroundingText(anyInt(), anyInt())).thenReturn(false); 93 when(mInputConnection.deleteSurroundingTextInCodePoints(anyInt(), anyInt())).thenReturn(
|