Home
last modified time | relevance | path

Searched refs:targetContext (Results 1 – 25 of 78) sorted by relevance

1234

/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accounts/
DAccountsFragment.java120 Context targetContext = getTargetContext(getContext(), authDesc); in updateAccounts() local
121 if (targetContext == null) { in updateAccounts()
125 String authTitle = getAuthTitle(targetContext, authDesc); in updateAccounts()
133 Drawable authImage = getAuthImage(targetContext, authDesc); in updateAccounts()
211 final Context targetContext = getTargetContext(context, authDesc); in setUpAddAccountPrefIntent() local
212 if (targetContext == null) { in setUpAddAccountPrefIntent()
215 String authTitle = getAuthTitle(targetContext, authDesc); in setUpAddAccountPrefIntent()
237 Context targetContext = null; in getTargetContext() local
239 targetContext = context.createPackageContext(authDesc.packageName, 0); in getTargetContext()
245 return targetContext; in getTargetContext()
[all …]
/packages/modules/AdServices/adservices/tests/cts/sandbox/fledge/src/com/android/tests/sandbox/fledge/
DSimpleActivity.java71 public static void startSimpleActivity(Context targetContext) { in startSimpleActivity() argument
72 targetContext.startActivity(getSimpleActivityIntent()); in startSimpleActivity()
79 public static void stopSimpleActivity(Context targetContext) { in stopSimpleActivity() argument
80 targetContext.startActivity( in stopSimpleActivity()
94 public static void startAndWaitForSimpleActivity(Context targetContext, Duration maxWaitTime) in startAndWaitForSimpleActivity() argument
96 try (WaitForBroadcast waiter = new WaitForBroadcast(targetContext)) { in startAndWaitForSimpleActivity()
98 startSimpleActivity(targetContext); in startAndWaitForSimpleActivity()
/packages/modules/AdServices/adservices/tests/cts/sandbox/topics/src/com/android/tests/sandbox/topics/
DSimpleActivity.java71 public static void startSimpleActivity(Context targetContext) { in startSimpleActivity() argument
72 targetContext.startActivity(getSimpleActivityIntent()); in startSimpleActivity()
79 public static void stopSimpleActivity(Context targetContext) { in stopSimpleActivity() argument
80 targetContext.startActivity( in stopSimpleActivity()
94 public static void startAndWaitForSimpleActivity(Context targetContext, Duration maxWaitTime) in startAndWaitForSimpleActivity() argument
96 try (WaitForBroadcast waiter = new WaitForBroadcast(targetContext)) { in startAndWaitForSimpleActivity()
98 startSimpleActivity(targetContext); in startAndWaitForSimpleActivity()
/packages/modules/AdServices/adservices/tests/cts/sandbox/appsetid/src/com/android/tests/sandbox/appsetid/
DSimpleActivity.java71 public static void startSimpleActivity(Context targetContext) { in startSimpleActivity() argument
72 targetContext.startActivity(getSimpleActivityIntent()); in startSimpleActivity()
79 public static void stopSimpleActivity(Context targetContext) { in stopSimpleActivity() argument
80 targetContext.startActivity( in stopSimpleActivity()
94 public static void startAndWaitForSimpleActivity(Context targetContext, Duration maxWaitTime) in startAndWaitForSimpleActivity() argument
96 try (WaitForBroadcast waiter = new WaitForBroadcast(targetContext)) { in startAndWaitForSimpleActivity()
98 startSimpleActivity(targetContext); in startAndWaitForSimpleActivity()
/packages/modules/AdServices/adservices/tests/cts/sandbox/adid/src/com/android/tests/sandbox/adid/
DSimpleActivity.java71 public static void startSimpleActivity(Context targetContext) { in startSimpleActivity() argument
72 targetContext.startActivity(getSimpleActivityIntent()); in startSimpleActivity()
79 public static void stopSimpleActivity(Context targetContext) { in stopSimpleActivity() argument
80 targetContext.startActivity( in stopSimpleActivity()
94 public static void startAndWaitForSimpleActivity(Context targetContext, Duration maxWaitTime) in startAndWaitForSimpleActivity() argument
96 try (WaitForBroadcast waiter = new WaitForBroadcast(targetContext)) { in startAndWaitForSimpleActivity()
98 startSimpleActivity(targetContext); in startAndWaitForSimpleActivity()
/packages/modules/AdServices/adservices/tests/cts/sandbox/measurement/src/com/android/tests/sandbox/measurement/
DSimpleActivity.java70 public static void startSimpleActivity(Context targetContext) { in startSimpleActivity() argument
71 targetContext.startActivity(getSimpleActivityIntent()); in startSimpleActivity()
78 public static void stopSimpleActivity(Context targetContext) { in stopSimpleActivity() argument
79 targetContext.startActivity( in stopSimpleActivity()
93 public static void startAndWaitForSimpleActivity(Context targetContext, Duration maxWaitTime) in startAndWaitForSimpleActivity() argument
96 new SimpleActivity.WaitForBroadcast(targetContext)) { in startAndWaitForSimpleActivity()
98 startSimpleActivity(targetContext); in startAndWaitForSimpleActivity()
/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/debuggablects/
DSimpleActivity.java35 protected static void startAndWait(Context targetContext, Duration maxWaitTime) in startAndWait() argument
37 SimpleActivityBase.startAndWait(SimpleActivity.class, targetContext, maxWaitTime); in startAndWait()
44 protected static void stop(Context targetContext) { in stop() argument
45 SimpleActivityBase.stop(SimpleActivity.class, targetContext); in stop()
/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/cts/
DSimpleActivity.java35 protected static void startAndWait(Context targetContext, Duration maxWaitTime) in startAndWait() argument
37 SimpleActivityBase.startAndWait(SimpleActivity.class, targetContext, maxWaitTime); in startAndWait()
44 protected static void stop(Context targetContext) { in stop() argument
45 SimpleActivityBase.stop(SimpleActivity.class, targetContext); in stop()
/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/utils/
DSimpleActivityBase.java77 Class<T> activityClass, Context targetContext) { in stop() argument
78 targetContext.startActivity( in stop()
93 Class<T> activityClass, Context targetContext, Duration maxWaitTime) in startAndWait() argument
95 try (WaitForBroadcast waiter = new WaitForBroadcast(targetContext)) { in startAndWait()
97 targetContext.startActivity(getSimpleActivityIntent(activityClass)); in startAndWait()
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/util/
DWidgetUtils.java44 LauncherAppWidgetProviderInfo info, Context targetContext, boolean bindWidget) { in createWidgetInfo() argument
64 Bundle options = pendingInfo.getDefaultSizeOptions(targetContext); in createWidgetInfo()
66 LauncherWidgetHolder holder = LauncherWidgetHolder.newInstance(targetContext); in createWidgetInfo()
69 if (!new WidgetManagerHelper(targetContext) in createWidgetInfo()
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/
DAutoInstallsLayoutTest.kt74 lateinit var targetContext: SandboxModelContext variable in com.android.launcher3.AutoInstallsLayoutTest
85 targetContext = modelHelper.sandboxContext in setup()
164 val apiWrapperMock = spy(ApiWrapper.INSTANCE[targetContext]) in work_item_added_to_home()
165 targetContext.putObject(ApiWrapper.INSTANCE, apiWrapperMock) in work_item_added_to_home()
175 val cache = UserCache.getInstance(targetContext) in work_item_added_to_home()
196 targetContext, in LauncherLayoutBuilder()
199 SourceResources.wrap(targetContext.resources), in LauncherLayoutBuilder()
/packages/apps/Camera2/src/com/android/camera/util/
DAndroidServices.java138 private Object getSystemService(String service, Context targetContext) { in getSystemService() argument
141 if (targetContext == null) targetContext = mContext; in getSystemService()
143 Object result = targetContext.getSystemService(service); in getSystemService()
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/
DDocumentsUiTestBase.java38 protected Context targetContext; field in DocumentsUiTestBase
48 targetContext = instrumentation.getTargetContext(); in setUp()
60 bots = new Bots(device, instrumentation.getUiAutomation(), targetContext, BOTS_TIMEOUT); in setUp()
/packages/modules/HealthFitness/tests/cts/utils/HealthConnectTestUtils/src/android/healthconnect/cts/utils/
DPermissionHelper.java98 final Context targetContext = androidx.test.InstrumentationRegistry.getTargetContext(); in getAppPackageInfo() local
101 targetContext in getAppPackageInfo()
180 final Context targetContext = androidx.test.InstrumentationRegistry.getTargetContext(); in revokeHealthPermissionsPrivileged() local
181 final PackageManager packageManager = targetContext.getPackageManager(); in revokeHealthPermissionsPrivileged()
182 final UserHandle user = targetContext.getUser(); in revokeHealthPermissionsPrivileged()
/packages/providers/MediaProvider/photopicker/tests/src/com/android/photopicker/
DMainActivityTest.kt144 InstrumentationRegistry.getInstrumentation().targetContext, in <lambda>()
171 InstrumentationRegistry.getInstrumentation().targetContext, in <lambda>()
215 InstrumentationRegistry.getInstrumentation().targetContext, in <lambda>()
259 InstrumentationRegistry.getInstrumentation().targetContext, in <lambda>()
304 InstrumentationRegistry.getInstrumentation().targetContext, in <lambda>()
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/btservice/
DAdapterServiceTest.java241 Context targetContext = InstrumentationRegistry.getTargetContext(); in setUp() local
243 mMockContentResolver = new MockContentResolver(targetContext); in setUp()
253 mBluetoothManager = targetContext.getSystemService(BluetoothManager.class); in setUp()
254 mCompanionDeviceManager = targetContext.getSystemService(CompanionDeviceManager.class); in setUp()
255 mDisplayManager = targetContext.getSystemService(DisplayManager.class); in setUp()
256 mPermissionCheckerManager = targetContext.getSystemService(PermissionCheckerManager.class); in setUp()
257 mPermissionManager = targetContext.getSystemService(PermissionManager.class); in setUp()
258 mPowerManager = targetContext.getSystemService(PowerManager.class); in setUp()
260 when(mMockContext.getCacheDir()).thenReturn(targetContext.getCacheDir()); in setUp()
261 when(mMockContext.getUser()).thenReturn(targetContext.getUser()); in setUp()
[all …]
/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/role/model/
DRoleParserTest.kt37 private val targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext() constant
41 RoleParser(targetContext, true).parse() in testParseRolesWithValidation()
/packages/modules/Permission/PermissionController/tests/permissionui/src/com/android/permissioncontroller/permissionui/ui/
DBasePermissionUiTest.kt30 protected val targetContext = instrumentation.targetContext!! constant in com.android.permissioncontroller.permissionui.ui.BasePermissionUiTest
/packages/apps/Settings/tests/unit/src/com/android/settings/deviceinfo/
DPrivateVolumeForgetTest.java46 Context targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); in test_invalidSetupDoesNotCrashSettings() local
47 Intent intent = new Intent(targetContext, Settings.PrivateVolumeForgetActivity.class); in test_invalidSetupDoesNotCrashSettings()
/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/util/
DKotlinUtilsTest.kt49 private val targetContext = InstrumentationRegistry.getInstrumentation().targetContext in <lambda>() constant
54 val drawable = BitmapDrawable(targetContext.resources, bitmap) in <lambda>()
/packages/apps/Launcher3/tests/src/com/android/launcher3/backuprestore/
DBackupAndRestoreDBSelectionTest.kt56 val dbController = ModelDbController(getInstrumentation().targetContext) in oldDatabasesNotPresentAfterRestore()
63 !LauncherPrefs.get(getInstrumentation().targetContext) in oldDatabasesNotPresentAfterRestore()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/
DHotwordSwitchController.java228 Context targetContext = mContext.createPackageContext(pkgName, 0); in getLocalizedStringResource() local
229 int resId = targetContext.getResources().getIdentifier(resource, null, null); in getLocalizedStringResource()
231 return targetContext.getResources().getString(resId); in getLocalizedStringResource()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
DManagedProvisioningSharedPreferencesTest.java52 Context targetContext = InstrumentationRegistry.getTargetContext(); in setUp() local
53 mSharedPreferences = targetContext.getSharedPreferences(KEY_TEST_SHARED_PREFERENCE, in setUp()
/packages/apps/Launcher3/quickstep/tests/src/com/android/quickstep/
DNavigationModeSwitchRule.java162 final Context targetContext = getInstrumentation().getTargetContext();
170 targetContext.getMainExecutor().execute(() ->
173 targetContext.getMainExecutor().execute(() ->
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/util/rule/
DBackAndRestoreRule.kt36 private val phoneContext = getInstrumentation().targetContext
61 val file = File(File(getInstrumentation().targetContext.dataDir, "/databases"), dbName) in uploadDatabase()

1234