/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | ShellIdentityUtils.java | 99 final UiAutomation uiAutomation = in invokeMethodWithShellPermissions() local 102 uiAutomation.adoptShellPermissionIdentity(); in invokeMethodWithShellPermissions() 105 uiAutomation.dropShellPermissionIdentity(); in invokeMethodWithShellPermissions() 118 final UiAutomation uiAutomation = in invokeMethodWithShellPermissions() local 121 uiAutomation.adoptShellPermissionIdentity(permissions); in invokeMethodWithShellPermissions() 124 uiAutomation.dropShellPermissionIdentity(); in invokeMethodWithShellPermissions() 148 final UiAutomation uiAutomation = in invokeMethodWithShellPermissions() local 151 uiAutomation.adoptShellPermissionIdentity(permissions); in invokeMethodWithShellPermissions() 154 uiAutomation.dropShellPermissionIdentity(); in invokeMethodWithShellPermissions() 170 final UiAutomation uiAutomation = in invokeMethodWithShellPermissions() local [all …]
|
D | CtsTouchUtils.java | 128 final UiAutomation uiAutomation = instrumentation.getUiAutomation(); in emulateTapOnView() local 131 injectDownEvent(uiAutomation, downTime, xOnScreen, yOnScreen, waitForAnimations, null); in emulateTapOnView() 132 … injectMoveEventForTap(uiAutomation, downTime, touchSlop, xOnScreen, yOnScreen, waitForAnimations); in emulateTapOnView() 133 injectUpEvent(uiAutomation, downTime, false, xOnScreen, yOnScreen, in emulateTapOnView() 175 final UiAutomation uiAutomation = instrumentation.getUiAutomation(); in emulateDoubleTapOnView() local 178 injectDownEvent(uiAutomation, downTime, xOnScreen, yOnScreen, null); in emulateDoubleTapOnView() 179 injectMoveEventForTap(uiAutomation, downTime, touchSlop, xOnScreen, yOnScreen, true); in emulateDoubleTapOnView() 180 injectUpEvent(uiAutomation, downTime, false, xOnScreen, yOnScreen, null); in emulateDoubleTapOnView() 181 injectDownEvent(uiAutomation, downTime, xOnScreen, yOnScreen, null); in emulateDoubleTapOnView() 182 injectMoveEventForTap(uiAutomation, downTime, touchSlop, xOnScreen, yOnScreen, true); in emulateDoubleTapOnView() [all …]
|
D | AdoptShellPermissionsRule.java | 46 public AdoptShellPermissionsRule(@NonNull UiAutomation uiAutomation) { in AdoptShellPermissionsRule() argument 47 this(uiAutomation, (String[]) null); in AdoptShellPermissionsRule() 50 public AdoptShellPermissionsRule(@NonNull UiAutomation uiAutomation, in AdoptShellPermissionsRule() argument 52 mUiAutomation = uiAutomation; in AdoptShellPermissionsRule()
|
D | CtsMouseUtil.java | 80 final UiAutomation uiAutomation = instrumentation.getUiAutomation(); in emulateHoverOnView() local 86 injectHoverEvent(uiAutomation, downTime, x, y); in emulateHoverOnView() 89 private static void injectHoverEvent(UiAutomation uiAutomation, long downTime, int xOnScreen, in injectHoverEvent() argument 94 uiAutomation.injectInputEvent(event, true); in injectHoverEvent()
|
/cts/tests/tests/uiautomation/src/android/app/uiautomation/cts/ |
D | UiAutomationTest.java | 82 UiAutomation uiAutomation = getInstrumentation().getUiAutomation(); in setUp() local 83 AccessibilityServiceInfo info = uiAutomation.getServiceInfo(); in setUp() 85 uiAutomation.setServiceInfo(info); in setUp() 86 grantWriteSecureSettingsPermission(uiAutomation); in setUp() 176 UiAutomation uiAutomation = getInstrumentation().getUiAutomation(); in testWindowContentFrameStats() local 185 uiAutomation.waitForIdle( in testWindowContentFrameStats() 192 final int windowId = findAppWindowId(uiAutomation.getWindows()); in testWindowContentFrameStats() 196 assertTrue(uiAutomation.clearWindowContentFrameStats(windowId)); in testWindowContentFrameStats() 202 scrollListView(uiAutomation, listView, listView.getAdapter().getCount() - 1); in testWindowContentFrameStats() 203 scrollListView(uiAutomation, listView, 0); in testWindowContentFrameStats() [all …]
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/ |
D | ActivityLaunchUtils.java | 73 Instrumentation instrumentation, UiAutomation uiAutomation, in launchActivityAndWaitForItToBeOnscreen() argument 82 uiAutomation, activityLauncher, Display.DEFAULT_DISPLAY); in launchActivityAndWaitForItToBeOnscreen() 90 Instrumentation instrumentation, UiAutomation uiAutomation, Class<T> clazz, in launchActivityOnSpecifiedDisplayAndWaitForItToBeOnscreen() argument 101 uiAutomation.adoptShellPermissionIdentity(); in launchActivityOnSpecifiedDisplayAndWaitForItToBeOnscreen() 105 uiAutomation.dropShellPermissionIdentity(); in launchActivityOnSpecifiedDisplayAndWaitForItToBeOnscreen() 110 uiAutomation, activityLauncher, displayId); in launchActivityOnSpecifiedDisplayAndWaitForItToBeOnscreen() 121 UiAutomation uiAutomation, CharSequence title) { in findWindowByTitle() argument 122 final List<AccessibilityWindowInfo> windows = uiAutomation.getWindows(); in findWindowByTitle() 127 UiAutomation uiAutomation, CharSequence title, int displayId) { in findWindowByTitleAndDisplay() argument 129 uiAutomation.getWindowsOnAllDisplays(); in findWindowByTitleAndDisplay() [all …]
|
/cts/hostsidetests/content/test-apps/ContextCrossProfileApps/ContextCrossProfileApp/src/com/android/cts/context/ |
D | ContextCrossProfileDeviceTest.java | 86 final UiAutomation uiAutomation = in testBindServiceAsUser_differentUser_bindsServiceToCorrectUser() local 90 uiAutomation.adoptShellPermissionIdentity(INTERACT_ACROSS_USERS_PERMISSION); in testBindServiceAsUser_differentUser_bindsServiceToCorrectUser() 106 final UiAutomation uiAutomation = in testBindServiceAsUser_sameProfileGroup_samePackage_withAcrossUsersPermission_bindsService() local 110 uiAutomation.adoptShellPermissionIdentity(INTERACT_ACROSS_USERS_PERMISSION); in testBindServiceAsUser_sameProfileGroup_samePackage_withAcrossUsersPermission_bindsService() 122 final UiAutomation uiAutomation = in testBindServiceAsUser_sameProfileGroup_differentPackage_withAcrossUsersPermission_bindsService() local 126 uiAutomation.adoptShellPermissionIdentity(INTERACT_ACROSS_USERS_PERMISSION); in testBindServiceAsUser_sameProfileGroup_differentPackage_withAcrossUsersPermission_bindsService() 138 final UiAutomation uiAutomation = in testBindServiceAsUser_sameProfileGroup_samePackage_withAcrossProfilesPermission_bindsService() local 141 uiAutomation.adoptShellPermissionIdentity(MANAGE_APP_OPS_MODE); in testBindServiceAsUser_sameProfileGroup_samePackage_withAcrossProfilesPermission_bindsService() 144 uiAutomation.dropShellPermissionIdentity(); in testBindServiceAsUser_sameProfileGroup_samePackage_withAcrossProfilesPermission_bindsService() 147 uiAutomation.adoptShellPermissionIdentity(INTERACT_ACROSS_PROFILES_PERMISSION); in testBindServiceAsUser_sameProfileGroup_samePackage_withAcrossProfilesPermission_bindsService() [all …]
|
/cts/tests/accessibility/common/src/android/accessibility/cts/common/ |
D | AccessibilityShortcutSettingsRule.java | 80 final UiAutomation uiAutomation = mInstrumentation.getUiAutomation( in after() local 82 updateShortcutSetting(uiAutomation, ACCESSIBILITY_SHORTCUT_KEY, mA11yShortcutTargetSetting); in after() 83 updateShortcutSetting(uiAutomation, ACCESSIBILITY_BUTTON, mA11yButtonTargetSetting); in after() 93 public boolean configureAccessibilityShortcut(UiAutomation uiAutomation, in configureAccessibilityShortcut() argument 96 return updateShortcutSetting(uiAutomation, ACCESSIBILITY_SHORTCUT_KEY, useShortcutList); in configureAccessibilityShortcut() 106 public boolean configureAccessibilityButton(UiAutomation uiAutomation, in configureAccessibilityButton() argument 109 return updateShortcutSetting(uiAutomation, ACCESSIBILITY_BUTTON, useShortcutList); in configureAccessibilityButton() 120 public void waitForAccessibilityShortcutStateChange(UiAutomation uiAutomation, in waitForAccessibilityShortcutStateChange() argument 122 waitForShortcutStateChange(uiAutomation, ACCESSIBILITY_SHORTCUT_KEY, expectedList); in waitForAccessibilityShortcutStateChange() 133 public void waitForAccessibilityButtonStateChange(UiAutomation uiAutomation, in waitForAccessibilityButtonStateChange() argument [all …]
|
D | ShellCommandBuilder.java | 55 public static ShellCommandBuilder create(UiAutomation uiAutomation) { in create() argument 56 return new ShellCommandBuilder(uiAutomation); in create() 59 private ShellCommandBuilder(UiAutomation uiAutomation) { in ShellCommandBuilder() argument 60 mUiAutomation = uiAutomation; in ShellCommandBuilder()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/ |
D | InputMethodVisibilityVerifier.java | 49 private static boolean containsWatermark(@NonNull UiAutomation uiAutomation) { in containsWatermark() argument 50 return Watermark.detect(uiAutomation.takeScreenshot()); in containsWatermark() 54 private static boolean notContainsWatermark(@NonNull UiAutomation uiAutomation) { in notContainsWatermark() argument 55 return !Watermark.detect(uiAutomation.takeScreenshot()); in notContainsWatermark() 74 final UiAutomation uiAutomation = instrumentation.getUiAutomation(); in waitUntil() local 75 if (condition.test(uiAutomation)) { in waitUntil() 80 if (condition.test(uiAutomation)) { in waitUntil() 84 return condition.test(uiAutomation); in waitUntil()
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/ |
D | InputMethodVisibilityVerifier.java | 49 private static boolean containsWatermark(@NonNull UiAutomation uiAutomation) { in containsWatermark() argument 50 return Watermark.detect(uiAutomation.takeScreenshot()); in containsWatermark() 54 private static boolean notContainsWatermark(@NonNull UiAutomation uiAutomation) { in notContainsWatermark() argument 55 return !Watermark.detect(uiAutomation.takeScreenshot()); in notContainsWatermark() 74 final UiAutomation uiAutomation = instrumentation.getUiAutomation(); in waitUntil() local 75 if (condition.test(uiAutomation)) { in waitUntil() 80 if (condition.test(uiAutomation)) { in waitUntil() 84 return condition.test(uiAutomation); in waitUntil()
|
/cts/tests/uwb/src/android/uwb/cts/ |
D | UwbManagerTest.java | 79 UiAutomation uiAutomation = getInstrumentation().getUiAutomation(); in testGetSpecificationInfo() local 82 uiAutomation.adoptShellPermissionIdentity(); in testGetSpecificationInfo() 87 uiAutomation.dropShellPermissionIdentity(); in testGetSpecificationInfo() 106 UiAutomation uiAutomation = getInstrumentation().getUiAutomation(); in testElapsedRealtimeResolutionNanos() local 109 uiAutomation.adoptShellPermissionIdentity(); in testElapsedRealtimeResolutionNanos() 112 uiAutomation.dropShellPermissionIdentity(); in testElapsedRealtimeResolutionNanos() 169 UiAutomation uiAutomation = getInstrumentation().getUiAutomation(); in testOpenRangingSessionWithBadParams() local 175 uiAutomation.adoptShellPermissionIdentity(); in testOpenRangingSessionWithBadParams() 189 uiAutomation.dropShellPermissionIdentity(); in testOpenRangingSessionWithBadParams() 198 UiAutomation uiAutomation = getInstrumentation().getUiAutomation(); in testOpenRangingSessionWithoutUwbPrivileged() local [all …]
|
/cts/tests/tests/wifi/src/android/net/wifi/cts/ |
D | EasyConnectStatusCallbackTest.java | 145 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in testConfiguratorInitiatorOnFailure() local 147 uiAutomation.adoptShellPermissionIdentity(); in testConfiguratorInitiatorOnFailure() 167 uiAutomation.dropShellPermissionIdentity(); in testConfiguratorInitiatorOnFailure() 185 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in testEnrolleeInitiatorOnFailure() local 187 uiAutomation.adoptShellPermissionIdentity(); in testEnrolleeInitiatorOnFailure() 199 uiAutomation.dropShellPermissionIdentity(); in testEnrolleeInitiatorOnFailure() 219 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in testEnrolleeResponderUriGeneration() local 221 uiAutomation.adoptShellPermissionIdentity(); in testEnrolleeResponderUriGeneration() 235 uiAutomation.dropShellPermissionIdentity(); in testEnrolleeResponderUriGeneration() 256 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in testStartEasyConnectAsEnrolleeResponderThrowsIllegalArgumentExceptionOnWrongDeviceInfo() local [all …]
|
D | WifiManagerTest.java | 558 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in testRestartWifiSubsystem() local 560 uiAutomation.adoptShellPermissionIdentity(); in testRestartWifiSubsystem() 580 uiAutomation.dropShellPermissionIdentity(); in testRestartWifiSubsystem() 992 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in startLocalOnlyHotspot() local 995 uiAutomation.adoptShellPermissionIdentity(); in startLocalOnlyHotspot() 1003 uiAutomation.dropShellPermissionIdentity(); in startLocalOnlyHotspot() 1205 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in testAddNetworkPrivilegedBadInput() local 1207 uiAutomation.adoptShellPermissionIdentity(); in testAddNetworkPrivilegedBadInput() 1212 uiAutomation.dropShellPermissionIdentity(); in testAddNetworkPrivilegedBadInput() 1229 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in testAddNetworkPrivilegedSuccess() local [all …]
|
D | ConnectedNetworkScorerTest.java | 200 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in testWifiUsabilityStatsEntry() local 204 uiAutomation.adoptShellPermissionIdentity(); in testWifiUsabilityStatsEntry() 363 uiAutomation.dropShellPermissionIdentity(); in testWifiUsabilityStatsEntry() 372 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in testUpdateWifiUsabilityScore() local 374 uiAutomation.adoptShellPermissionIdentity(); in testUpdateWifiUsabilityScore() 378 uiAutomation.dropShellPermissionIdentity(); in testUpdateWifiUsabilityScore() 388 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in testSetWifiScoringEnabled() local 390 uiAutomation.adoptShellPermissionIdentity(); in testSetWifiScoringEnabled() 393 uiAutomation.dropShellPermissionIdentity(); in testSetWifiScoringEnabled() 502 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in testSetWifiConnectedNetworkScorer() local [all …]
|
/cts/tests/tests/widget/src/android/widget/cts/util/ |
D | StretchEdgeUtil.kt | 218 val uiAutomation = instrumentation.uiAutomation in emulateDragGesture() constant 220 injectDownEvent(uiAutomation, downTime, dragStartX, dragStartY) in emulateDragGesture() 225 injectMoveEventsForDrag(uiAutomation, downTime, downTime, dragStartX, dragStartY, in emulateDragGesture() 227 injectUpEvent(uiAutomation, downTime, downTime + dragDurationMs, dragEndX, dragEndY) in emulateDragGesture() 239 uiAutomation: UiAutomation, in injectMoveEventsForDrag() 259 injectEvent(uiAutomation, MotionEvent.ACTION_MOVE, downTime, eventTime, moveX, moveY) in injectMoveEventsForDrag() 272 uiAutomation: UiAutomation, in injectUpEvent() 277 ) = injectEvent(uiAutomation, MotionEvent.ACTION_UP, downTime, upTime, xOnScreen, yOnScreen) in injectUpEvent() 288 uiAutomation: UiAutomation, in injectUpEvent() 292 ) = injectEvent(uiAutomation, MotionEvent.ACTION_DOWN, downTime, downTime, xOnScreen, yOnScreen) in injectUpEvent() [all …]
|
/cts/tests/tests/car/src/android/car/cts/ |
D | CarApiTestBase.java | 106 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in executeShellCommand() local 107 return executeShellCommand(uiAutomation, commandFormat, args); in executeShellCommand() 112 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in executeShellCommandWithPermission() local 115 uiAutomation.adoptShellPermissionIdentity(permission); in executeShellCommandWithPermission() 116 result = executeShellCommand(uiAutomation, commandFormat, args); in executeShellCommandWithPermission() 118 uiAutomation.dropShellPermissionIdentity(); in executeShellCommandWithPermission() 123 private static String executeShellCommand(UiAutomation uiAutomation, String commandFormat, in executeShellCommand() argument 125 ParcelFileDescriptor stdout = uiAutomation.executeShellCommand( in executeShellCommand()
|
/cts/tests/filesystem/src/android/filesystem/cts/ |
D | CarTestUtil.java | 88 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in executeShellCommandWithPermission() local 90 uiAutomation.adoptShellPermissionIdentity(permission); in executeShellCommandWithPermission() 91 SystemUtil.runShellCommand(uiAutomation, command); in executeShellCommandWithPermission() 93 uiAutomation.dropShellPermissionIdentity(); in executeShellCommandWithPermission()
|
/cts/tests/MediaProviderTranscode/src/android/mediaprovidertranscode/cts/ |
D | TranscodeTestUtils.java | 206 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in executeShellCommandInternal() local 208 uiAutomation.executeShellCommand(cmd).getFileDescriptor())) { in executeShellCommandInternal() 235 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in grantPermission() local 236 uiAutomation.adoptShellPermissionIdentity("android.permission.GRANT_RUNTIME_PERMISSIONS"); in grantPermission() 238 uiAutomation.grantRuntimePermission(packageName, permission); in grantPermission() 240 uiAutomation.dropShellPermissionIdentity(); in grantPermission() 287 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in installAppWithStoragePermissions() local 290 uiAutomation.adoptShellPermissionIdentity( in installAppWithStoragePermissions() 301 uiAutomation.dropShellPermissionIdentity(); in installAppWithStoragePermissions() 309 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in uninstallApp() local [all …]
|
/cts/hostsidetests/inputmethodservice/deviceside/devicetest/src/android/inputmethodservice/cts/devicetest/ |
D | InputMethodVisibilityVerifier.java | 42 private static boolean containsWatermark(@NonNull UiAutomation uiAutomation, in containsWatermark() argument 44 return watermark.isContainedIn(uiAutomation.takeScreenshot()); in containsWatermark() 64 final UiAutomation uiAutomation = instrumentation.getUiAutomation(); in waitUntilWatermarkBecomesVisible() local 77 if (containsWatermark(uiAutomation, watermark)) { in waitUntilWatermarkBecomesVisible()
|
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/permissions/ |
D | Permissions.java | 90 ShellCommandUtils.uiAutomation() in Permissions() 98 ShellCommandUtils.uiAutomation().dropShellPermissionIdentity(); in Permissions() 222 ShellCommandUtils.uiAutomation().adoptShellPermissionIdentity(); in applyPermissions() 227 ShellCommandUtils.uiAutomation().dropShellPermissionIdentity(); in applyPermissions() 293 ShellCommandUtils.uiAutomation().adoptShellPermissionIdentity( in applyPermissions() 392 mExistingPermissions = ShellCommandUtils.uiAutomation().getAdoptedShellPermissions(); in recordExistingPermissions() 404 ShellCommandUtils.uiAutomation().dropShellPermissionIdentity(); in restoreExistingPermissions() 406 ShellCommandUtils.uiAutomation().adoptShellPermissionIdentity(); in restoreExistingPermissions() 408 ShellCommandUtils.uiAutomation().adoptShellPermissionIdentity( in restoreExistingPermissions()
|
/cts/tests/tests/security/src/android/security/cts/CVE_2021_0327/ |
D | IntroActivity.java | 56 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in setupWorkProfile() local 57 uiAutomation.adoptShellPermissionIdentity(); in setupWorkProfile() 72 uiAutomation.dropShellPermissionIdentity(); in setupWorkProfile()
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | SetFrameRateTest.java | 56 UiAutomation uiAutomation = getInstrumentation().getUiAutomation(); in setUp() local 57 uiAutomation.adoptShellPermissionIdentity(); in setUp() 67 uiAutomation.dropShellPermissionIdentity(); in setUp()
|
/cts/tests/tests/os/src/android/os/cts/ |
D | AppHibernationUtils.kt | 177 val uiAutomation = InstrumentationRegistry.getInstrumentation().uiAutomation in openUnusedAppsNotification() constant 179 waitFindObject(uiAutomation, notifSelector).click() in openUnusedAppsNotification() 181 waitFindObject(uiAutomation, By.text("Open")).click() in openUnusedAppsNotification() 254 fun waitFindObject(uiAutomation: UiAutomation, selector: BySelector): UiObject2 { in waitFindObject() 258 val ui = uiAutomation.rootInActiveWindow in waitFindObject() 282 instrumentation.uiAutomation.executeShellCommand(command)) in executeShellCommand()
|
/cts/tests/tests/time/shell_utils/device/android/app/time/cts/shell/device/ |
D | InstrumentationShellCommandExecutor.java | 37 public InstrumentationShellCommandExecutor(@NonNull UiAutomation uiAutomation) { in InstrumentationShellCommandExecutor() argument 38 mUiAutomation = Objects.requireNonNull(uiAutomation); in InstrumentationShellCommandExecutor()
|