Home
last modified time | relevance | path

Searched refs:realContext (Results 1 – 12 of 12) sorted by relevance

/packages/services/Telephony/tests/src/com/android/phone/
DPhoneGlobalsTest.java55 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/
DConnectivityServiceIntegrationTest.kt121 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/
DHibernationPolicyTest.kt69 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/
DAbstractDownloadProviderFunctionalTest.java145 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/
DNetworkStackNotifierTest.kt157 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/
DNetworkAgentTest.kt182 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 …]
DDscpPolicyTest.kt127 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/
DCSTestHelpers.kt105 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/
DContactsMockPackageManager.java48 public ContactsMockPackageManager(Context realContext) { in ContactsMockPackageManager() argument
49 mRealContext = realContext; in ContactsMockPackageManager()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/enterprise/
DEnterprisePolicyGuardTest.java327 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/
DDriverDistractionExperimentalFeatureServiceTest.java197 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/
DPermissionMonitorTest.java1237 final Context realContext = InstrumentationRegistry.getContext(); in testRealSystemPermission() local
1239 realContext, mNetdService, mBpfNetMaps, mHandlerThread); in testRealSystemPermission()
1240 final PackageManager manager = realContext.getPackageManager(); in testRealSystemPermission()