/cts/tests/tests/permission/src/android/permission/cts/ |
D | ServicesInstantAppsCannotAccessTests.java | 47 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/ |
D | NdkBinderTest.java | 36 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/ |
D | SystemHealthManagerTest.java | 37 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/ |
D | SuccessNotificationTest.java | 19 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/ |
D | TypefaceCustomFallbackBuilderTest.java | 50 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/ |
D | TestUtils.java | 51 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/ |
D | FontFamilyTest.java | 44 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()
|
D | FontTest.java | 62 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/ |
D | OverlayableTest.java | 66 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/ |
D | AppWidgetTestCase.java | 65 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()
|
D | AppWidgetTest.java | 89 .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 …]
|
D | BlockingBroadcastReceiver.java | 43 InstrumentationRegistry.getTargetContext().unregisterReceiver(this); in onReceive() 57 InstrumentationRegistry.getTargetContext().registerReceiver( in register()
|
D | UpdateProviderInfoTest.java | 128 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/ |
D | SearchManagerTest.java | 33 intent.setClass(getInstrumentation().getTargetContext(), SearchManagerStubActivity.class); in setupActivity() 34 getInstrumentation().getTargetContext().startActivity(intent); in setupActivity() 65 Context context = getInstrumentation().getTargetContext(); in hasGlobalSearchActivity()
|
D | ActivityManagerTest.java | 207 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();
|
D | Instrumentation_ActivityMonitorTest.java | 51 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/ |
D | WindowFocusTests.java | 105 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/ |
D | Settings_SystemTest.java | 49 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()
|
D | ProviderTestUtils.java | 75 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()
|
D | Settings_NameValueTableTest.java | 41 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/ |
D | IdleUidTest.java | 76 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/ |
D | AdaptiveIconDrawableTest.java | 64 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/ |
D | ProfileKeyValueBackupRestoreTest.java | 19 import static androidx.test.InstrumentationRegistry.getTargetContext; 46 Context context = getTargetContext(); in setUp()
|
/cts/tests/tests/packageinstaller/install/src/android/packageinstaller/install/cts/ |
D | ExternalSourcesInstantAppsTest.kt | 35 private val pm = InstrumentationRegistry.getTargetContext().packageManager 36 private val packageName = InstrumentationRegistry.getTargetContext().packageName
|
/cts/tests/tests/content/src/android/content/pm/cts/ |
D | InstallSessionTransferTest.java | 87 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()
|