Home
last modified time | relevance | path

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

12345678910>>...26

/aosp12/frameworks/base/apct-tests/perftests/packagemanager/src/android/os/
H A DPackageManagerPerfTest.java72 InstrumentationRegistry.getInstrumentation().getTargetContext().getPackageManager(); in testCheckPermissionExists()
91 InstrumentationRegistry.getInstrumentation().getTargetContext().getPackageManager(); in testCheckPermissionDoesntExist()
110 InstrumentationRegistry.getInstrumentation().getTargetContext().getPackageManager(); in testQueryIntentActivities()
129 InstrumentationRegistry.getInstrumentation().getTargetContext().getPackageManager(); in testGetPackageInfo()
147 InstrumentationRegistry.getInstrumentation().getTargetContext().getPackageManager(); in testGetApplicationInfo()
165 InstrumentationRegistry.getInstrumentation().getTargetContext().getPackageManager(); in testGetActivityInfo()
183 InstrumentationRegistry.getInstrumentation().getTargetContext().getPackageManager(); in testGetInstalledPackages()
/aosp12/packages/providers/MediaProvider/tests/client/src/com/android/providers/media/client/
H A 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()
/aosp12/frameworks/base/core/tests/coretests/src/android/content/
H A DContextTest.java73 InstrumentationRegistry.getInstrumentation().getTargetContext(); in testDisplayIdForTestContext()
81 InstrumentationRegistry.getInstrumentation().getTargetContext(); in testDisplayIdForDefaultDisplayContext()
93 InstrumentationRegistry.getInstrumentation().getTargetContext(); in testStartActivityAsUserNullIntentNullUser()
100 InstrumentationRegistry.getInstrumentation().getTargetContext(); in testStartActivityAsUserNullIntentNonNullUser()
107 InstrumentationRegistry.getInstrumentation().getTargetContext(); in testStartActivityAsUserNonNullIntentNullUser()
114 InstrumentationRegistry.getInstrumentation().getTargetContext(); in testStartActivityAsUserNonNullIntentNonNullUser()
/aosp12/frameworks/base/core/tests/coretests/src/android/provider/
H A DFontsContractE2ETest.java58 final Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();
77 InstrumentationRegistry.getInstrumentation().getTargetContext()); in setUp()
83 InstrumentationRegistry.getInstrumentation().getTargetContext()); in tearDown()
117 Context ctx = inst.getTargetContext(); in typefaceCacheTest()
156 Context ctx = inst.getTargetContext(); in typefaceNotCacheTest()
179 Context ctx = inst.getTargetContext(); in typefaceNullFdTest()
/aosp12/packages/apps/Contacts/tests/src/com/android/contacts/model/account/
H A 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()
H A DAccountTypeTest.java37 final Context c = getInstrumentation().getTargetContext(); in testGetResourceText()
63 final Context c = getInstrumentation().getTargetContext(); in testGetInviteContactActionLabel()
108 getInstrumentation().getTargetContext()).compare(lhs, rhs);
/aosp12/packages/apps/Settings/tests/uitests/src/com/android/settings/ui/
H A 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()
/aosp12/frameworks/opt/setupwizard/library/recyclerview/test/instrumentation/src/com/android/setupwizardlib/test/
H A DHeaderRecyclerViewTest.java77 mHeaderAdapter.setHeader(new View(InstrumentationRegistry.getTargetContext())); in testNotifyItemChangedWithHeader()
97 mHeaderAdapter.setHeader(new View(InstrumentationRegistry.getTargetContext())); in testNotifyItemInsertedWithHeader()
117 mHeaderAdapter.setHeader(new View(InstrumentationRegistry.getTargetContext())); in testNotifyItemRemovedWithHeader()
137 mHeaderAdapter.setHeader(new View(InstrumentationRegistry.getTargetContext())); in testNotifyItemMovedWithHeader()
/aosp12/frameworks/base/startop/view_compiler/dex_builder_test/src/android/startop/test/
H A DApkLayoutCompilerTest.java28 Context context = InstrumentationRegistry.getTargetContext(); in loadDexFile()
45 Context context = InstrumentationRegistry.getTargetContext(); in loadAndInflateLayout1()
54 Context context = InstrumentationRegistry.getTargetContext(); in loadAndInflateLayout2()
/aosp12/frameworks/base/apct-tests/perftests/core/src/android/content/pm/
H A DPackageManagerBenchmark.java38 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in createUserContextBenchmark()
49 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in getResourcesForApplication_byStarAsUser()
61 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in getResourcesApplication_byCreateContextAsUser()
/aosp12/frameworks/base/core/tests/coretests/src/android/content/res/
H A DResourcesDrawableTest.java43 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in testLoadColorAsDrawable()
51 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in testLoadColorAsDrawableFailureThrowsOriginalException()
76 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in testLoadNormalDrawableInColorDir()
/aosp12/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/provisioning/
H A DProvisioningControllerFactoryTest.java69 mFactory.createProvisioningController(InstrumentationRegistry.getTargetContext(), in testProfileOwner()
80 mFactory.createProvisioningController(InstrumentationRegistry.getTargetContext(), in testDeviceOwner()
91 mFactory.createProvisioningController(InstrumentationRegistry.getTargetContext(), in testFinancedDevice()
/aosp12/frameworks/base/core/tests/coretests/src/android/view/
H A DScrollCaptureSearchResultsTest.java19 import static androidx.test.InstrumentationRegistry.getTargetContext;
149 ViewGroup targetView1 = new FakeView(getTargetContext(), 0, 0, 60, 60, 1); in testRanking()
156 ViewGroup targetView2 = new FakeView(getTargetContext(), 0, 0, 60, 60, 2); in testRanking()
163 ViewGroup targetView3 = new FakeView(getTargetContext(), 0, 0, 60, 60, 3); in testRanking()
170 ViewGroup targetView4 = new FakeView(getTargetContext(), 0, 0, 60, 60, 4); in testRanking()
177 ViewGroup targetView5 = new FakeView(getTargetContext(), 0, 0, 60, 60, 5); in testRanking()
185 ViewGroup targetView6 = new FakeView(getTargetContext(), 0, 0, 60, 60, 6); in testRanking()
307 View mockView = new View(getTargetContext()); in createTarget()
/aosp12/packages/apps/Launcher3/tests/src/com/android/launcher3/ui/widget/
H A 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()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/
H A DSystemActionPerformerTest.java79 …InstrumentationRegistry.getTargetContext(), 0, new Intent(INTENT_ACTION1), PendingIntent.FLAG_MUTA…
86 …InstrumentationRegistry.getTargetContext(), 0, new Intent(INTENT_ACTION2), PendingIntent.FLAG_MUTA…
232 br.register(InstrumentationRegistry.getTargetContext()); in testPerformSystemActionNewAction()
239 br.unregister(InstrumentationRegistry.getTargetContext()); in testPerformSystemActionNewAction()
252 br.register(InstrumentationRegistry.getTargetContext()); in testPerformSystemActionOverrideLegacyActionUsingLegacyActionId()
259 br.unregister(InstrumentationRegistry.getTargetContext()); in testPerformSystemActionOverrideLegacyActionUsingLegacyActionId()
/aosp12/packages/apps/Launcher3/tests/tapl/com/android/launcher3/tapl/
H A DTestHelpers.java20 import static androidx.test.InstrumentationRegistry.getTargetContext;
74 if (instrumentation.getTargetContext() == null) { in getLauncherInMyProcess()
78 List<ResolveInfo> launchers = getTargetContext().getPackageManager() in getLauncherInMyProcess()
79 .queryIntentActivities(getHomeIntentInPackage(getTargetContext()), 0); in getLauncherInMyProcess()
/aosp12/frameworks/base/core/tests/coretests/src/android/os/
H A DPowerManagerVrTest.java49 Context context = getInstrumentation().getTargetContext(); in setUp()
50 mPm = (PowerManager) getInstrumentation().getTargetContext().getSystemService( in setUp()
141 Context context = getInstrumentation().getTargetContext(); in setTestVrListener()
/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
H A DRecoverySnapshotListenersStorageTest.java43 InstrumentationRegistry.getTargetContext(), /*requestCode=*/ 1, in hasListener_isTrueForRegisteredUid()
53 Context context = InstrumentationRegistry.getTargetContext(); in setSnapshotListener_invokesIntentImmediatelyIfPreviouslyNotified()
74 Context context = InstrumentationRegistry.getTargetContext(); in setSnapshotListener_doesNotRepeatedlyInvokeListener()
/aosp12/frameworks/base/core/tests/coretests/src/android/graphics/
H A DFontFileUtilTest.java51 Context ctx = InstrumentationRegistry.getTargetContext(); in getTempFile()
106 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testRegularFonts()
121 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testTtcFont()
137 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testVariationFont()
/aosp12/frameworks/base/core/tests/coretests/src/android/widget/
H A DListViewTest.java98 return getInstrumentation().getTargetContext().getResources(); in getResources()
103 return getInstrumentation().getTargetContext().getTheme(); in getTheme()
109 return getInstrumentation().getTargetContext().getSystemService(name); in getSystemService()
/aosp12/packages/apps/Messaging/tests/src/com/android/messaging/ui/
H A DBugleActivityUnitTestCase.java44 TestUtil.testSetup(getInstrumentation().getTargetContext(), this); in setUp()
46 setActivityContext(new ContextThemeWrapper(getInstrumentation().getTargetContext(), in setUp()
H A DBugleActivityTest.java39 new ActivityInstrumentationTestCaseIntent(getInstrumentation().getTargetContext(), in setUp()
43 FakeFactory.register(getInstrumentation().getTargetContext()) in setUp()
/aosp12/packages/apps/WallpaperPicker2/tests/src/com/android/wallpaper/picker/
H A 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()
/aosp12/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/
H A DCameraTestHelper.java74 InstrumentationRegistry.getInstrumentation().getTargetContext()
100 InstrumentationRegistry.getInstrumentation().getTargetContext() in setupCameraTest()
135 InstrumentationRegistry.getInstrumentation().getTargetContext() in cleanupTestImages()
/aosp12/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/preprovisioning/terms/
H A DTermsActivityTest.java72 private static final String HEADER_0_PO = InstrumentationRegistry.getTargetContext()
74 private static final String HEADER_0_DO = InstrumentationRegistry.getTargetContext()
91 private Context mContext = InstrumentationRegistry.getTargetContext();
127 PackageManager pm = InstrumentationRegistry.getTargetContext().getPackageManager(); in expanderTest()
192 PackageManager pm = InstrumentationRegistry.getTargetContext().getPackageManager(); in expanderTest_automotive()

12345678910>>...26