Home
last modified time | relevance | path

Searched refs:mRule (Results 1 – 25 of 38) sorted by relevance

12

/cts/tests/tests/virtualdevice/applaunch/src/android/virtualdevice/cts/applaunch/
DDeviceAssociationTest.java76 public VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in DeviceAssociationTest
90 mVirtualDevice = mRule.createManagedVirtualDevice(); in setUp()
91 mVirtualDisplay = mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in setUp()
217 Activity activity = mRule.startActivityOnDisplaySync(mVirtualDisplay, EmptyActivity.class); in activityContext_startActivityOnVirtualDevice_returnsVirtualDeviceId()
223 Activity activity = mRule.startActivityOnDisplaySync(DEFAULT_DISPLAY, EmptyActivity.class); in activityContext_startActivityOnDefaultDevice_returnsDefaultDeviceId()
229 Activity activity = mRule.startActivityOnDisplaySync(mVirtualDisplay, EmptyActivity.class); in activityContext_activityMovesDisplay_returnsDeviceIdAssociatedWithDisplay()
230 VirtualDevice virtualDevice2 = mRule.createManagedVirtualDevice(); in activityContext_activityMovesDisplay_returnsDeviceIdAssociatedWithDisplay()
231 VirtualDisplay virtualDisplay2 = mRule.createManagedVirtualDisplayWithFlags(virtualDevice2, in activityContext_activityMovesDisplay_returnsDeviceIdAssociatedWithDisplay()
245 mRule.startActivityOnDisplaySync(DEFAULT_DISPLAY, EmptyActivity.class); in applicationContext_lastActivityOnVirtualDevice_returnsVirtualDeviceId()
246 mRule.startActivityOnDisplaySync(mVirtualDisplay, SecondActivity.class); in applicationContext_lastActivityOnVirtualDevice_returnsVirtualDeviceId()
[all …]
DActivityInterceptionTest.java67 public VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in ActivityInterceptionTest
80 mVirtualDevice = mRule.createManagedVirtualDevice(); in setUp()
81 mVirtualDisplay = mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in setUp()
92 mRule.sendIntentToDisplay(mInterceptedIntent, mVirtualDisplay); in noInterceptorRegistered_activityShouldLaunch()
93 mRule.waitAndAssertActivityResumed(new ComponentName(mContext, InterceptedActivity.class)); in noInterceptorRegistered_activityShouldLaunch()
103 mRule.sendIntentToDisplay(mInterceptedIntent, mVirtualDisplay); in interceptorRegistered_intentIsIntercepted()
109 mRule.sendIntentToDisplay(mInterceptedIntent, mVirtualDisplay); in interceptorRegistered_intentIsIntercepted()
110 mRule.waitAndAssertActivityResumed(new ComponentName(mContext, InterceptedActivity.class)); in interceptorRegistered_intentIsIntercepted()
120 mRule.sendIntentToDisplay(mInterceptedIntent, mVirtualDisplay); in noMatchingInterceptor_activityShouldLaunch()
121 mRule.waitAndAssertActivityResumed(new ComponentName(mContext, InterceptedActivity.class)); in noMatchingInterceptor_activityShouldLaunch()
[all …]
DRecentTasksTest.java49 public VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in RecentTasksTest
60 Activity activity = mRule.startActivityOnDisplaySync(virtualDisplay, EmptyActivity.class); in activityLaunchedOnVirtualDeviceWithDefaultRecentPolicy_includedInRecents()
73 mRule.assertDisplayDoesNotExist(virtualDisplay.getDisplay().getDisplayId()); in activityLaunchedOnVirtualDeviceWithDefaultRecentPolicy_includedInRecents()
82 Activity activity = mRule.startActivityOnDisplaySync(virtualDisplay, EmptyActivity.class); in activityLaunchedOnVirtualDeviceWithCustomRecentPolicy_excludedFromRecents()
95 mRule.assertDisplayDoesNotExist(virtualDisplay.getDisplay().getDisplayId()); in activityLaunchedOnVirtualDeviceWithCustomRecentPolicy_excludedFromRecents()
101 return mRule.createManagedVirtualDevice(new VirtualDeviceParams.Builder() in createVirtualDeviceWithRecentsPolicy()
107 return mRule.createManagedVirtualDisplayWithFlags(virtualDevice, in createPublicVirtualDisplay()
DActivityManagementTest.java72 public VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in ActivityManagementTest
93 mVirtualDevice = mRule.createManagedVirtualDevice(); in setUp()
95 VirtualDisplay virtualDisplay = mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in setUp()
105 mRule.startActivityOnDisplaySync(mVirtualDisplayId, EmptyActivity.class); in removeActivityListener_shouldStopCallbacks()
113 mRule.waitAndAssertActivityRemoved(mEmptyActivityComponent); in removeActivityListener_shouldStopCallbacks()
121 mRule.startActivityOnDisplaySync(mVirtualDisplayId, EmptyActivity.class); in activityListener_shouldCallOnTopActivityChange()
128 mRule.waitAndAssertActivityRemoved(mEmptyActivityComponent); in activityListener_shouldCallOnTopActivityChange()
136 mRule.assumeActivityLaunchSupported(mVirtualDisplayId); in launchPendingIntent_multipleActivities_shouldLaunchOnSameDisplay()
158 mRule.assumeActivityLaunchSupported(mVirtualDisplayId); in launchPendingIntent_activityIntent_shouldLaunchActivity()
175 mRule.assumeActivityLaunchSupported(mVirtualDisplayId); in launchPendingIntent_serviceIntentTrampolineActivity_shouldLaunchActivity()
[all …]
DVirtualDeviceHomeTest.java105 public VirtualDeviceRule mRule = VirtualDeviceRule.withAdditionalPermissions( field in VirtualDeviceHomeTest
131 assertThat(isWallpaperOnVirtualDisplay(mRule.getWmState())).isFalse(); in virtualDeviceHome_untrustedVirtualDisplay()
144 assertThat(isWallpaperOnVirtualDisplay(mRule.getWmState())).isFalse(); in virtualDeviceHome_autoMirrorVirtualDisplay()
157 assertThat(isWallpaperOnVirtualDisplay(mRule.getWmState())).isFalse(); in virtualDeviceHome_publicVirtualDisplay()
169 assertThat(mRule.getWmState().waitForWithAmState( in virtualDeviceHome_noHomeComponent_showsWallpaper()
183 assertThat(mRule.getWmState().waitForWithAmState( in virtualDeviceHome_withHomeComponent_showsWallpaper()
201 mRule.startActivityOnDisplaySync(mVirtualDisplay, EmptyActivity.class); in virtualDeviceHome_noCustomHomeComponent()
205 mRule.getWmState().waitAndAssertActivityRemoved(activity.getComponentName()); in virtualDeviceHome_noCustomHomeComponent()
225 mRule.startActivityOnDisplaySync(mVirtualDisplay, EmptyActivity.class); in virtualDeviceHome_noCustomHomeComponent_sendHomeIntent()
258 mRule.startActivityOnDisplaySync(mVirtualDisplay, EmptyActivity.class); in virtualDeviceHome_withCustomHomeComponent()
[all …]
DVirtualDevicePermissionTest.java75 public VirtualDeviceRule mRule = VirtualDeviceRule.withAdditionalPermissions( field in VirtualDevicePermissionTest
150 assertThat(mRule.runWithTemporaryPermission( in privilegedPermissionGranted_appRunningOnDefaultDevice_hasPermissionGranted()
158 assertThat(mRule.runWithTemporaryPermission( in privilegedPermissionGranted_appRunningOnVirtualDevice_hasPermissionGranted()
178 assertThat(mRule.runWithTemporaryPermission( in signaturePermissionGranted_appRunningOnDefaultDevice_hasPermissionGranted()
186 assertThat(mRule.runWithTemporaryPermission( in signaturePermissionGranted_appRunningOnVirtualDevice_hasPermissionGranted()
276 EmptyActivity activity = mRule.startActivityOnDisplaySync(displayId, EmptyActivity.class); in checkPermissionStateOnDevice()
282 mRule.waitAndAssertActivityResumed(componentName); in verifyComponentShownAfterPermissionRequest()
291 mRule.sendIntentToDisplay(intent, displayId); in requestPermissionOnDevice()
295 mVirtualDevice = mRule.createManagedVirtualDevice(params); in createVirtualDeviceAndDisplay()
296 VirtualDisplay virtualDisplay = mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in createVirtualDeviceAndDisplay()
DActivityBlockingTest.java74 public VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in ActivityBlockingTest
102 mRule.assumeActivityLaunchSupported(mVirtualDisplay.getDisplay().getDisplayId()); in nonTrustedDisplay_startNonEmbeddableActivity_shouldThrowSecurityException()
107 () -> mRule.sendIntentToDisplay(mMonitoredIntent, mVirtualDisplay)); in nonTrustedDisplay_startNonEmbeddableActivity_shouldThrowSecurityException()
319 mRule.startActivityOnDisplaySync(mVirtualDisplay, EmptyActivity.class); in setAllowedCrossTaskNavigations_shouldBlockNonAllowedNavigations()
330 mRule.startActivityOnDisplaySync(mVirtualDisplay, EmptyActivity.class); in setAllowedCrossTaskNavigations_shouldAllowNavigations()
341 mRule.startActivityOnDisplaySync(mVirtualDisplay, EmptyActivity.class); in setBlockedCrossTaskNavigations_shouldAllowNavigations()
352 mRule.startActivityOnDisplaySync(mVirtualDisplay, EmptyActivity.class); in setBlockedCrossTaskNavigations_shouldBlockNonAllowedNavigations()
380 mVirtualDevice = mRule.createManagedVirtualDevice(virtualDeviceParams); in createVirtualDeviceAndDisplay()
382 mVirtualDisplay = mRule.createManagedVirtualDisplay(mVirtualDevice, in createVirtualDeviceAndDisplay()
395 mRule.sendIntentToDisplay(intent, mVirtualDisplay); in assertActivityLaunchBlocked()
[all …]
DRestrictActivityTest.java71 public VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in RestrictActivityTest
114 final VirtualDisplay virtualDisplay = mRule.createManagedUnownedVirtualDisplayWithFlags( in restrictedActivity_noGwpc_shouldFail()
132 Activity activity = mRule.startActivityOnDisplaySync(displayId, clazz); in assertActivityLaunchSucceeds()
143 mRule.sendIntentToDisplay(intent, displayId); in assertActivityLaunchBlocked()
152 VirtualDevice virtualDevice = mRule.createManagedVirtualDevice(); in createVirtualDeviceAndDisplayWithCategories()
161 VirtualDisplay virtualDisplay = mRule.createManagedVirtualDisplay( in createVirtualDeviceAndDisplayWithCategories()
DStreamedAppBehaviorTest.java55 public VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in StreamedAppBehaviorTest
60 VirtualDevice virtualDevice = mRule.createManagedVirtualDevice(); in appsInVirtualDevice_shouldNotHaveAccessToCamera()
61 VirtualDisplay virtualDisplay = mRule.createManagedVirtualDisplayWithFlags(virtualDevice, in appsInVirtualDevice_shouldNotHaveAccessToCamera()
71 AppComponents.EmptyActivity activity = mRule.startActivityOnDisplaySync( in appsInVirtualDevice_shouldNotHaveAccessToCamera()
DVirtualDeviceDrmTest.java57 public VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in VirtualDeviceDrmTest
63 VirtualDevice virtualDevice = mRule.createManagedVirtualDevice(); in setUp()
64 VirtualDisplay virtualDisplay = mRule.createManagedVirtualDisplayWithFlags(virtualDevice, in setUp()
69 mDrmActivity = mRule.startActivityOnDisplaySync(virtualDisplay, DrmActivity.class); in setUp()
DStreamedAppClipboardTest.java87 public VirtualDeviceRule mRule = VirtualDeviceRule.withAdditionalPermissions( field in StreamedAppClipboardTest
370 VirtualDevice virtualDevice = mRule.createManagedVirtualDevice( in DeviceEnvironment()
375 VirtualDisplay virtualDisplay = mRule.createManagedVirtualDisplayWithFlags( in DeviceEnvironment()
433 mRule.sendIntentToDisplay(intent, mDisplayId); in launchTestActivity()
449 super(InstrumentationRegistry.getInstrumentation(), mRule.getWmState()); in SecureLockScreenSession()
452 mRule.getWmState().assertKeyguardShowingAndNotOccluded(); in SecureLockScreenSession()
457 mRule.runWithTemporaryPermission(() -> unlockDevice().enterAndConfirmLockCredential()); in close()
458 mRule.getWmState().waitAndAssertKeyguardGone(); in close()
DVirtualDeviceImeTest.java87 public VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in VirtualDeviceImeTest
310 VirtualDisplay unownedDisplay = mRule.createManagedUnownedVirtualDisplayWithFlags( in setDisplayImePolicy_unownedDisplay_throws()
324 VirtualDisplay untrustedDisplay = mRule.createManagedVirtualDisplayWithFlags(virtualDevice, in setDisplayImePolicy_untrustedDisplay_throws()
389 VirtualDisplay localImeDisplay = mRule.createManagedVirtualDisplayWithFlags(virtualDevice, in setDisplayImePolicy_differentPoliciesForDifferentDisplays()
397 VirtualDisplay noImeDisplay = mRule.createManagedVirtualDisplayWithFlags(virtualDevice, in setDisplayImePolicy_differentPoliciesForDifferentDisplays()
455 mRule.startActivityOnDisplaySync(displayId, ImeActivity.class); in showSoftInputOnDisplay()
465 VirtualDevice virtualDevice = mRule.createManagedVirtualDevice(builder.build()); in createVirtualDeviceAndDisplay()
467 VirtualDisplay virtualDisplay = mRule.createManagedVirtualDisplayWithFlags(virtualDevice, in createVirtualDeviceAndDisplay()
491 assertThat(mRule.runWithTemporaryPermission( in waitForImePolicy()
/cts/tests/tests/virtualdevice/core/src/android/virtualdevice/cts/core/
DVirtualDisplayTest.java58 public VirtualDeviceRule mRule = VirtualDeviceRule.withAdditionalPermissions( field in VirtualDisplayTest
68 mVirtualDevice = mRule.createManagedVirtualDevice(); in setUp()
73 VirtualDisplay virtualDisplay = mRule.createManagedVirtualDisplay(mVirtualDevice); in createVirtualDisplay_shouldSucceed()
93 mRule.assertDisplayDoesNotExist(virtualDisplay.getDisplay().getDisplayId()); in createVirtualDisplay_deprecatedOverload_shouldSucceed()
100 VirtualDisplay virtualDisplay = mRule.createManagedVirtualDisplay(mVirtualDevice); in createVirtualDisplay_defaultVirtualDisplayFlags()
113 VirtualDisplay virtualDisplay = mRule.createManagedVirtualDisplay(mVirtualDevice); in createVirtualDisplay_defaultVirtualDisplayFlags_compat()
133 () -> mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in createVirtualDisplay_public_throwsException()
147 () -> mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in createVirtualDisplay_autoMirror_throwsException()
162 () -> mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in createVirtualDisplay_publicAutoMirror_throwsException()
171 VirtualDisplay virtualDisplay = mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in createVirtualDisplay_public_createsMirrorDisplay()
[all …]
DVirtualDeviceManagerBasicTest.java97 public VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in VirtualDeviceManagerBasicTest
121 mVirtualDevice = mRule.createManagedVirtualDevice(); in setUp()
172 mRule.dropCompanionDeviceAssociation(); in getAllPersistentDeviceIds_empty()
187 final AssociationInfo associationInfo = mRule.createManagedAssociation(); in getAllPersistentDeviceIds_includesClosedVirtualDevice()
207 VirtualDeviceManager.VirtualDevice secondVirtualDevice = mRule.createManagedVirtualDevice(); in createVirtualDevice_deviceIdIsUniqueAndIncremented()
214 mRule.runWithTemporaryPermission( in createVirtualDevice_noPermission_shouldThrowSecurityException()
216 () -> mRule.createManagedVirtualDevice())); in createVirtualDevice_noPermission_shouldThrowSecurityException()
224 /* associationId= */ -1, mRule.DEFAULT_VIRTUAL_DEVICE_PARAMS)); in createVirtualDevice_invalidAssociationId_shouldThrowIllegalArgumentException()
242 associationInfo.getId(), mRule.DEFAULT_VIRTUAL_DEVICE_PARAMS)); in createVirtualDevice_invalidDeviceProfile_shouldThrowIllegalArgumentException()
266 VirtualDisplay display = mRule.createManagedVirtualDisplay(mVirtualDevice); in createVirtualDevice_removeAssociation_shouldCloseVirtualDevice()
[all …]
/cts/tests/tests/hardware/src/android/hardware/input/cts/tests/
DVirtualDeviceTestCase.java34 public VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in VirtualDeviceTestCase
41 mVirtualDevice = mRule.createManagedVirtualDevice(); in onBeforeLaunchActivity()
42 mVirtualDisplay = mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in onBeforeLaunchActivity()
46 mRule.assumeActivityLaunchSupported(mVirtualDisplay.getDisplay().getDisplayId()); in onBeforeLaunchActivity()
DVirtualInputDeviceGenericTest.java65 public final VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in VirtualInputDeviceGenericTest
81 mVirtualDevice = mRule.createManagedVirtualDevice(); in setUp()
101 VirtualDisplay display = mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in close_multipleCallsSucceed()
115 VirtualDisplay display = mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in close_removesInputDevice()
131 VirtualDisplay display = mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in closeVirtualDevice_removesInputDevice()
147 VirtualDisplay display = mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in createVirtualInputDevice_duplicateName_throwsException()
169 VirtualDisplay unownedDisplay = mRule.createManagedUnownedVirtualDisplayWithFlags( in createVirtualInputDevice_unownedDisplay_throwsException()
180 assertThat(mRule.runWithTemporaryPermission( in createVirtualInputDevice_defaultDisplay_injectEvents_succeeds()
190 VirtualDisplay unownedDisplay = mRule.createManagedUnownedVirtualDisplayWithFlags( in createVirtualInputDevice_unownedVirtualDisplay_injectEvents_succeeds()
192 assertThat(mRule.runWithTemporaryPermission( in createVirtualInputDevice_unownedVirtualDisplay_injectEvents_succeeds()
DVirtualKeyboardLayoutTest.java50 public VirtualDeviceRule mRule = VirtualDeviceRule.createDefault(); field in VirtualKeyboardLayoutTest
61 mVirtualDevice = mRule.createManagedVirtualDevice(); in setUp()
62 mVirtualDisplay = mRule.createManagedVirtualDisplayWithFlags(mVirtualDevice, in setUp()
DVirtualMouseTest.java148 mRule.runWithoutPermissions( in sendButtonEvent_withoutCreateVirtualDevicePermission_throwsException()
161 mRule.runWithoutPermissions( in sendRelativeEvent_withoutCreateVirtualDevicePermission_throwsException()
174 mRule.runWithoutPermissions( in sendScrollEvent_withoutCreateVirtualDevicePermission_throwsException()
DVirtualKeyboardTest.java69 mRule.runWithoutPermissions( in sendKeyEvent_withoutCreateVirtualDevicePermission_throwsException()
/cts/tests/tests/view/src/android/view/cts/
DViewAnimationMatrixTest.java61 public ActivityTestRule<ViewAnimationMatrixActivity> mRule = field in ViewAnimationMatrixTest
78 ViewAnimationMatrixActivity activity = mRule.launchActivity(null); in testAnimationMatrixAppliedDuringDrawing()
83 mRule.runOnUiThread(() -> view.setAnimationMatrix(moveToTopLeftCorner(view))); in testAnimationMatrixAppliedDuringDrawing()
94 ViewAnimationMatrixActivity activity = mRule.launchActivity(null); in testAnimationMatrixClearedWithPassingNull()
98 mRule.runOnUiThread(() -> view.setAnimationMatrix(moveToTopLeftCorner(view))); in testAnimationMatrixClearedWithPassingNull()
99 mRule.runOnUiThread(() -> view.setAnimationMatrix(null)); in testAnimationMatrixClearedWithPassingNull()
129 PixelCopy.request(mRule.getActivity().getWindow(), srcRect, dest, onCopyFinished, in captureView()
137 mRule.runOnUiThread(() -> { in waitForDraw()
/cts/tests/tests/virtualdevice/camera/src/android/virtualdevice/cts/camera/
DVirtualCameraNdkTest.java83 public VirtualDeviceRule mRule = field in VirtualCameraNdkTest
101 mVirtualDevice = mRule.createManagedVirtualDevice( in setUp()
105 mVirtualDisplay = mRule.createManagedVirtualDisplay(mVirtualDevice, in setUp()
116 NativeCameraTestActivity activity = mRule.startActivityOnDisplaySync( in getCameraIds_defaultDevice()
136 NativeCameraTestActivity activity = mRule.startActivityOnDisplaySync( in getCameraIds_virtualDevice()
151 NativeCameraTestActivity activity = mRule.startActivityOnDisplaySync( in availabilityCallbacks_virtualDevice()
170 NativeCameraTestActivity activity = mRule.startActivityOnDisplaySync( in availabilityCallbacks_defaultDevice()
DVirtualCameraPermissionTest.java88 public VirtualDeviceRule mRule = VirtualDeviceRule.withAdditionalPermissions( field in VirtualCameraPermissionTest
113 mVirtualDevice = mRule.createManagedVirtualDevice( in setUp()
118 VirtualDisplay virtualDisplay = mRule.createManagedVirtualDisplay( in setUp()
177 Activity activity = mRule.startActivityOnDisplaySync(displayId, Activity.class); in getPermissionState()
/cts/tests/tests/preference/src/android/preference/cts/
DTestUtils.java54 private ActivityTestRule<?> mRule; field in TestUtils
62 mRule = rule; in TestUtils()
73 Bitmap bt = mAutomation.takeScreenshot(mRule.getActivity().getWindow()); in takeScreenshot()
168 final Activity activity = mRule.getActivity(); in hasVerticalNavBar()
/cts/hostsidetests/security/src/android/security/cts/
DSELinuxNeverallowRulesTest.java87 public SELinuxNeverallowRule mRule; field in SELinuxNeverallowRulesTest
94 assumeTrue("skipping not compatible rule", mRule.isCompatible(mDevice)); in setUp()
137 mRule.testNeverallowRule(sepolicyAnalyze, policyFile); in testNeverallowRules()
DSELinuxNeverallowRulesTestVendor.java120 public SELinuxNeverallowRule mRule; field in SELinuxNeverallowRulesTestVendor
133 assumeTrue("skipping not compatible rule", mRule.isCompatible(mDevice)); in setUp()
153 mRule.testNeverallowRule(mSepolicyAnalyze, mDeviceVendorPolicyFile); in testNeverallowRules()

12