Home
last modified time | relevance | path

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

/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accounts/
DAccountsFragment.java96 Context targetContext = getTargetContext(getContext(), authDesc); in updateAccounts() local
97 if (targetContext == null) { in updateAccounts()
101 String authTitle = getAuthTitle(targetContext, authDesc); in updateAccounts()
109 Drawable authImage = getAuthImage(targetContext, authDesc); in updateAccounts()
171 final Context targetContext = getTargetContext(context, authDesc); in setUpAddAccountPrefIntent() local
172 if (targetContext == null) { in setUpAddAccountPrefIntent()
175 String authTitle = getAuthTitle(targetContext, authDesc); in setUpAddAccountPrefIntent()
192 Context targetContext = null; in getTargetContext() local
194 targetContext = context.createPackageContext(authDesc.packageName, 0); in getTargetContext()
200 return targetContext; in getTargetContext()
[all …]
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/parser/
DDeviceAdminIconParserTest.java66 Context targetContext = InstrumentationRegistry.getTargetContext(); in setUpClass() local
67 ContentResolver cr = targetContext.getContentResolver(); in setUpClass()
68 TEST_FILE_DIR = new File(targetContext.getFilesDir(), TEST_FILE_DIRNAME); in setUpClass()
80 Context targetContext = InstrumentationRegistry.getTargetContext(); in setUp() local
84 when(mContext.getContentResolver()).thenReturn(targetContext.getContentResolver()); in setUp()
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/Launcher3/robolectric_tests/src/com/android/launcher3/model/
DBaseModelUpdateTaskTestCase.java57 public Context targetContext; field in BaseModelUpdateTaskTestCase
89 targetContext = RuntimeEnvironment.application; in setUp()
92 iconCache = new MyIconCache(targetContext, idp); in setUp()
98 when(appState.getContext()).thenReturn(targetContext); in setUp()
136 bgDataModel.addItem(targetContext, in initializeData()
DAddWorkspaceItemsTaskTest.java160 bgDataModel.addItem(targetContext, info, false); in setupWorkspaceWithHoles()
163 ContentWriter writer = new ContentWriter(targetContext); in setupWorkspaceWithHoles()
166 targetContext.getContentResolver().insert(Favorites.CONTENT_URI, in setupWorkspaceWithHoles()
167 writer.getValues(targetContext)); in setupWorkspaceWithHoles()
/packages/apps/Launcher3/quickstep/tests/src/com/android/quickstep/
DNavigationModeSwitchRule.java172 final Context targetContext = getInstrumentation().getTargetContext(); in apply() local
181 SysUINavigationMode.INSTANCE.get(targetContext); in apply()
182 targetContext.getMainExecutor().execute(() -> in apply()
185 targetContext.getMainExecutor().execute(() -> in apply()
/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/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/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/DocumentsUI/tests/unit/com/android/documentsui/archives/
DTestUtils.java42 public TestUtils(Context targetContext, Context testContext, ExecutorService executor) { in TestUtils() argument
43 mTargetContext = targetContext; in TestUtils()
/packages/services/Telephony/tests/src/com/android/phone/
DCallFeaturesSettingTest.java60 Context targetContext = InstrumentationRegistry.getTargetContext(); in setUp() local
61 doReturn(targetContext).when(mMockPhone).getContext(); in setUp()
/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/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/apps/TvSettings/Settings/src/com/android/tv/settings/device/
DDevicePrefFragment.java179 final Context targetContext = getContext() in updateCastSettings() local
182 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/apps/Settings/tests/robotests/src/com/android/settings/inputmethod/
DInputMethodAndSubtypePreferenceControllerTest.java96 private InputMethodInfo createInputMethodInfo(final String name, Context targetContext) { in createInputMethodInfo() argument