Home
last modified time | relevance | path

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

12

/aosp12/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accounts/
H A DAccountsFragment.java103 Context targetContext = getTargetContext(getContext(), authDesc); in updateAccounts() local
104 if (targetContext == null) { in updateAccounts()
108 String authTitle = getAuthTitle(targetContext, authDesc); in updateAccounts()
116 Drawable authImage = getAuthImage(targetContext, authDesc); in updateAccounts()
188 final Context targetContext = getTargetContext(context, authDesc); in setUpAddAccountPrefIntent() local
189 if (targetContext == null) { in setUpAddAccountPrefIntent()
192 String authTitle = getAuthTitle(targetContext, authDesc); in setUpAddAccountPrefIntent()
214 Context targetContext = null; in getTargetContext() local
222 return targetContext; in getTargetContext()
229 authTitle = targetContext.getString(authDesc.labelId); in getAuthTitle()
[all …]
/aosp12/packages/apps/Launcher3/tests/src/com/android/launcher3/util/
H A DWidgetUtils.java52 LauncherAppWidgetProviderInfo info, Context targetContext, boolean bindWidget) { in createWidgetInfo() argument
72 Bundle options = pendingInfo.getDefaultSizeOptions(targetContext); in createWidgetInfo()
74 AppWidgetHost host = new LauncherAppWidgetHost(targetContext); in createWidgetInfo()
76 if (!new WidgetManagerHelper(targetContext) in createWidgetInfo()
89 public static void addItemToScreen(ItemInfo item, Context targetContext) { in addItemToScreen() argument
90 ContentResolver resolver = targetContext.getContentResolver(); in addItemToScreen()
101 ContentWriter writer = new ContentWriter(targetContext); in addItemToScreen()
109 writer.getValues(targetContext)); in addItemToScreen()
/aosp12/system/hwservicemanager/
H A DAccessControl.cpp95 bool AccessControl::checkPermission(const CallingContext& source, const char *targetContext, const … in checkPermission() argument
107 allowed = (selinux_check_access(source.sid.c_str(), targetContext, "hwservice_manager", in checkPermission()
114 char *targetContext = nullptr; in checkPermission() local
118 if (selabel_lookup(mSeHandle, &targetContext, interface, 0) != 0) { in checkPermission()
123 allowed = checkPermission(source, targetContext, perm, interface); in checkPermission()
125 freecon(targetContext); in checkPermission()
/aosp12/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/ui/television/
H A DTelevisionUiBaseTest.kt31 val bodySensorsPermissionLabel by lazy { getPermGroupLabel(targetContext, SENSORS) }
32 val cameraPermissionLabel by lazy { getPermGroupLabel(targetContext, CAMERA) }
33 val otherPermissionsLabel by lazy { targetContext.getString(R.string.other_permissions_label) }
35 targetContext.getString(R.string.additional_permissions_label)
/aosp12/frameworks/base/tests/SurfaceViewBufferTests/src/com/android/test/
H A DSurfaceTracingTestBase.kt56 outputDir = instrumentation.targetContext.dataDir.toPath()) {
65 outputDir = instrumentation.targetContext.dataDir.toPath()) {
87 val tmpDir = instrumentation.targetContext.dataDir.toPath()
99 val screenshotPath = instrumentation.targetContext
/aosp12/packages/apps/Camera2/src/com/android/camera/util/
H A 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()
/aosp12/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/role/model/
H A DRoleParserTest.kt26 private val targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext() regex
30 RoleParser(targetContext, true).parse()
/aosp12/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/ui/
H A DUiBaseTest.kt31 protected val targetContext = instrumentation.targetContext!! regex
/aosp12/packages/apps/Settings/tests/unit/src/com/android/settings/deviceinfo/
H A DPrivateVolumeForgetTest.java44 Context targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); in test_invalidSetupDoesNotCrashSettings() local
45 Intent intent = new Intent(targetContext, Settings.PrivateVolumeForgetActivity.class); in test_invalidSetupDoesNotCrashSettings()
/aosp12/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
H A DManagedProvisioningSharedPreferencesTest.java54 Context targetContext = InstrumentationRegistry.getTargetContext(); in setUp() local
55 mSharedPreferences = targetContext.getSharedPreferences(KEY_TEST_SHARED_PREFERENCE, in setUp()
/aosp12/packages/apps/TvSettings/Settings/src/com/android/tv/settings/
H A 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()
H A DMainFragment.java312 Context targetContext = getContext().createPackageContext(pkgName, 0); in getStringResource() local
313 int resId = targetContext.getResources().getIdentifier( in getStringResource()
316 return targetContext.getResources().getString(resId); in getStringResource()
333 Context targetContext = getContext().createPackageContext(pkgName, 0); in getDrawableResource() local
334 int resId = targetContext.getResources().getIdentifier( in getDrawableResource()
337 return targetContext.getResources().getDrawable(resId); in getDrawableResource()
/aosp12/frameworks/base/test-runner/src/android/test/
H A DProviderTestCase.java96 Context targetContext, Class<T> providerClass, String authority, in newResolverWithContentProviderFromSql() argument
103 targetContext, // The context that file methods are delegated to in newResolverWithContentProviderFromSql()
H A DIsolatedContext.java53 ContentResolver resolver, Context targetContext) { in IsolatedContext() argument
54 super(targetContext); in IsolatedContext()
H A DProviderTestCase2.java222 Context targetContext, String filenamePrefix, Class<T> providerClass, String authority, in newResolverWithContentProviderFromSql() argument
228 targetContext, // The context that file methods are delegated to in newResolverWithContentProviderFromSql()
/aosp12/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/archives/
H A DTestUtils.java38 public TestUtils(Context targetContext, Context testContext, ExecutorService executor) { in TestUtils() argument
39 mTargetContext = targetContext; in TestUtils()
/aosp12/packages/apps/Launcher3/quickstep/tests/src/com/android/quickstep/
H A DNavigationModeSwitchRule.java175 final Context targetContext = getInstrumentation().getTargetContext();
183 targetContext.getMainExecutor().execute(() ->
186 targetContext.getMainExecutor().execute(() ->
/aosp12/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/parser/
H A DDisclaimersParserImplTest.java84 Context targetContext = InstrumentationRegistry.getTargetContext(); in setUpClass() local
85 ContentResolver cr = targetContext.getContentResolver(); in setUpClass()
86 TEST_FILE_DIR = new File(targetContext.getFilesDir(), TEST_FILE_DIRNAME); in setUpClass()
/aosp12/frameworks/base/tests/Input/src/com/android/test/input/
H A DAnrTest.kt61 val contentResolver = mInstrumentation.targetContext.contentResolver
68 val contentResolver = mInstrumentation.targetContext.contentResolver
/aosp12/frameworks/base/tests/testables/src/android/testing/
H A DLayoutInflaterBuilder.java67 public LayoutInflaterBuilder target(@NonNull Context targetContext) { in target() argument
69 mTargetContext = targetContext; in target()
/aosp12/frameworks/base/tests/TaskOrganizerTest/src/com/android/test/taskembed/
H A DResizeTasksSyncTest.kt49 val tmpDir = instrumentation.targetContext.dataDir.toPath()
72 outputDir = instrumentation.targetContext.dataDir.toPath()) {
/aosp12/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/inputmethod/
H A DInputMethodPreferenceTest.java120 final Context targetContext = InstrumentationRegistry.getTargetContext(); in createInputMethodInfo() local
121 final Locale systemLocale = targetContext in createInputMethodInfo()
/aosp12/packages/services/Telephony/tests/src/com/android/phone/
H A DCallFeaturesSettingTest.java61 Context targetContext = InstrumentationRegistry.getTargetContext(); in setUp() local
62 doReturn(targetContext).when(mMockPhone).getContext(); in setUp()
/aosp12/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/internal/
H A DMoreKeySpecSplitTests.java46 final Context targetContext = InstrumentationRegistry.getTargetContext(); in setUp() local
47 final Resources targetRes = targetContext.getResources(); in setUp()
/aosp12/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
H A DContactsManagerTest.java150 public ContextWithMockContentResolver(final Context targetContext) { in ContextWithMockContentResolver() argument
151 super(targetContext, "test"); in ContextWithMockContentResolver()

12