Home
last modified time | relevance | path

Searched refs:getTargetContext (Results 1 – 25 of 309) sorted by relevance

12345678910>>...13

/packages/apps/Settings/tests/unit/src/com/android/settings/password/
DChooseLockGenericTest.java20 import static androidx.test.InstrumentationRegistry.getTargetContext;
87 mTargetContext = getInstrumentation().getTargetContext(); in setUp()
150 Intent newPasswordIntent = new Intent(getTargetContext(), ChooseLockGeneric.class) in setPassword()
187 assertThat(getTargetContext().getSystemService(KeyguardManager.class).isDeviceSecure()) in setPassword()
193 Intent newPasswordIntent = new Intent(getTargetContext(), ChooseLockGeneric.class) in clearPassword()
216 assertThat(getTargetContext().getSystemService(KeyguardManager.class).isDeviceSecure()) in clearPassword()
222 getTargetContext().getSystemService(ActivityManager.class); in finishAllAppTasks()
DSetupChooseLockGenericTest.java22 import static androidx.test.InstrumentationRegistry.getTargetContext;
59 mContext = getInstrumentation().getTargetContext(); in setUp()
74 new Intent(getTargetContext(), SetupChooseLockGeneric.class) in clickSkipFigerprintPreference_deviceNotProvisioned_shouldBeAbleToProceed()
/packages/apps/Contacts/tests/src/com/android/contacts/model/account/
DExternalAccountTypeTest.java61 final Context c = getInstrumentation().getTargetContext(); in testResolveExternalResId()
91 … final ExternalAccountType type = new ExternalAccountType(getInstrumentation().getTargetContext(), in testNoPackage()
101 … final ExternalAccountType type = new ExternalAccountType(getInstrumentation().getTargetContext(), in testEditSchema()
127 … final ExternalAccountType type = new ExternalAccountType(getInstrumentation().getTargetContext(), in testEditSchema_fallback()
137 getInstrumentation().getTargetContext(), type.resourcePackageName); in testEditSchema_fallback()
155 … final ExternalAccountType type = new ExternalAccountType(getInstrumentation().getTargetContext(), in checkEditSchema_mustHaveChecks()
167 … final ExternalAccountType type = new ExternalAccountType(getInstrumentation().getTargetContext(), in testReadOnlyDefinition()
DAccountTypeTest.java37 final Context c = getInstrumentation().getTargetContext(); in testGetResourceText()
63 final Context c = getInstrumentation().getTargetContext(); in testGetInviteContactActionLabel()
108 getInstrumentation().getTargetContext()).compare(lhs, rhs);
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/
DCarConfigurationServiceTest.java48 InstrumentationRegistry.getTargetContext(), in testJsonResourceSuccessfullyRead()
67 InstrumentationRegistry.getTargetContext(), in testJsonFileSuccessfullyRead()
79 InstrumentationRegistry.getTargetContext(), in testNullJsonStringResultsInNullConfigFile()
100 InstrumentationRegistry.getTargetContext(), in testSpeedBumpConfigurationSuccessfullyRead()
116 InstrumentationRegistry.getTargetContext(), in testDefaultSpeedBumpConfigurationReturned()
/packages/providers/MediaProvider/tests/client/src/com/android/providers/media/client/
DDelegatorTest.java62 mResolver = InstrumentationRegistry.getTargetContext().getContentResolver(); in setUp()
72 assertEquals(InstrumentationRegistry.getTargetContext().getPackageName(), getOwner(uri)); in testPushAllowed()
110 InstrumentationRegistry.getTargetContext().getPackageName()); in testPullBlocked()
137 + " --user " + InstrumentationRegistry.getTargetContext().getUserId() in setOwner()
145 + " --user " + InstrumentationRegistry.getTargetContext().getUserId() in clearOwner()
/packages/apps/Launcher3/tests/src/com/android/launcher3/ui/widget/
DBindWidgetTest.java18 import static androidx.test.InstrumentationRegistry.getTargetContext;
107 LauncherAppWidgetInfo item = createWidgetInfo(info, getTargetContext(), true); in testBindNormalWidget_withConfig()
116 LauncherAppWidgetInfo item = createWidgetInfo(info, getTargetContext(), true); in testBindNormalWidget_withoutConfig()
125 LauncherAppWidgetInfo item = createWidgetInfo(info, getTargetContext(), false); in testUnboundWidget_removed()
146 LauncherAppWidgetInfo item = createWidgetInfo(info, getTargetContext(), false); in testPendingWidget_autoRestored()
159 LauncherAppWidgetInfo item = createWidgetInfo(info, getTargetContext(), false); in testPendingWidget_withConfigScreen()
/packages/apps/Settings/tests/uitests/src/com/android/settings/ui/
DWirelessNetworkSettingsTests.java72 Settings.Global.putString(InstrumentationRegistry.getTargetContext().getContentResolver(), in setUp()
107 InstrumentationRegistry.getTargetContext().getContentResolver(), in verifyWiFiOnOrOff()
118 WifiManager wifiManager = (WifiManager) InstrumentationRegistry.getTargetContext() in loadWiFiSettingsPage()
121 SettingsHelper.launchSettingsPage(InstrumentationRegistry.getTargetContext(), in loadWiFiSettingsPage()
/packages/apps/WallpaperPicker2/tests/src/com/android/wallpaper/picker/
DPreviewActivityTest.java111 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in setUp()
126 InstrumentationRegistry.getInstrumentation().getTargetContext(), mMockWallpaper); in launchActivityIntentWithMockWallpaper()
160 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in testClickSetWallpaper_Success_HomeScreen()
188 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in testClickSetWallpaper_Success_LockScreen()
218 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in testClickSetWallpaper_Success_BothHomeAndLockScreen()
263 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in testClickSetWallpaper_Fails_HomeScreen_ShowsErrorDialog()
302 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in testClickSetWallpaper_Fails_LockScreen_ShowsErrorDialog()
343 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in testClickSetWallpaper_Fails_BothHomeAndLock_ShowsErrorDialog()
/packages/apps/Launcher3/tests/tapl/com/android/launcher3/tapl/
DTestHelpers.java20 import static androidx.test.InstrumentationRegistry.getTargetContext;
68 if (instrumentation.getTargetContext() == null) { in getLauncherInMyProcess()
72 List<ResolveInfo> launchers = getTargetContext().getPackageManager() in getLauncherInMyProcess()
73 .queryIntentActivities(getHomeIntentInPackage(getTargetContext()), 0); in getLauncherInMyProcess()
/packages/apps/TV/tests/unit/src/com/android/tv/data/
DChannelDataManagerTest.java20 import static androidx.test.InstrumentationRegistry.getTargetContext;
91 mContentProvider = new FakeContentProvider(getTargetContext()); in setUp()
109 return getTargetContext().checkSelfPermission(((String) args[0])); in setUp()
179 channelInfoList.add(ChannelInfo.create(getTargetContext(), i)); in testGetChannels()
325 ChannelInfo testChannelInfo = ChannelInfo.create(getTargetContext(), (int) testChannelId); in testChannelListChanged()
424 i, new ChannelInfoWrapper(ChannelInfo.create(getTargetContext(), i))); in FakeContentProvider()
431 return getTargetContext().getContentResolver().openAssetFileDescriptor(url, "r"); in openTypedAssetFile()
530 ChannelInfo.create(getTargetContext(), (int) channelId))); in simulateInsert()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/provisioning/
DProvisioningControllerFactoryTest.java69 mFactory.createProvisioningController(InstrumentationRegistry.getTargetContext(), in testProfileOwner()
80 mFactory.createProvisioningController(InstrumentationRegistry.getTargetContext(), in testDeviceOwner()
91 mFactory.createProvisioningController(InstrumentationRegistry.getTargetContext(), in testFinancedDevice()
/packages/apps/Settings/tests/unit/src/com/android/settings/biometrics/fingerprint/
DFingerprintEnrollFinishTest.java18 import static androidx.test.InstrumentationRegistry.getTargetContext;
57 getTargetContext(), in clickAddAnother_shouldLaunchEnrolling()
74 getTargetContext(), in clickAddAnother_shouldPropagateResults()
/packages/apps/Messaging/tests/src/com/android/messaging/ui/
DBugleActivityTest.java39 new ActivityInstrumentationTestCaseIntent(getInstrumentation().getTargetContext(), in setUp()
43 FakeFactory.register(getInstrumentation().getTargetContext()) in setUp()
DBugleActivityUnitTestCase.java44 TestUtil.testSetup(getInstrumentation().getTargetContext(), this); in setUp()
46 setActivityContext(new ContextThemeWrapper(getInstrumentation().getTargetContext(), in setUp()
/packages/apps/Launcher3/quickstep/tests/src/com/android/quickstep/
DNavigationModeSwitchRule.java77 SysUINavigationMode.INSTANCE.get(getInstrumentation().getTargetContext());
157 getTargetContext()).
175 final Context targetContext = getInstrumentation().getTargetContext();
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/preprovisioning/anim/
DSwiperThemeMatcherTest.java20 import static androidx.test.InstrumentationRegistry.getTargetContext;
34 getTargetContext(), new ColorMatcher());
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/accounts/
DAccountsFragment.java99 Context targetContext = getTargetContext(getContext(), authDesc); in updateAccounts()
174 final Context targetContext = getTargetContext(context, authDesc); in setUpAddAccountPrefIntent()
199 private static Context getTargetContext(Context context, AuthenticatorDescription authDesc) { in getTargetContext() method in AccountsFragment
/packages/apps/Launcher3/tests/src/com/android/launcher3/ui/
DTestViewHelpers.java19 import static androidx.test.InstrumentationRegistry.getTargetContext;
54 return new WidgetManagerHelper(getTargetContext()) in findWidgetProvider()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
DStringConcatenatorTest.java44 mLocaleTestUtils = new LocaleTestUtils(InstrumentationRegistry.getTargetContext()); in setUp()
47 Resources resources = InstrumentationRegistry.getTargetContext().getResources(); in setUp()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/preprovisioning/
DWebActivityTest.java45 Intent intent = WebActivity.createIntent(getInstrumentation().getTargetContext(), null, in testNoUrl()
51 startActivityOnMainSync(WebActivity.createIntent(getInstrumentation().getTargetContext(), in testUrlLaunched()
/packages/apps/Camera2/tests/src/com/android/camera/stress/
DSwitchPreview.java100 intent.setClass(getInstrumentation().getTargetContext(), in testSwitchMode()
106 intent.setClass(getInstrumentation().getTargetContext(), in testSwitchMode()
/packages/apps/LegacyCamera/tests/src/com/android/camera/stress/
DSwitchPreview.java101 intent.setClass(getInstrumentation().getTargetContext(), in testSwitchMode()
107 intent.setClass(getInstrumentation().getTargetContext(), in testSwitchMode()
/packages/apps/CarrierConfig/tests/src/com/android/carrierconfig/
DCarrierConfigTest.java139 int carrierId = getCarrierId(getInstrumentation().getTargetContext(), in testCarrierConfigFileNaming()
214 AssetManager assetMgr = getInstrumentation().getTargetContext().getAssets(); in forEachConfigXml()
240 Resources res = getInstrumentation().getTargetContext().getResources(); in forEachConfigXml()
/packages/apps/Camera2/tests/src/com/android/camera/functional/
DCameraTest.java38 intent.setClass(getInstrumentation().getTargetContext(), CameraActivity.class); in testVideoCaptureIntentFdLeak()
60 intent.setClass(getInstrumentation().getTargetContext(), in checkActivityLeak()

12345678910>>...13