Home
last modified time | relevance | path

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

12345678910>>...23

/cts/tests/tests/permission/src/android/permission/cts/
DServicesInstantAppsCannotAccessTests.java47 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetDevicePolicyManager()
53 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetFingerprintManager()
59 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetShortcutManager()
65 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetUsbManager()
71 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetWallpaperManager()
77 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetWifiP2pManager()
83 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetWifiManager()
89 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetWifiAwareManager()
/cts/tests/tests/binder_ndk/src/android/binder/cts/
DNdkBinderTest.java37 InstrumentationRegistry.getTargetContext(), NativeService.Local.class) in getLocalNativeService()
42 InstrumentationRegistry.getTargetContext(), JavaService.Local.class) in getLocalJavaService()
47 InstrumentationRegistry.getTargetContext(), NativeService.Remote.class) in getRemoteNativeService()
52 InstrumentationRegistry.getTargetContext(), JavaService.Remote.class) in getRemoteJavaService()
57 InstrumentationRegistry.getTargetContext(), NativeService.RemoteOld.class) in getRemoteOldNativeService()
/cts/tests/tests/os/src/android/os/health/cts/
DSystemHealthManagerTest.java37 final Context context = getInstrumentation().getTargetContext(); in testTakeMyUidSnapshot()
48 final Context context = getInstrumentation().getTargetContext(); in testTakeUidSnapshotWithMe()
59 final Context context = getInstrumentation().getTargetContext(); in testTakeMyUidSnapshotWithSystem()
77 final Context context = getInstrumentation().getTargetContext(); in testTakeUidSnapshotsWithEmptyArray()
89 final Context context = getInstrumentation().getTargetContext(); in testTakeUidSnapshotsWithMe()
106 final Context context = getInstrumentation().getTargetContext(); in testTakeMyUidSnapshotsWithSystem()
/cts/hostsidetests/backup/SuccessNotificationApp/src/android/cts/backup/successnotificationapp/
DSuccessNotificationTest.java19 import static androidx.test.InstrumentationRegistry.getTargetContext;
41 getTargetContext().getSharedPreferences(PREFS_FILE, Context.MODE_PRIVATE).edit().clear() in clearBackupSuccessNotificationsReceived()
47 assertTrue(getTargetContext().getSharedPreferences(PREFS_FILE, Context.MODE_PRIVATE) in verifyBackupSuccessNotificationReceivedForKeyValueApp()
53 assertTrue(getTargetContext().getSharedPreferences(PREFS_FILE, Context.MODE_PRIVATE) in verifyBackupSuccessNotificationReceivedForFullBackupApp()
/cts/tests/tests/graphics/src/android/graphics/cts/
DTypefaceCustomFallbackBuilderTest.java50 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in createFullFamilyTypeface()
69 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testSingleFont_path()
84 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testSingleFont_ttc()
100 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testSingleFont_vf()
135 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testFamily_selectStyleByBuilder()
160 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testFamily_closestDefault()
179 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testUserFallback()
201 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testMaxCustomFallback()
214 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testMaxCustomFallback_exceed_limits()
236 final AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testUserFallbackOverLocaleFallback()
[all …]
/cts/hostsidetests/appsecurity/test-apps/rro/OverlayApp/src/com/android/cts/overlay/app/
DOverlayableTest.java68 private Context getTargetContext() throws Exception { in getTargetContext() method in OverlayableTest
69 return InstrumentationRegistry.getTargetContext().createPackageContext(TARGET_PACKAGE, 0); in getTargetContext()
76 Context context = getTargetContext(); in assertOverlayEnabled()
92 Context context = getTargetContext(); in testOverlayPolicyAll()
119 Context context = getTargetContext(); in testOverlayCodeNotLoaded()
132 Context context = getTargetContext(); in testSameSignatureNoOverlayableSucceeds()
158 assertTrue(InstrumentationRegistry.getTargetContext().getAssets().getOverlayablesToString( in testFrameworkDoesNotDefineOverlayable()
164 Context context = getTargetContext(); in testCannotOverlayAssets()
/cts/tests/tests/graphics/src/android/graphics/fonts/
DFontFamilyTest.java43 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_SingleFont()
53 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont()
68 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont_overrideWeight()
83 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont_overrideItalic()
98 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont_SameStyle()
108 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont_SameStyle_overrideWeight()
118 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont_SameStyle_overrideItalic()
DFontTest.java70 Context ctx = InstrumentationRegistry.getTargetContext(); in getTempFile()
153 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_buffer()
174 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_buffer_ttc()
196 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_buffer_vf()
220 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_buffer_override()
269 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_file()
295 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_file_ttc()
322 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_file_vf()
351 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_file_override()
409 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_fd()
[all …]
/cts/tests/tests/appwidget/src/android/appwidget/cts/
DAppWidgetDimensionsTest.java38 Resources resources = getInstrumentation().getTargetContext().getResources(); in backgroundRadius_shouldBePositive()
44 Resources resources = getInstrumentation().getTargetContext().getResources(); in backgroundRadius_shouldBeLessThanMaxRadius()
52 Resources resources = getInstrumentation().getTargetContext().getResources(); in innerRadius_shouldBeFixedComparedToBackgroundRadius()
DAppWidgetTestCase.java67 return getInstrumentation().getTargetContext().getPackageManager() in hasAppWidgets()
114 assertEquals(getInstrumentation().getTargetContext().getPackageName(), in verifyInstalledProviders()
163 assertEquals(getInstrumentation().getTargetContext().getPackageName(), in verifyInstalledProviders()
187 return getInstrumentation().getTargetContext().getResources() in getNormalizedDimensionResource()
192 return getInstrumentation().getTargetContext().getResources().getInteger(resId); in getIntResource()
197 getInstrumentation().getTargetContext().getPackageName(), in getFirstWidgetComponent()
203 getInstrumentation().getTargetContext().getPackageName(), in getSecondWidgetComponent()
224 return (AppWidgetManager) getInstrumentation().getTargetContext() in getAppWidgetManager()
DAppWidgetTest.java92 .getTargetContext().getCacheDir().getPath()); in setUpDexmaker()
98 Assume.assumeTrue(getInstrumentation().getTargetContext() in testInstantAppsCannotProvideAppWidgets()
106 Assume.assumeTrue(getInstrumentation().getTargetContext() in testInstantAppsCannotHostAppWidgets()
109 AppWidgetHost host = new AppWidgetHost(getInstrumentation().getTargetContext(), 0); in testInstantAppsCannotHostAppWidgets()
140 .getTargetContext().getSystemService(Context.USER_SERVICE); in testGetAppInstalledProvidersForCurrentUserNewAllProfiles()
161 AppWidgetHost host = new AppWidgetHost(getInstrumentation().getTargetContext(), 0); in testBindAppWidget()
199 AppWidgetHost host1 = new AppWidgetHost(getInstrumentation().getTargetContext(), 1); in testGetAppWidgetIdsForHost()
200 AppWidgetHost host2 = new AppWidgetHost(getInstrumentation().getTargetContext(), 2); in testGetAppWidgetIdsForHost()
243 AppWidgetHost host = new AppWidgetHost(getInstrumentation().getTargetContext(), 0); in testAppWidgetProviderCallbacks()
355 AppWidgetHost host = new AppWidgetHost(getInstrumentation().getTargetContext(), 0); in testTwoAppWidgetProviderCallbacks()
[all …]
/cts/tests/app/src/android/app/cts/
DSearchManagerTest.java33 intent.setClass(getInstrumentation().getTargetContext(), SearchManagerStubActivity.class); in setupActivity()
34 getInstrumentation().getTargetContext().startActivity(intent); in setupActivity()
65 Context context = getInstrumentation().getTargetContext(); in hasGlobalSearchActivity()
DActivityManagerFgsBgStartTest.java119 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
172 WaitForBroadcast waiter = new WaitForBroadcast(mInstrumentation.getTargetContext()); in testFgsLocationStartFromBG()
196 waiter = new WaitForBroadcast(mInstrumentation.getTargetContext()); in testFgsLocationStartFromBG()
230 waiter = new WaitForBroadcast(mInstrumentation.getTargetContext()); in testFgsLocationStartFromBG()
279 WaitForBroadcast waiter = new WaitForBroadcast(mInstrumentation.getTargetContext()); in testFgsLocationStartFromBGTwoProcesses()
307 waiter = new WaitForBroadcast(mInstrumentation.getTargetContext()); in testFgsLocationStartFromBGTwoProcesses()
359 WaitForBroadcast waiter = new WaitForBroadcast(mInstrumentation.getTargetContext()); in testFgsLocationPendingIntent()
382 waiter = new WaitForBroadcast(mInstrumentation.getTargetContext()); in testFgsLocationPendingIntent()
396 waiter = new WaitForBroadcast(mInstrumentation.getTargetContext()); in testFgsLocationPendingIntent()
426 waiter = new WaitForBroadcast(mInstrumentation.getTargetContext()); in testFgsLocationPendingIntent()
[all …]
/cts/tests/tests/provider/src/android/provider/cts/
DProviderTestUtils.java99 InstrumentationRegistry.getTargetContext()); in getSharedVolumeNames()
211 MediaStore.waitForIdle(InstrumentationRegistry.getTargetContext().getContentResolver()); in waitForIdle()
230 final Context context = InstrumentationRegistry.getTargetContext(); in getVolumePath()
239 final StorageVolume vol = InstrumentationRegistry.getTargetContext() in stageDir()
252 final StorageVolume vol = InstrumentationRegistry.getTargetContext() in stageDownloadDir()
262 final Context context = InstrumentationRegistry.getTargetContext(); in stageFile()
307 final Context context = InstrumentationRegistry.getTargetContext(); in stageMedia()
322 .scanFile(InstrumentationRegistry.getTargetContext().getContentResolver(), file); in scanFile()
332 final StorageVolume vol = InstrumentationRegistry.getTargetContext() in scanVolume()
334 MediaStore.scanVolume(InstrumentationRegistry.getTargetContext().getContentResolver(), in scanVolume()
[all …]
/cts/tests/tests/preference/src/android/preference/cts/
DTestUtils.java56 mContext = mInstrumentation.getTargetContext(); in TestUtils()
135 int resourceId = mInstrumentation.getTargetContext().getResources() in getStatusBarHeight()
138 mStatusBarHeight = mInstrumentation.getTargetContext().getResources() in getStatusBarHeight()
152 int resourceId = mInstrumentation.getTargetContext().getResources() in getNavigationBarHeight()
155 mNavigationBarHeight = mInstrumentation.getTargetContext().getResources() in getNavigationBarHeight()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/
DEndToEndImeTestBase.java74 InstrumentationRegistry.getInstrumentation().getTargetContext() in verifyAppModeConsistency()
79 InstrumentationRegistry.getInstrumentation().getTargetContext() in verifyAppModeConsistency()
93 .setClass(InstrumentationRegistry.getInstrumentation().getTargetContext(), in showStateInitializeActivity()
/cts/tests/tests/media/src/android/media/cts/
DMediaSessionManagerTest.java74 mAudioManager = (AudioManager) getInstrumentation().getTargetContext() in setUp()
76 mSessionManager = (MediaSessionManager) getInstrumentation().getTargetContext() in setUp()
117 MediaSession session = new MediaSession(getInstrumentation().getTargetContext(), TAG); in testOnMediaKeyEventSessionChangedListener()
125 Utils.assertMediaPlaybackStarted(getInstrumentation().getTargetContext()); in testOnMediaKeyEventSessionChangedListener()
152 MediaSession session = new MediaSession(getInstrumentation().getTargetContext(), TAG); in testOnMediaKeyEventDispatchedListener()
160 Utils.assertMediaPlaybackStarted(getInstrumentation().getTargetContext()); in testOnMediaKeyEventDispatchedListener()
168 assertEquals(getInstrumentation().getTargetContext().getPackageName(), in testOnMediaKeyEventDispatchedListener()
222 Context context = getInstrumentation().getTargetContext(); in testSetOnVolumeKeyLongPressListener()
266 session = new MediaSession(getInstrumentation().getTargetContext(), TAG); in testSetOnMediaKeyListener()
278 Utils.assertMediaPlaybackStarted(getInstrumentation().getTargetContext()); in testSetOnMediaKeyListener()
[all …]
/cts/tests/tests/view/src/android/view/cts/
DViewConfigurationTest.java76 Context context = InstrumentationRegistry.getTargetContext(); in testInstanceValues()
131 ViewConfiguration vc = ViewConfiguration.get(InstrumentationRegistry.getTargetContext());
138 ViewConfiguration vc = ViewConfiguration.get(InstrumentationRegistry.getTargetContext()); in testGetScaledAmbiguousGestureMultiplier()
145 Context context = InstrumentationRegistry.getTargetContext(); in testGetMaximumDrawingCacheSize()
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/
DExternalSourcesInstantAppsTest.kt30 private val pm = InstrumentationRegistry.getTargetContext().packageManager
31 private val packageName = InstrumentationRegistry.getTargetContext().packageName
/cts/tests/tests/packageinstaller/install_appop_default/src/android/packageinstaller/install_appop_default/cts/
DExternalSourcesInstantAppsTest.kt30 private val pm = InstrumentationRegistry.getTargetContext().packageManager
31 private val packageName = InstrumentationRegistry.getTargetContext().packageName
/cts/tests/tests/packageinstaller/install_appop_denied/src/android/packageinstaller/install_appop_denied/cts/
DExternalSourcesInstantAppsTest.kt30 private val pm = InstrumentationRegistry.getTargetContext().packageManager
31 private val packageName = InstrumentationRegistry.getTargetContext().packageName
/cts/tests/tests/provider/src/android/provider/cts/settings/
DSettings_SystemTest.java52 final String packageName = InstrumentationRegistry.getTargetContext().getPackageName(); in setUp()
62 final String packageName = InstrumentationRegistry.getTargetContext().getPackageName(); in tearDown()
69 final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver(); in testSystemSettings()
149 final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver(); in testSystemSettingsRejectInvalidFontSizeScale()
177 final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver(); in testGetDefaultValues()
/cts/libs/install/src/com/android/cts/install/lib/
DInstallUtils.java86 Context context = InstrumentationRegistry.getTargetContext(); in getInstalledVersion()
120 Context context = InstrumentationRegistry.getTargetContext(); in waitForSession()
157 Context context = InstrumentationRegistry.getTargetContext(); in getPackageInfo()
170 return InstrumentationRegistry.getTargetContext().getPackageManager().getPackageInstaller(); in getPackageInstaller()
271 Context context = InstrumentationRegistry.getTargetContext(); in processUserData()
320 Context context = InstrumentationRegistry.getTargetContext(); in getUserDataVersion()
376 Context context = InstrumentationRegistry.getTargetContext(); in isOnlyInstalledForUser()
/cts/hostsidetests/backup/RestoreSessionTest/src/android/cts/backup/restoresessionapp/
DBaseRestoreSessionAppTest.java19 import static androidx.test.InstrumentationRegistry.getTargetContext;
40 getTargetContext() in setUp()
/cts/tests/tests/content/src/android/content/cts/
DClipDescriptionTest.java67 mContext = InstrumentationRegistry.getTargetContext(); in setUp()
77 InstrumentationRegistry.getTargetContext().getSystemService( in testGetTimestamp()
107 InstrumentationRegistry.getTargetContext().getSystemService( in testIsStyledText()
126 InstrumentationRegistry.getTargetContext().getSystemService( in testNotStyledText()
165 InstrumentationRegistry.getTargetContext().getSystemService( in testClassificationNotPerformedForVeryLongText()
181 InstrumentationRegistry.getTargetContext().getSystemService( in testClassificationConfidenceValuesAreValid()

12345678910>>...23