Home
last modified time | relevance | path

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

12345678910>>...17

/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.java36 InstrumentationRegistry.getTargetContext(), NativeService.Local.class) in getLocalNativeService()
41 InstrumentationRegistry.getTargetContext(), JavaService.Local.class) in getLocalJavaService()
46 InstrumentationRegistry.getTargetContext(), NativeService.Remote.class) in getRemoteNativeService()
51 InstrumentationRegistry.getTargetContext(), JavaService.Remote.class) in getRemoteJavaService()
56 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/tests/tests/preference/src/android/preference/cts/
DTestUtils.java51 mContext = mInstrumentation.getTargetContext(); in TestUtils()
129 int resourceId = mInstrumentation.getTargetContext().getResources() in getStatusBarHeight()
132 mStatusBarHeight = mInstrumentation.getTargetContext().getResources() in getStatusBarHeight()
146 int resourceId = mInstrumentation.getTargetContext().getResources() in getNavigationBarHeight()
149 mNavigationBarHeight = mInstrumentation.getTargetContext().getResources() in getNavigationBarHeight()
158 return mInstrumentation.getTargetContext().getResources().getConfiguration().orientation in isLandscape()
/cts/tests/tests/graphics/src/android/graphics/fonts/
DFontFamilyTest.java44 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_SingleFont()
54 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont()
69 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont_overrideWeight()
84 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont_overrideItalic()
99 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont_SameStyle()
109 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont_SameStyle_overrideWeight()
119 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_MultipleFont_SameStyle_overrideItalic()
DFontTest.java62 Context ctx = InstrumentationRegistry.getTargetContext(); in getTempFile()
127 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_buffer()
148 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_buffer_ttc()
170 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_buffer_vf()
194 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_buffer_override()
243 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_file()
269 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_file_ttc()
296 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_file_vf()
325 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_file_override()
383 AssetManager am = InstrumentationRegistry.getTargetContext().getAssets(); in testBuilder_fd()
[all …]
/cts/hostsidetests/appsecurity/test-apps/rro/OverlayApp/src/com/android/cts/overlay/app/
DOverlayableTest.java66 private Context getTargetContext() throws Exception { in getTargetContext() method in OverlayableTest
67 return InstrumentationRegistry.getTargetContext().createPackageContext(TARGET_PACKAGE, 0); in getTargetContext()
88 Context context = getTargetContext(); in testOverlayPolicyAll()
115 Context context = getTargetContext(); in testSameSignatureNoOverlayableSucceeds()
142 assertTrue(InstrumentationRegistry.getTargetContext().getAssets().getOverlayableMap( in testFrameworkDoesNotDefineOverlayable()
148 Context context = getTargetContext(); in testCannotOverlayAssets()
/cts/tests/tests/appwidget/src/android/appwidget/cts/
DAppWidgetTestCase.java65 return getInstrumentation().getTargetContext().getPackageManager() in hasAppWidgets()
96 assertEquals(getInstrumentation().getTargetContext().getPackageName(), in verifyInstalledProviders()
125 assertEquals(getInstrumentation().getTargetContext().getPackageName(), in verifyInstalledProviders()
149 return getInstrumentation().getTargetContext().getResources() in getNormalizedDimensionResource()
154 return getInstrumentation().getTargetContext().getResources().getInteger(resId); in getIntResource()
159 getInstrumentation().getTargetContext().getPackageName(), in getFirstWidgetComponent()
165 getInstrumentation().getTargetContext().getPackageName(), in getSecondWidgetComponent()
186 return (AppWidgetManager) getInstrumentation().getTargetContext() in getAppWidgetManager()
DAppWidgetTest.java89 .getTargetContext().getCacheDir().getPath()); in setUpDexmaker()
95 Assume.assumeTrue(getInstrumentation().getTargetContext() in testInstantAppsCannotProvideAppWidgets()
103 Assume.assumeTrue(getInstrumentation().getTargetContext() in testInstantAppsCannotHostAppWidgets()
106 AppWidgetHost host = new AppWidgetHost(getInstrumentation().getTargetContext(), 0); in testInstantAppsCannotHostAppWidgets()
137 .getTargetContext().getSystemService(Context.USER_SERVICE); in testGetAppInstalledProvidersForCurrentUserNewAllProfiles()
158 AppWidgetHost host = new AppWidgetHost(getInstrumentation().getTargetContext(), 0); in testBindAppWidget()
196 AppWidgetHost host1 = new AppWidgetHost(getInstrumentation().getTargetContext(), 1); in testGetAppWidgetIdsForHost()
197 AppWidgetHost host2 = new AppWidgetHost(getInstrumentation().getTargetContext(), 2); in testGetAppWidgetIdsForHost()
240 AppWidgetHost host = new AppWidgetHost(getInstrumentation().getTargetContext(), 0); in testAppWidgetProviderCallbacks()
352 AppWidgetHost host = new AppWidgetHost(getInstrumentation().getTargetContext(), 0); in testTwoAppWidgetProviderCallbacks()
[all …]
DBlockingBroadcastReceiver.java43 InstrumentationRegistry.getTargetContext().unregisterReceiver(this); in onReceive()
57 InstrumentationRegistry.getTargetContext().registerReceiver( in register()
DUpdateProviderInfoTest.java128 mHost = new AppWidgetHost(getInstrumentation().getTargetContext(), HOST_ID) { in createHost()
152 getInstrumentation().getTargetContext().sendBroadcast(intent); in updateInfo()
174 .getTargetContext()).getInstalledProvidersForPackage( in getProviderInfo()
/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()
DActivityManagerTest.java207 mInstrumentation.getTargetContext().registerReceiver(this, filter);
212 mInstrumentation.getTargetContext().unregisterReceiver(this);
302 intent.setClass(mInstrumentation.getTargetContext(), MockService.class);
304 mInstrumentation.getTargetContext().startService(intent);
338 final Context targetContext = mInstrumentation.getTargetContext();
386 mInstrumentation.getTargetContext().startService(mIntent);
390 mInstrumentation.getTargetContext().stopService(mIntent);
478 Context context = mInstrumentation.getTargetContext();
535 Context context = mInstrumentation.getTargetContext();
583 Context context = mInstrumentation.getTargetContext();
DInstrumentation_ActivityMonitorTest.java51 Context context = instrumentation.getTargetContext(); in testActivityMonitor()
95 final Context context = instrumentation.getTargetContext(); in testActivityMonitor_onStartActivity()
135 final Context context = instrumentation.getTargetContext(); in testActivityMonitor_onStartActivityBlocks()
184 final Context context = instrumentation.getTargetContext(); in testActivityMonitor_onStartActivityAndIntentFilter()
236 final Context context = instrumentation.getTargetContext(); in testActivityMonitor_onStartActivityAndActivityClass()
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DWindowFocusTests.java105 getInstrumentation().getTargetContext() in tapOnCenterOfDisplay()
124 return getInstrumentation().getTargetContext().getPackageManager() in supportsMultiDisplay()
130 return getInstrumentation().getTargetContext().getResources() in perDisplayFocusEnabled()
155 getInstrumentation().getTargetContext()).getDisplayId(); in testKeyReceiving()
201 getInstrumentation().getTargetContext()).getDisplayId(); in testMovingDisplayToTopByKeyEvent()
246 getInstrumentation().getTargetContext()).getDisplayId(); in testPointerCapture()
277 getInstrumentation().getTargetContext()).getDisplayId(); in testDisplayChanged()
302 getInstrumentation().getTargetContext()).getDisplayId(); in testTapFocusableWindow()
327 getInstrumentation().getTargetContext()).getDisplayId(); in testTapNonFocusableWindow()
/cts/tests/tests/provider/src/android/provider/cts/
DSettings_SystemTest.java49 final String packageName = InstrumentationRegistry.getTargetContext().getPackageName(); in setUp()
59 final String packageName = InstrumentationRegistry.getTargetContext().getPackageName(); in tearDown()
66 final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver(); in testSystemSettings()
132 final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver(); in testGetDefaultValues()
DProviderTestUtils.java75 MediaStore.getExternalVolumeNames(InstrumentationRegistry.getTargetContext())); in getSharedVolumeNames()
200 final Context context = InstrumentationRegistry.getTargetContext(); in stageFile()
218 final Context context = InstrumentationRegistry.getTargetContext(); in stageFile()
232 final Context context = InstrumentationRegistry.getTargetContext(); in stageMedia()
246 return MediaStore.scanFile(InstrumentationRegistry.getTargetContext(), file); in scanFile()
250 return MediaStore.scanFileFromShell(InstrumentationRegistry.getTargetContext(), file); in scanFileFromShell()
254 MediaStore.scanVolume(InstrumentationRegistry.getTargetContext(), file); in scanVolume()
314 try (Cursor c = InstrumentationRegistry.getTargetContext().getContentResolver().query(uri, in containsId()
DSettings_NameValueTableTest.java41 final String packageName = InstrumentationRegistry.getTargetContext().getPackageName(); in setUp()
51 final String packageName = InstrumentationRegistry.getTargetContext().getPackageName(); in tearDown()
58 final ContentResolver cr = InstrumentationRegistry.getTargetContext().getContentResolver(); in testPutString()
/cts/tests/camera/src/android/hardware/camera2/cts/
DIdleUidTest.java76 final CameraManager cameraManager = InstrumentationRegistry.getTargetContext() in testCameraAccessForIdleUid()
89 final CameraManager cameraManager = InstrumentationRegistry.getTargetContext() in testCameraAccessBecomingInactiveUid()
198 + InstrumentationRegistry.getTargetContext().getPackageName() in makeMyPackageActive()
205 + InstrumentationRegistry.getTargetContext().getPackageName() + " idle" in makeMyPackageIdle()
/cts/tests/tests/graphics/src/android/graphics/drawable/cts/
DAdaptiveIconDrawableTest.java64 Resources r = InstrumentationRegistry.getTargetContext().getResources(); in testInflate()
98 InstrumentationRegistry.getTargetContext().getDrawable(R.drawable.pass)); in testInvalidateDrawable()
106 InstrumentationRegistry.getTargetContext().getDrawable(R.drawable.pass), in testScheduleDrawable()
119 InstrumentationRegistry.getTargetContext().getDrawable(R.drawable.pass), () -> {}); in testUnscheduleDrawable()
154 Context context = InstrumentationRegistry.getTargetContext(); in testDrawWithoutSetBounds()
183 Context context = InstrumentationRegistry.getTargetContext(); in testDrawSetBounds()
300 Resources res = InstrumentationRegistry.getTargetContext().getResources(); in testMutate()
316 Context context = InstrumentationRegistry.getTargetContext(); in testGetForegroundBackground()
334 Context context = InstrumentationRegistry.getTargetContext(); in testGetIntrinsicWidth()
346 Context context = InstrumentationRegistry.getTargetContext(); in testGetIntrinsicHeight()
/cts/hostsidetests/backup/ProfileKeyValueApp/src/android.cts.backup.profilekeyvalueapp/
DProfileKeyValueBackupRestoreTest.java19 import static androidx.test.InstrumentationRegistry.getTargetContext;
46 Context context = getTargetContext(); in setUp()
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/
DExternalSourcesInstantAppsTest.kt35 private val pm = InstrumentationRegistry.getTargetContext().packageManager
36 private val packageName = InstrumentationRegistry.getTargetContext().packageName
/cts/tests/tests/content/src/android/content/pm/cts/
DInstallSessionTransferTest.java87 ResolveInfo installer = InstrumentationRegistry.getInstrumentation().getTargetContext() in getPackageInstallerPackageName()
118 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in createSession()
129 Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); in transferSession()
204 session.transfer(InstrumentationRegistry.getInstrumentation().getTargetContext() in transferToOwnerWithoutInstallPermission()

12345678910>>...17