Home
last modified time | relevance | path

Searched refs:mTargetContext (Results 1 – 25 of 29) sorted by relevance

12

/cts/tests/framework/base/windowmanager/src/android/server/wm/intent/
DIntentGenerationTests.java94 private Context mTargetContext = getInstrumentation().getTargetContext(); field in IntentGenerationTests
100 mLaunchRunner.runAndWrite(mTargetContext, "forResult", CASES.forResultCases()); in generate()
101 mLaunchRunner.runAndWrite(mTargetContext, "newTask", CASES.newTaskCases()); in generate()
102 mLaunchRunner.runAndWrite(mTargetContext, "newDocumentCases", CASES.newDocumentCases()); in generate()
103 mLaunchRunner.runAndWrite(mTargetContext, "resetTaskIfNeeded", CASES.resetTaskIfNeeded()); in generate()
104 mLaunchRunner.runAndWrite(mTargetContext, "clearCases", CASES.clearCases()); in generate()
126 mLaunchRunner.verify(mTargetContext, testCase); in verifySingle()
/cts/tests/app/src/android/app/cts/
DAttributionTagsTest.java51 private Context mTargetContext; field in AttributionTagsTest
57 mTargetContext = InstrumentationRegistry.getTargetContext(); in setUp()
64 final Intent intent = new Intent(mTargetContext, LocalActivity.class); in testActivity()
78 intent.setComponent(new ComponentName(mTargetContext.getPackageName(), in testActivityAlias()
92 final Intent intent = new Intent(mTargetContext, LocalService.class); in testService()
104 final Intent intent = new Intent(mTargetContext, LocalProvider.class); in testProvider()
116 final Intent intent = new Intent(mTargetContext, LocalReceiver.class); in testReceiver()
DForceStopTest.java88 private Context mTargetContext; field in ForceStopTest
103 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
126 mTargetContext.startActivity(intent); in forceStopAndStartSimpleActivity()
175 mTargetContext.registerReceiver(receiver, filter); in testPackageRestartedBroadcast()
220 mTargetContext.registerReceiver(receiver, filter); in testPackageUnstoppedBroadcast()
264 mTargetContext.registerReceiver(receiver, filter, Context.RECEIVER_EXPORTED); in testBootCompletedBroadcasts_activity()
266 mTargetContext.startActivity(intent); in testBootCompletedBroadcasts_activity()
273 mTargetContext.startActivity(intent); in testBootCompletedBroadcasts_activity()
303 CommandReceiver.sendCommandWithResultReceiver(mTargetContext, in testBootCompletedBroadcasts_broadcast()
322 mTargetContext.registerReceiver(receiver, filter, Context.RECEIVER_EXPORTED); in testBootCompletedBroadcasts_broadcast()
[all …]
DActivityManagerTest.java193 private Context mTargetContext; field in ActivityManagerTest
222 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
309 mTargetContext.startActivity(intent);
323 mTargetContext.startActivity(intent);
501 mTargetContext.stopService(intent);
530 final String targetPackage = mTargetContext.getPackageName();
531 final ActivityManager am = mTargetContext.getSystemService(ActivityManager.class);
623 final ApplicationInfo app1Info = mTargetContext.getPackageManager().getApplicationInfo(
625 final ApplicationInfo stubInfo = mTargetContext.getPackageManager().getApplicationInfo(
643 CommandReceiver.sendCommand(mTargetContext,
[all …]
DAppTaskTests.java77 private Context mTargetContext; field in AppTaskTests
96 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
148 intent.setComponent(new ComponentName(mTargetContext, MockActivity.class)); in testMoveToFront()
177 intent.setComponent(new ComponentName(mTargetContext, MockListActivity.class)); in testStartActivityInTask_NoNewTask()
178 task.startActivity(mTargetContext, intent, null); in testStartActivityInTask_NoNewTask()
198 intent.setComponent(new ComponentName(mTargetContext, MockActivity.class)); in testStartActivityInTask_NewTask()
200 task.startActivity(mTargetContext, intent, null); in testStartActivityInTask_NewTask()
239 ActivityManager am = (ActivityManager) mTargetContext.getSystemService(ACTIVITY_SERVICE); in getAppTasks()
DActivityManagerProcessStateTest.java150 private Context mTargetContext; field in ActivityManagerProcessStateTest
175 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
313 startActivity(mTargetContext, intent); in startAndWaitForHeavyWeightSwitcherActivity()
1022 startActivity(mTargetContext, activityIntent); in testBackgroundCheckActivityService()
1282 startActivity(mTargetContext, activityIntent); in testBgRestrictedForegroundService()
1299 mTargetContext.startActivity(homeIntent); in testBgRestrictedForegroundService()
1305 mTargetContext.startActivity(activityIntent); in testBgRestrictedForegroundService()
1376 startActivity(mTargetContext, activityIntent); in testCantSaveStateLaunchAndBackground()
1393 mTargetContext.startActivity(homeIntent); in testCantSaveStateLaunchAndBackground()
1416 startActivity(mTargetContext, activityIntent); in testCantSaveStateLaunchAndBackground()
[all …]
DActivityManagerFgsDelegateTest.java91 private Context mTargetContext; field in ActivityManagerFgsDelegateTest
103 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
774 MediaSessionManager mediaSessionManager = mTargetContext.getSystemService( in getMediaControllerForActiveSession()
/cts/tests/tests/car/src/android/car/app/cts/
DCarTaskViewControllerTest.java80 private final Context mTargetContext = mInstrumentation.getTargetContext(); field in CarTaskViewControllerTest
82 new ComponentName(mTargetContext, TestActivity.class);
114 mTargetContext.getMainExecutor().execute(() -> in setUp()
117 mTargetContext.getMainExecutor(), in setUp()
154 EmbeddedTestActivity1.createLaunchIntent(mTargetContext) in createControlledRemoteCarTaskView_startsTheTask()
175 EmbeddedTestActivity1.createLaunchIntent(mTargetContext)); in createMultipleControlledRemoteCarTaskView_startsTheTask()
178 EmbeddedTestActivity2.createLaunchIntent(mTargetContext)); in createMultipleControlledRemoteCarTaskView_startsTheTask()
186 .isEqualTo(mTargetContext.getUserId()); in createMultipleControlledRemoteCarTaskView_startsTheTask()
194 .isEqualTo(mTargetContext.getUserId()); in createMultipleControlledRemoteCarTaskView_startsTheTask()
205 EmbeddedTestActivity1.createLaunchIntent(mTargetContext)); in multipleControlledCarTaskView_released_whenHostDestroyed()
[all …]
DCarActivityManagerTest.java79 private final Context mTargetContext = mInstrumentation.getTargetContext(); field in CarActivityManagerTest
82 new ComponentName(mTargetContext, TestActivity.class);
106 Intent.makeMainActivity(new ComponentName(mTargetContext, BlankActivity.class)) in setUp()
281 mTargetContext.getMainExecutor().execute(() -> in getCarTaskViewController()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/performance/
DCameraTestInstrumentation.java40 private Context mTargetContext; field in CameraTestInstrumentation
47 mTargetContext = targetContext; in initialize()
52 mTargetContext = null; in release()
58 return mTargetContext; in getTargetContext()
/cts/tests/framework/base/windowmanager/src/android/server/wm/multidisplay/
DMultiDisplayPrivateDisplayTests.java113 (ActivityManager) mTargetContext.getSystemService(Context.ACTIVITY_SERVICE); in testCantAccessPrivateDisplay()
117 assertFalse(activityManager.isActivityStartAllowedOnDisplay(mTargetContext, in testCantAccessPrivateDisplay()
130 (ActivityManager) mTargetContext.getSystemService(Context.ACTIVITY_SERVICE); in testCanAccessPrivateDisplayWithInternalPermission()
136 assertTrue(activityManager.isActivityStartAllowedOnDisplay(mTargetContext, in testCanAccessPrivateDisplayWithInternalPermission()
DMultiDisplaySecurityTests.java172 return mTargetContext.getSystemService(ActivityManager.class) in isActivityStartAllowedOnDisplay()
173 .isActivityStartAllowedOnDisplay(mTargetContext, displayId, intent); in isActivityStartAllowedOnDisplay()
617 final WindowManager wm = mTargetContext.getSystemService(WindowManager.class); in testSettingFlagWithoutInternalSystemPermission()
660 final WindowManager wm = mTargetContext.getSystemService(WindowManager.class); in testGettingFlagWithoutInternalSystemPermission()
686 final WindowManager wm = mTargetContext.getSystemService(WindowManager.class); in testSettingFlagToUntrustedDisplay()
732 final WindowManager wm = mTargetContext.getSystemService(WindowManager.class); in testGettingFlagFromUntrustedDisplay()
754 final WindowManager wm = mTargetContext.getSystemService(WindowManager.class); in testSettingFlagToTrustedDisplay()
/cts/tests/accessibility/src/android/view/accessibility/cts/
DAccessibilityManagerTest.java152 private Context mTargetContext; field in AccessibilityManagerTest
160 mTargetContext = sInstrumentation.getTargetContext(); in setUp()
161 mHandler = new Handler(mTargetContext.getMainLooper()); in setUp()
193 mTargetContext.getMainExecutor(), listener); in testAddAndRemoveAudioDescriptionRequestedChangeListener()
260 if (mTargetContext.getPackageName().equals(serviceInfo.packageName) in testGetInstalledAccessibilityServicesList()
264 if (mTargetContext.getPackageName().equals(serviceInfo.packageName) in testGetInstalledAccessibilityServicesList()
286 if (mTargetContext.getPackageName().equals(serviceInfo.packageName) in testGetEnabledAccessibilityServiceList()
290 if (mTargetContext.getPackageName().equals(serviceInfo.packageName) in testGetEnabledAccessibilityServiceList()
311 if (mTargetContext.getPackageName().equals(serviceInfo.packageName) in testGetEnabledAccessibilityServiceList_NoFeedback()
331 if (mTargetContext.getPackageName().equals(serviceInfo.packageName) in testGetEnabledAccessibilityServiceListForType()
[all …]
/cts/tests/app/src/android/app/cts/fgs/bootcompleted/
DBootCompletedFgsStartTest.java68 private Context mTargetContext; field in BootCompletedFgsStartTest
109 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
112 mTargetContext.registerReceiver(mReceiver, filter, Context.RECEIVER_EXPORTED); in setUp()
113 resetFgsRestrictionEnabled(mTargetContext.getPackageName()); in setUp()
120 mTargetContext.unregisterReceiver(mReceiver); in tearDown()
121 final ActivityManager am = mTargetContext.getSystemService(ActivityManager.class); in tearDown()
/cts/tests/tests/widget/src/android/widget/cts/
DScrollerTest.java45 private Context mTargetContext; field in ScrollerTest
49 mTargetContext = InstrumentationRegistry.getTargetContext(); in setup()
50 mScroller = new Scroller(mTargetContext); in setup()
55 new Scroller(mTargetContext); in testConstructor()
57 new Scroller(mTargetContext, new LinearInterpolator()); in testConstructor()
81 mScroller = new Scroller(mTargetContext); in testGetDuration()
321 mScroller = new Scroller(mTargetContext, new LinearInterpolator());
/cts/tests/app/FgsTest/src/android/app/cts/fgstest/
DActivityManagerForegroundServiceTypeTest.java107 private Context mTargetContext; field in ActivityManagerForegroundServiceTypeTest
116 mTargetContext = mInstrumentation.getTargetContext(); in setUp()
279 final PackageManager.Property prop = mTargetContext.getPackageManager() in testForegroundServiceTypeSpecialUseProperty()
286 final PackageManager.Property prop = mTargetContext.getPackageManager() in testForegroundServiceTypeSpecialUseProperty()
300 final ApplicationInfo appCurInfo = mTargetContext.getPackageManager().getApplicationInfo( in testForegroundServiceTypeDisabledCommon()
302 final ApplicationInfo app33Info = mTargetContext.getPackageManager().getApplicationInfo( in testForegroundServiceTypeDisabledCommon()
365 mTargetContext.registerReceiver(receiver, filter, Context.RECEIVER_EXPORTED); in startForegroundServiceWithType()
366 mTargetContext.startForegroundService(intent); in startForegroundServiceWithType()
370 mTargetContext.unregisterReceiver(receiver); in startForegroundServiceWithType()
380 mTargetContext.startService(intent); in stopService()
[all …]
/cts/tests/tests/car_builtin/src/android/car/cts/builtin/app/
DTaskInfoHelperTest.java64 private final Context mTargetContext = mInstrumentation.getTargetContext(); field in TaskInfoHelperTest
77 mAm = mTargetContext.getSystemService(ActivityManager.class); in setUp()
160 Intent startIntent = new Intent(mTargetContext, TaskInfoTestActivity.class) in launchTestActivity()
/cts/tests/framework/base/windowmanager/src/android/server/wm/window/
DScreenRecordingCallbackTests.java228 WindowManager windowManager = mTargetContext.getSystemService(WindowManager.class); in testFullDisplayMediaProjectionAppCallback()
230 mTargetContext.getMainExecutor(), callback); in testFullDisplayMediaProjectionAppCallback()
266 WindowManager windowManager = mTargetContext.getSystemService(WindowManager.class); in testPartialScreenSharingRecorded()
269 mTargetContext.getMainExecutor(), callback); in testPartialScreenSharingRecorded()
DWindowMetricsActivityTests.java178 launchActivity(new ComponentName(mTargetContext, MetricsActivity.class), in testMetricsMatchesLayoutOnFreeformActivity()
220 launchActivity(new ComponentName(mTargetContext, MetricsActivity.class), in testMetricsMatchesDisplayAreaOnFreeformActivity()
/cts/hostsidetests/inputmethodservice/deviceside/devicetest/src/android/inputmethodservice/cts/devicetest/
DTestHelper.java58 private final Context mTargetContext; field in TestHelper
93 mTargetContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); in TestHelper()
/cts/tests/framework/base/windowmanager/src/android/server/wm/activity/lifecycle/
DActivityLifecycleClientTestBase.java77 protected Context mTargetContext; field in ActivityLifecycleClientTestBase
85 mTargetContext = getInstrumentation().getTargetContext(); in setUp()
129 final Intent intent = new Intent(mTargetContext, mActivityClass); in launch()
150 mTargetContext.startActivity(intent, optionsBundle); in launch()
DActivityLifecycleFreeformTests.java260 mTargetContext.startActivity(intent, bundle); in testPreQTopProcessResumedActivityInFreeform()
267 mTargetContext.startActivity(intent, bundle); in testPreQTopProcessResumedActivityInFreeform()
DActivityLifecycleTopResumedStateTests.java916 new ComponentName(mTargetContext, secondActivityClass); in testTopPositionSwitchAcrossDisplaysOnTapSlowDifferentProcess()
934 mTargetContext.startActivity(defaultDisplaySlowIntent, launchOptions.toBundle()); in testTopPositionSwitchAcrossDisplaysOnTapSlowDifferentProcess()
989 new ComponentName(mTargetContext, secondActivityClass); in testTopPositionSwitchAcrossDisplaysOnTapTimeoutDifferentProcess()
1007 mTargetContext.startActivity(defaultDisplaySlowIntent, launchOptions.toBundle()); in testTopPositionSwitchAcrossDisplaysOnTapTimeoutDifferentProcess()
/cts/tests/tests/systemui/src/android/systemui/cts/
DWindowInsetsBehaviorTests.java211 private Context mTargetContext; field in WindowInsetsBehaviorTests
220 final PackageManager pm = mTargetContext.getPackageManager(); in hasSystemGestureFeature()
256 mTargetContext.startActivity(intent); in launchToSettingsSystemGesture()
305 mTargetContext = getInstrumentation().getTargetContext(); in setUp()
310 final DisplayManager dm = mTargetContext.getSystemService(DisplayManager.class); in setUp()
828 Resources res = mTargetContext.getResources(); in assumeGestureNavigationMode()
/cts/tests/tests/car/src/android/car/cluster/cts/
DClusterHomeManagerTest.java84 private final Context mTargetContext = mInstrumentation.getTargetContext(); field in ClusterHomeManagerTest
87 new ComponentName(mTargetContext, ClusterHomeManagerTest.TestActivity.class);

12