/packages/modules/Connectivity/tests/unit/java/android/net/ |
D | ConnectivityManagerTest.java | 100 @Mock Context mCtx; field in ConnectivityManagerTest 234 ConnectivityManager manager = new ConnectivityManager(mCtx, mService); in testCallbackRelease() 262 ConnectivityManager manager = new ConnectivityManager(mCtx, mService); in testCallbackRecycling() 305 ConnectivityManager manager = new ConnectivityManager(mCtx, mService); in noDoubleCallbackRegistration() 312 when(mCtx.getApplicationInfo()).thenReturn(info); in noDoubleCallbackRegistration() 332 final ConnectivityManager manager = new ConnectivityManager(mCtx, mService); in testDefaultNetworkActiveListener() 347 ConnectivityManager manager = new ConnectivityManager(mCtx, mService); in testArgumentValidation() 397 final ConnectivityManager manager = new ConnectivityManager(mCtx, mService); in testRequestType() 398 when(mCtx.getOpPackageName()).thenReturn(testPkgName); in testRequestType() 399 when(mCtx.getAttributionTag()).thenReturn(testAttributionTag); in testRequestType() [all …]
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | DnsManagerTest.java | 104 @Mock Context mCtx; field in DnsManagerTest 128 when(mCtx.getContentResolver()).thenReturn(mContentResolver); in setUp() 129 mDnsManager = new DnsManager(mCtx, mMockDnsResolver); in setUp() 180 ConnectivitySettingsManager.setPrivateDnsMode(mCtx, PRIVATE_DNS_MODE_PROVIDER_HOSTNAME); in testTrackedValidationUpdates() 181 ConnectivitySettingsManager.setPrivateDnsHostname(mCtx, "strictmode.com"); in testTrackedValidationUpdates() 288 ConnectivitySettingsManager.setPrivateDnsMode(mCtx, PRIVATE_DNS_MODE_OFF); in testIgnoreUntrackedValidationUpdates() 306 final PrivateDnsConfig cfgAuto = DnsManager.getPrivateDnsConfig(mCtx); in testOverrideDefaultMode() 312 ConnectivitySettingsManager.setPrivateDnsDefaultMode(mCtx, PRIVATE_DNS_MODE_OFF); in testOverrideDefaultMode() 313 final PrivateDnsConfig cfgOff = DnsManager.getPrivateDnsConfig(mCtx); in testOverrideDefaultMode() 319 ConnectivitySettingsManager.setPrivateDnsMode(mCtx, PRIVATE_DNS_MODE_PROVIDER_HOSTNAME); in testOverrideDefaultMode() [all …]
|
D | AutomaticOnOffKeepaliveTrackerTest.java | 121 @Mock Context mCtx; field in AutomaticOnOffKeepaliveTrackerTest 304 doReturn(serviceName).when(mCtx).getSystemServiceName(serviceClass); in mockService() 305 doReturn(service).when(mCtx).getSystemService(serviceName); in mockService() 306 if (mCtx.getSystemService(serviceClass) == null) { in mockService() 308 doCallRealMethod().when(mCtx).getSystemService(serviceClass); in mockService() 329 doReturn(PERMISSION_GRANTED).when(mCtx).checkPermission(any() /* permission */, in setup() 331 ConnectivityResources.setResourcesContextForTest(mCtx); in setup() 333 doReturn(mockResources).when(mCtx).getResources(); in setup() 340 doReturn(true).when(mKeepaliveTrackerDeps).isAddressTranslationEnabled(mCtx); in setup() 341 doReturn(new ConnectivityResources(mCtx)).when(mKeepaliveTrackerDeps) in setup() [all …]
|
D | LingerMonitorTest.java | 85 @Mock Context mCtx; field in LingerMonitorTest 94 when(mCtx.getResources()).thenReturn(mResources); in setUp() 95 when(mCtx.getPackageName()).thenReturn("com.android.server.connectivity"); in setUp() 96 doReturn(mPackageManager).when(mCtx).getPackageManager(); in setUp() 97 ConnectivityResources.setResourcesContextForTest(mCtx); in setUp() 99 mMonitor = new TestableLingerMonitor(mCtx, mNotifier, HIGH_DAILY_LIMIT, HIGH_RATE_LIMIT); in setUp() 206 mMonitor = new TestableLingerMonitor(mCtx, mNotifier, HIGH_DAILY_LIMIT, LOW_RATE_LIMIT); in testRateLimiting() 232 mMonitor = new TestableLingerMonitor(mCtx, mNotifier, LOW_DAILY_LIMIT, HIGH_RATE_LIMIT); in testDailyLimiting() 376 new NetworkScore.Builder().setLegacyInt(50).build(), mCtx, null, in nai()
|
D | NetworkNotificationManagerTest.java | 156 @Mock Context mCtx; field in NetworkNotificationManagerTest 187 doReturn(mResources).when(mCtx).getResources(); in setUp() 188 doReturn(mPm).when(mCtx).getPackageManager(); in setUp() 189 doReturn(new ApplicationInfo()).when(mCtx).getApplicationInfo(); in setUp() 190 final Context asUserCtx = mock(Context.class, AdditionalAnswers.delegatesTo(mCtx)); in setUp() 192 doReturn(asUserCtx).when(mCtx).createContextAsUser(eq(UserHandle.ALL), anyInt()); in setUp() 193 doReturn(mNotificationManager).when(mCtx) in setUp() 196 ConnectivityResources.setResourcesContextForTest(mCtx); in setUp() 212 mManager = new NetworkNotificationManager(mCtx, mTelephonyManager); in setUp()
|
D | IpConnectivityMetricsTest.java | 81 @Mock Context mCtx; field in IpConnectivityMetricsTest 97 mService = new IpConnectivityMetrics(mCtx, (ctx) -> 2000); in setUp()
|
/packages/services/Mms/tests/robotests/src/com/android/mms/service/ |
D | MmsNetworkManagerTest.java | 72 @Mock Context mCtx; field in MmsNetworkManagerTest 86 doReturn(mCm).when(mCtx).getSystemService(Context.CONNECTIVITY_SERVICE); in setup() 87 doReturn(mCm).when(mCtx).getSystemService(ConnectivityManager.class); in setup() 95 doReturn(mCarrierConfigManager).when(mCtx).getSystemService(Context.CARRIER_CONFIG_SERVICE); in setup() 98 mMnm = new MmsNetworkManager(mCtx, TEST_SUBID, mDeps); in setup() 215 MmsNetworkManager mmsNetworkManager = new MmsNetworkManager(mCtx, TEST_SUBID, mDeps); in testHandleCarrierConfigChanged() 223 mmsNetworkManager = new MmsNetworkManager(mCtx, TEST_SUBID, mDeps); in testHandleCarrierConfigChanged()
|
/packages/modules/AdServices/sdksandbox/tests/unittest/src/android/app/sdksandbox/ |
D | SandboxedSdkContextUnitTest.java | 228 assertThat(service.mCtx).isSameInstanceAs(sandboxedSdkContext); in testGetSystemService_registered_mutatesService() 318 private Context mCtx; field in SandboxedSdkContextUnitTest.TestService 321 mCtx = ctx; in TestService() 326 mCtx = ctx; in initialize()
|
/packages/modules/Virtualization/tests/helper/src/java/com/android/microdroid/test/device/ |
D | MicrodroidDeviceTestBase.java | 123 private final Context mCtx = ApplicationProvider.getApplicationContext(); field in MicrodroidDeviceTestBase 128 return mCtx; in getContext() 132 return mCtx.getSystemService(VirtualMachineManager.class); in getVirtualMachineManager() 136 return new VirtualMachineConfig.Builder(mCtx) in newVmConfigBuilderWithPayloadConfig() 143 return new VirtualMachineConfig.Builder(mCtx) in newVmConfigBuilderWithPayloadBinary() 215 .that(mCtx.getPackageManager().hasSystemFeature(FEATURE_VIRTUALIZATION_FRAMEWORK)) in assumeFeatureVirtualizationFramework()
|
/packages/apps/Launcher3/quickstep/src/com/android/quickstep/ |
D | TaskAnimationManager.java | 65 private final Context mCtx; field in TaskAnimationManager 101 mCtx = ctx; in TaskAnimationManager() 105 return SystemUiProxy.INSTANCE.get(mCtx); in getSystemUiProxy() 254 && DisplayController.getNavigationMode(mCtx) != NO_BUTTON) { in startRecentsAnimation()
|