Home
last modified time | relevance | path

Searched refs:mockService (Results 1 – 6 of 6) sorted by relevance

/frameworks/base/core/java/android/net/
DNetworkStack.java52 final IBinder mockService = sMockService; in getService() local
53 if (mockService != null) return mockService; in getService()
65 public static void setServiceForTest(@Nullable IBinder mockService) { in setServiceForTest() argument
66 sMockService = mockService; in setServiceForTest()
/frameworks/base/tests/Input/src/com/android/server/input/debug/
DFocusEventDebugViewTest.java59 InputManagerService mockService = mock(InputManagerService.class); in setUp() local
60 when(mockService.monitorInput(anyString(), anyInt())) in setUp()
65 mFocusEventDebugView = new FocusEventDebugView(context, mockService, in setUp()
/frameworks/base/services/tests/VpnTests/java/com/android/server/
DVpnManagerServiceTest.java19 import static com.android.testutils.ContextUtils.mockService;
153 mockService(mContext, ConnectivityManager.class, Context.CONNECTIVITY_SERVICE, mCm); in setUp()
154 mockService(mContext, UserManager.class, Context.USER_SERVICE, mUserManager); in setUp()
/frameworks/base/services/tests/PackageManagerComponentOverrideTests/src/com/android/server/pm/test/override/
DPackageManagerComponentLabelIconOverrideTest.kt195 service = mockService() in <lambda>()
323 private fun mockService(): PackageManagerService { in <lambda>() method in com.android.server.pm.test.override.PackageManagerComponentLabelIconOverrideTest
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/trust/
DTrustManagerServiceTest.java841 ITrustAgentService.Stub mockService = getOrCreateMockTrustAgent(agentComponentName); in addTrustAgent() local
842 mMockContext.addMockService(agentComponentName, mockService); in addTrustAgent()
843 mMockTrustAgents.put(agentComponentName, mockService); in addTrustAgent()
/frameworks/base/services/tests/VpnTests/java/com/android/server/connectivity/
DVpnTest.java380 mockService(UserManager.class, Context.USER_SERVICE, mUserManager); in setUp()
381 mockService(AppOpsManager.class, Context.APP_OPS_SERVICE, mAppOps); in setUp()
382 mockService(NotificationManager.class, Context.NOTIFICATION_SERVICE, mNotificationManager); in setUp()
383 mockService(ConnectivityManager.class, Context.CONNECTIVITY_SERVICE, mConnectivityManager); in setUp()
384 mockService(IpSecManager.class, Context.IPSEC_SERVICE, mIpSecManager); in setUp()
385 mockService(ConnectivityDiagnosticsManager.class, Context.CONNECTIVITY_DIAGNOSTICS_SERVICE, in setUp()
387 mockService(TelephonyManager.class, Context.TELEPHONY_SERVICE, mTelephonyManager); in setUp()
388 mockService(CarrierConfigManager.class, Context.CARRIER_CONFIG_SERVICE, mConfigManager); in setUp()
389 mockService(SubscriptionManager.class, Context.TELEPHONY_SUBSCRIPTION_SERVICE, in setUp()
434 private <T> void mockService(Class<T> clazz, String name, T service) { in mockService() method in VpnTest