Home
last modified time | relevance | path

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

/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accounts/
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
216 targetContext = context.createPackageContext(authDesc.packageName, 0); in getTargetContext()
222 return targetContext; in getTargetContext()
[all …]
/packages/apps/Launcher3/tests/src_common/com/android/launcher3/common/
DWidgetUtils.java46 LauncherAppWidgetProviderInfo info, Context targetContext, boolean bindWidget) { in createWidgetInfo() argument
66 Bundle options = pendingInfo.getDefaultSizeOptions(targetContext); in createWidgetInfo()
68 AppWidgetHost host = new LauncherAppWidgetHost(targetContext); in createWidgetInfo()
70 if (!new WidgetManagerHelper(targetContext) in createWidgetInfo()
83 public static void addItemToScreen(ItemInfo item, Context targetContext) { in addItemToScreen() argument
84 ContentResolver resolver = targetContext.getContentResolver(); in addItemToScreen()
95 ContentWriter writer = new ContentWriter(targetContext); in addItemToScreen()
103 writer.getValues(targetContext)); in addItemToScreen()
/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/ui/television/
DTelevisionUiBaseTest.kt31 val bodySensorsPermissionLabel by lazy { getPermGroupLabel(targetContext, SENSORS) } in <lambda>()
32 val cameraPermissionLabel by lazy { getPermGroupLabel(targetContext, CAMERA) } in <lambda>()
33 val otherPermissionsLabel by lazy { targetContext.getString(R.string.other_permissions_label) } in <lambda>()
35 targetContext.getString(R.string.additional_permissions_label) in <lambda>()
/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/TvSettings/Settings/src/com/android/tv/settings/
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()
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/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/role/model/
DRoleParserTest.kt26 private val targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext() constant
30 RoleParser(targetContext, true).parse() in testParseRolesWithValidation()
/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/ui/
DUiBaseTest.kt31 protected val targetContext = instrumentation.targetContext!! in <lambda>() constant
/packages/apps/Settings/tests/unit/src/com/android/settings/deviceinfo/
DPrivateVolumeForgetTest.java44 Context targetContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); in test_invalidSetupDoesNotCrashSettings() local
45 Intent intent = new Intent(targetContext, Settings.PrivateVolumeForgetActivity.class); in test_invalidSetupDoesNotCrashSettings()
/packages/apps/Launcher3/quickstep/tests/src/com/android/quickstep/
DNavigationModeSwitchRule.java175 final Context targetContext = getInstrumentation().getTargetContext();
183 targetContext.getMainExecutor().execute(() ->
187 targetContext.getMainExecutor().execute(() ->
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/parser/
DDisclaimersParserTest.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()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
DManagedProvisioningSharedPreferencesTest.java54 Context targetContext = InstrumentationRegistry.getTargetContext(); in setUp() local
55 mSharedPreferences = targetContext.getSharedPreferences(KEY_TEST_SHARED_PREFERENCE, in setUp()
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/archives/
DTestUtils.java38 public TestUtils(Context targetContext, Context testContext, ExecutorService executor) { in TestUtils() argument
39 mTargetContext = targetContext; in TestUtils()
/packages/apps/Launcher3/robolectric_tests/unstaged/
DSettingsCacheTest.java48 Context targetContext = RuntimeEnvironment.application; in setup() local
49 mSettingsCache = SettingsCache.INSTANCE.get(targetContext); in setup()
/packages/services/Telephony/tests/src/com/android/phone/
DCallFeaturesSettingTest.java61 Context targetContext = InstrumentationRegistry.getTargetContext(); in setUp() local
62 doReturn(targetContext).when(mMockPhone).getContext(); in setUp()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/
DContactsManagerTest.java150 public ContextWithMockContentResolver(final Context targetContext) { in ContextWithMockContentResolver() argument
151 super(targetContext, "test"); in ContextWithMockContentResolver()
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/keyboard/internal/
DMoreKeySpecSplitTests.java46 final Context targetContext = InstrumentationRegistry.getTargetContext(); in setUp() local
47 final Resources targetRes = targetContext.getResources(); in setUp()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/device/
DDevicePrefFragment.java296 final Context targetContext = getContext() in updateCastSettings() local
299 castPref.setIcon(targetContext.getDrawable(info.getIconResource())); in updateCastSettings()
/packages/apps/TV/tuner/tests/unittests/javatests/com/android/tv/tuner/
DZappingTimeTest.java265 private static File createCacheFile(Context context, Context targetContext, String filename) in createCacheFile() argument
267 File cacheFile = new File(targetContext.getCacheDir(), filename); in createCacheFile()
DZappingTimeTestExoV2.java292 private static File createCacheFile(Context context, Context targetContext, String filename) in createCacheFile() argument
294 File cacheFile = new File(targetContext.getCacheDir(), filename); in createCacheFile()
/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/
DPermissionHub2Test.kt44 private val context = instrumentation.targetContext
/packages/apps/Settings/tests/robotests/src/com/android/settings/inputmethod/
DInputMethodAndSubtypePreferenceControllerTest.java96 private InputMethodInfo createInputMethodInfo(final String name, Context targetContext) { in createInputMethodInfo() argument
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/util/
DLauncherModelHelper.java164 Context targetContext = RuntimeEnvironment.application; in initializeData() local
184 bgDataModel.addItem(targetContext, in initializeData()
/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/ui/handheld/
DManageStandardPermissionsFragmentTest.kt64 private val context = InstrumentationRegistry.getInstrumentation().targetContext