/packages/services/Telephony/tests/src/com/android/phone/ |
D | PhoneGlobalsTest.java | 55 Context realContext = InstrumentationRegistry.getTargetContext(); in testGetImsResources() local 56 String defaultImsMmtelPackage = getResourcesForLocale(realContext, Locale.US).getString( in testGetImsResources() 58 String defaultImsMmtelPackageUk = getResourcesForLocale(realContext, Locale.UK).getString( in testGetImsResources()
|
/packages/modules/Connectivity/tests/integration/src/com/android/server/net/integrationtests/ |
D | ConnectivityServiceIntegrationTest.kt | 121 private var context = TestableContext(realContext) 137 private val realContext get() = InstrumentationRegistry.getInstrumentation().context constant 139 realContext.getResources().getString(com.android.server.net.integrationtests.R.string 142 realContext.getResources().getString(com.android.server.net.integrationtests.R.string 163 val intent = Intent(realContext, NetworkStackInstrumentationService::class.java) in onServiceDisconnected() 165 assertTrue(realContext.bindService(intent, InstrumentationServiceConnection(), in onServiceDisconnected() 208 networkStackClient = TestNetworkStackClient(realContext) in setUp()
|
/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/hibernation/ |
D | HibernationPolicyTest.kt | 69 private lateinit var realContext: Context variable in com.android.permissioncontroller.tests.mocking.hibernation.HibernationPolicyTest 86 realContext = ApplicationProvider.getApplicationContext() in setup() 88 PreferenceManager.getDefaultSharedPreferences(realContext.applicationContext) in setup() 93 filesDir = realContext.cacheDir in setup()
|
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/ |
D | AbstractDownloadProviderFunctionalTest.java | 145 public TestContext(Context realContext) { in TestContext() argument 146 super(realContext, FILENAME_PREFIX); in TestContext() 192 final Context realContext = getContext(); in setUp() local 194 mTestContext = new TestContext(realContext); in setUp()
|
/packages/modules/NetworkStack/tests/unit/src/com/android/networkstack/ |
D | NetworkStackNotifierTest.kt | 157 val realContext = InstrumentationRegistry.getInstrumentation().context in setUp() constant 158 doReturn(realContext.applicationInfo).`when`(mContext).applicationInfo in setUp() 159 doReturn(realContext.packageName).`when`(mContext).packageName in setUp() 162 realContext.packageName, 0, UserHandle.CURRENT) in setUp() 164 realContext.packageName, 0, UserHandle.ALL) in setUp()
|
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/ |
D | NetworkAgentTest.kt | 182 private val realContext: Context in <lambda>() constant 210 private val mCM = realContext.getSystemService(ConnectivityManager::class.java)!! 324 context: Context = realContext, in createNetworkAgent() 342 context: Context = realContext, in createConnectedNetworkAgent() 384 private fun createTunInterface(): TestNetworkInterface = realContext.getSystemService( in createTunInterface() 660 val pkgInfo = realContext.packageManager.getPackageInfo(realContext.opPackageName, in setHoldCarrierPrivilege() 667 val tm = realContext.getSystemService(TelephonyManager::class.java)!! in setHoldCarrierPrivilege() 668 val ccm = realContext.getSystemService(CarrierConfigManager::class.java)!! in setHoldCarrierPrivilege() 711 val tm = realContext.getSystemService(TelephonyManager::class.java)!! in acquireCarrierPrivilege() 762 assumeTrue(realContext.packageManager.hasSystemFeature(FEATURE_TELEPHONY_SUBSCRIPTION)) in testAllowedUids_WithCarrierServicePackage() [all …]
|
D | DscpPolicyTest.kt | 127 private val realContext = InstrumentationRegistry.getContext() in <lambda>() constant in android.net.cts.DscpPolicyTest 128 private val cm = realContext.getSystemService(ConnectivityManager::class.java)!! in <lambda>() 163 val tnm = realContext.getSystemService(TestNetworkManager::class.java)!! in <lambda>() 254 context: Context = realContext, in <lambda>()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivityservice/base/ |
D | CSTestHelpers.kt | 105 internal fun makeMockPackageManager(realContext: Context) = mock<PackageManager>().also { pm -> in makeMockPackageManager() 108 val myPackageName = realContext.packageName in makeMockPackageManager() 109 val myPackageInfo = realContext.packageManager.getPackageInfo(myPackageName, in makeMockPackageManager()
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/ |
D | ContactsMockPackageManager.java | 48 public ContactsMockPackageManager(Context realContext) { in ContactsMockPackageManager() argument 49 mRealContext = realContext; in ContactsMockPackageManager()
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/enterprise/ |
D | EnterprisePolicyGuardTest.java | 327 Context realContext, DevicePolicyManager dpm, UserManager um, PackageManager pm) { in TestMockContext() argument 328 mRealContext = realContext; in TestMockContext()
|
/packages/services/Car/experimental/tests/experimentalcarservice_unit_test/src/com/android/experimentalcar/ |
D | DriverDistractionExperimentalFeatureServiceTest.java | 197 Context realContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); in testConfig_servicesCanBeBound() local 200 String[] preferredDriverAwarenessSuppliers = realContext.getResources().getStringArray( in testConfig_servicesCanBeBound()
|
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivity/ |
D | PermissionMonitorTest.java | 1237 final Context realContext = InstrumentationRegistry.getContext(); in testRealSystemPermission() local 1239 realContext, mNetdService, mBpfNetMaps, mHandlerThread); in testRealSystemPermission() 1240 final PackageManager manager = realContext.getPackageManager(); in testRealSystemPermission()
|