/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accounts/ |
D | AccountsFragment.java | 120 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/ |
D | SimpleActivity.java | 71 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/ |
D | SimpleActivity.java | 71 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/ |
D | SimpleActivity.java | 71 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/ |
D | SimpleActivity.java | 71 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/ |
D | SimpleActivity.java | 70 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/ |
D | SimpleActivity.java | 35 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/ |
D | SimpleActivity.java | 35 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/ |
D | SimpleActivityBase.java | 77 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/ |
D | WidgetUtils.java | 44 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/ |
D | AutoInstallsLayoutTest.kt | 74 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/ |
D | AndroidServices.java | 138 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/ |
D | DocumentsUiTestBase.java | 38 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/ |
D | PermissionHelper.java | 98 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/ |
D | MainActivityTest.kt | 144 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/ |
D | AdapterServiceTest.java | 241 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/ |
D | RoleParserTest.kt | 37 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/ |
D | BasePermissionUiTest.kt | 30 protected val targetContext = instrumentation.targetContext!! constant in com.android.permissioncontroller.permissionui.ui.BasePermissionUiTest
|
/packages/apps/Settings/tests/unit/src/com/android/settings/deviceinfo/ |
D | PrivateVolumeForgetTest.java | 46 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/ |
D | KotlinUtilsTest.kt | 49 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/ |
D | BackupAndRestoreDBSelectionTest.kt | 56 val dbController = ModelDbController(getInstrumentation().targetContext) in oldDatabasesNotPresentAfterRestore() 63 !LauncherPrefs.get(getInstrumentation().targetContext) in oldDatabasesNotPresentAfterRestore()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/ |
D | HotwordSwitchController.java | 228 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/ |
D | ManagedProvisioningSharedPreferencesTest.java | 52 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/ |
D | NavigationModeSwitchRule.java | 162 final Context targetContext = getInstrumentation().getTargetContext(); 170 targetContext.getMainExecutor().execute(() -> 173 targetContext.getMainExecutor().execute(() ->
|
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/util/rule/ |
D | BackAndRestoreRule.kt | 36 private val phoneContext = getInstrumentation().targetContext 61 val file = File(File(getInstrumentation().targetContext.dataDir, "/databases"), dbName) in uploadDatabase()
|