Home
last modified time | relevance | path

Searched refs:uiAutomation (Results 1 – 25 of 40) sorted by relevance

12

/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DShellIdentityUtils.java96 final UiAutomation uiAutomation = in invokeMethodWithShellPermissions() local
99 uiAutomation.adoptShellPermissionIdentity(); in invokeMethodWithShellPermissions()
102 uiAutomation.dropShellPermissionIdentity(); in invokeMethodWithShellPermissions()
115 final UiAutomation uiAutomation = in invokeMethodWithShellPermissions() local
118 uiAutomation.adoptShellPermissionIdentity(permissions); in invokeMethodWithShellPermissions()
121 uiAutomation.dropShellPermissionIdentity(); in invokeMethodWithShellPermissions()
136 final UiAutomation uiAutomation = in invokeThrowableMethodWithShellPermissions() local
139 uiAutomation.adoptShellPermissionIdentity(permissions); in invokeThrowableMethodWithShellPermissions()
142 uiAutomation.dropShellPermissionIdentity(); in invokeThrowableMethodWithShellPermissions()
156 final UiAutomation uiAutomation = in invokeMethodWithShellPermissionsNoReturn() local
[all …]
DCtsTouchUtils.java94 final UiAutomation uiAutomation = instrumentation.getUiAutomation(); in emulateTapOnView() local
97 injectDownEvent(uiAutomation, downTime, xOnScreen, yOnScreen, null); in emulateTapOnView()
98 injectMoveEventForTap(uiAutomation, downTime, touchSlop, xOnScreen, yOnScreen); in emulateTapOnView()
99 injectUpEvent(uiAutomation, downTime, false, xOnScreen, yOnScreen, null); in emulateTapOnView()
140 final UiAutomation uiAutomation = instrumentation.getUiAutomation(); in emulateDoubleTapOnView() local
143 injectDownEvent(uiAutomation, downTime, xOnScreen, yOnScreen, null); in emulateDoubleTapOnView()
144 injectMoveEventForTap(uiAutomation, downTime, touchSlop, xOnScreen, yOnScreen); in emulateDoubleTapOnView()
145 injectUpEvent(uiAutomation, downTime, false, xOnScreen, yOnScreen, null); in emulateDoubleTapOnView()
146 injectDownEvent(uiAutomation, downTime, xOnScreen, yOnScreen, null); in emulateDoubleTapOnView()
147 injectMoveEventForTap(uiAutomation, downTime, touchSlop, xOnScreen, yOnScreen); in emulateDoubleTapOnView()
[all …]
DAdoptShellPermissionsRule.java46 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()
DCtsMouseUtil.java80 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/accessibilityservice/src/android/accessibilityservice/cts/utils/
DActivityLaunchUtils.java63 Instrumentation instrumentation, UiAutomation uiAutomation, in launchActivityAndWaitForItToBeOnscreen() argument
70 AccessibilityServiceInfo info = uiAutomation.getServiceInfo(); in launchActivityAndWaitForItToBeOnscreen()
72 uiAutomation.setServiceInfo(info); in launchActivityAndWaitForItToBeOnscreen()
73 homeScreenOrBust(instrumentation.getContext(), uiAutomation); in launchActivityAndWaitForItToBeOnscreen() local
74 final AccessibilityEvent awaitedEvent = uiAutomation.executeAndWaitForEvent( in launchActivityAndWaitForItToBeOnscreen()
87 findWindowByTitle(uiAutomation, activityTitle); in launchActivityAndWaitForItToBeOnscreen()
109 UiAutomation uiAutomation, CharSequence title) { in findWindowByTitle() argument
110 final List<AccessibilityWindowInfo> windows = uiAutomation.getWindows(); in findWindowByTitle()
123 public static void homeScreenOrBust(Context context, UiAutomation uiAutomation) { in homeScreenOrBust() argument
124 wakeUpOrBust(context, uiAutomation); in homeScreenOrBust()
[all …]
DAccessibilityEventFilterUtils.java56 @NonNull UiAutomation uiAutomation, int changeTypes, @NonNull String title) { in filterWindowsChangeTypesAndWindowTitle()
59 new WindowTitleMatcher(uiAutomation, title))::matches; in filterWindowsChangeTypesAndWindowTitle()
147 public WindowTitleMatcher(@NonNull UiAutomation uiAutomation, @NonNull String title) { in WindowTitleMatcher() argument
149 mUiAutomation = uiAutomation; in WindowTitleMatcher()
/cts/tests/tests/uiautomation/src/android/app/uiautomation/cts/
DUiAutomationTest.java79 UiAutomation uiAutomation = getInstrumentation().getUiAutomation(); in setUp() local
80 AccessibilityServiceInfo info = uiAutomation.getServiceInfo(); in setUp()
82 uiAutomation.setServiceInfo(info); in setUp()
83 grantWriteSecureSettingsPermission(uiAutomation); in setUp()
192 UiAutomation uiAutomation = getInstrumentation().getUiAutomation(); in testWindowContentFrameStats() local
201 uiAutomation.waitForIdle( in testWindowContentFrameStats()
208 final int windowId = findAppWindowId(uiAutomation.getWindows()); in testWindowContentFrameStats()
212 assertTrue(uiAutomation.clearWindowContentFrameStats(windowId)); in testWindowContentFrameStats()
218 scrollListView(uiAutomation, listView, listView.getAdapter().getCount() - 1); in testWindowContentFrameStats()
219 scrollListView(uiAutomation, listView, 0); in testWindowContentFrameStats()
[all …]
DUiAutomationLogRule.java84 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(
88 uiAutomation, "dumpsys accessibility");
91 uiAutomation.destroy();
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DShellIdentityUtils.java66 final UiAutomation uiAutomation = in invokeMethodWithShellPermissions() local
69 uiAutomation.adoptShellPermissionIdentity(); in invokeMethodWithShellPermissions()
72 uiAutomation.dropShellPermissionIdentity(); in invokeMethodWithShellPermissions()
85 final UiAutomation uiAutomation = in invokeMethodWithShellPermissionsNoReturn() local
88 uiAutomation.adoptShellPermissionIdentity(); in invokeMethodWithShellPermissionsNoReturn()
91 uiAutomation.dropShellPermissionIdentity(); in invokeMethodWithShellPermissionsNoReturn()
116 final UiAutomation uiAutomation = in invokeStaticMethodWithShellPermissions() local
119 uiAutomation.adoptShellPermissionIdentity(); in invokeStaticMethodWithShellPermissions()
122 uiAutomation.dropShellPermissionIdentity(); in invokeStaticMethodWithShellPermissions()
DCtsTouchUtils.java93 final UiAutomation uiAutomation = instrumentation.getUiAutomation(); in emulateTapOnView() local
96 injectDownEvent(uiAutomation, downTime, xOnScreen, yOnScreen, null); in emulateTapOnView()
97 injectMoveEventForTap(uiAutomation, downTime, touchSlop, xOnScreen, yOnScreen); in emulateTapOnView()
98 injectUpEvent(uiAutomation, downTime, false, xOnScreen, yOnScreen, null); in emulateTapOnView()
139 final UiAutomation uiAutomation = instrumentation.getUiAutomation(); in emulateDoubleTapOnView() local
142 injectDownEvent(uiAutomation, downTime, xOnScreen, yOnScreen, null); in emulateDoubleTapOnView()
143 injectMoveEventForTap(uiAutomation, downTime, touchSlop, xOnScreen, yOnScreen); in emulateDoubleTapOnView()
144 injectUpEvent(uiAutomation, downTime, false, xOnScreen, yOnScreen, null); in emulateDoubleTapOnView()
145 injectDownEvent(uiAutomation, downTime, xOnScreen, yOnScreen, null); in emulateDoubleTapOnView()
146 injectMoveEventForTap(uiAutomation, downTime, touchSlop, xOnScreen, yOnScreen); in emulateDoubleTapOnView()
[all …]
DAdoptShellPermissionsRule.java47 public AdoptShellPermissionsRule(@NonNull UiAutomation uiAutomation) { in AdoptShellPermissionsRule() argument
48 this(uiAutomation, (String[]) null); in AdoptShellPermissionsRule()
51 public AdoptShellPermissionsRule(@NonNull UiAutomation uiAutomation, in AdoptShellPermissionsRule() argument
53 mUiAutomation = uiAutomation; in AdoptShellPermissionsRule()
DCtsMouseUtil.java80 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/provider/src/android/provider/cts/
DProviderTestUtils.java95 static void setDefaultSmsApp(boolean setToSmsApp, String packageName, UiAutomation uiAutomation) in setDefaultSmsApp() argument
99 executeShellCommand(String.format(cmd, packageName, "WRITE_SMS", mode), uiAutomation); in setDefaultSmsApp() local
100 executeShellCommand(String.format(cmd, packageName, "READ_SMS", mode), uiAutomation); in setDefaultSmsApp() local
108 static String executeShellCommand(String command, UiAutomation uiAutomation) in executeShellCommand() argument
111 ParcelFileDescriptor pfd = uiAutomation.executeShellCommand(command.toString()); in executeShellCommand()
129 static String setBackupTransport(String transport, UiAutomation uiAutomation) throws Exception { in setBackupTransport() argument
130 String output = executeShellCommand("bmgr transport " + transport, uiAutomation); in setBackupTransport()
140 static boolean setBackupEnabled(boolean enable, UiAutomation uiAutomation) throws Exception { in setBackupEnabled() argument
143 String output = executeShellCommand("bmgr enabled", uiAutomation); in setBackupEnabled()
152 executeShellCommand("bmgr enable " + enable, uiAutomation); in setBackupEnabled()
[all …]
/cts/tests/accessibility/common/src/android/accessibility/cts/common/
DShellCommandBuilder.java53 public static ShellCommandBuilder create(UiAutomation uiAutomation) { in create() argument
54 return new ShellCommandBuilder(uiAutomation); in create()
57 private ShellCommandBuilder(UiAutomation uiAutomation) { in ShellCommandBuilder() argument
58 mUiAutomation = uiAutomation; in ShellCommandBuilder()
DInstrumentedAccessibilityService.java244 final UiAutomation uiAutomation = instrumentation.getUiAutomation( in disableAllServices() local
246 ShellCommandBuilder.create(uiAutomation) in disableAllServices()
250 uiAutomation.destroy(); in disableAllServices()
/cts/tests/accessibility/src/android/view/accessibility/cts/
DAccessibilityManagerTest.java428 UiAutomation uiAutomation = sInstrumentation.getUiAutomation( in performShortcut_withoutPermission_fails() local
432 uiAutomation, SpeakingAccessibilityService.COMPONENT_NAME.flattenToString()); in performShortcut_withoutPermission_fails()
439 configureShortcut(uiAutomation, originalShortcut); in performShortcut_withoutPermission_fails()
440 uiAutomation.destroy(); in performShortcut_withoutPermission_fails()
448 UiAutomation uiAutomation = sInstrumentation.getUiAutomation( in performShortcut_withPermission_succeeds() local
452 uiAutomation, SpeakingAccessibilityService.COMPONENT_NAME.flattenToString()); in performShortcut_withPermission_succeeds()
454 runWithShellPermissionIdentity(uiAutomation, in performShortcut_withPermission_succeeds()
462 configureShortcut(uiAutomation, originalShortcut); in performShortcut_withPermission_succeeds()
463 uiAutomation.destroy(); in performShortcut_withPermission_succeeds()
467 private String configureShortcut(UiAutomation uiAutomation, String shortcutService) { in configureShortcut() argument
[all …]
/cts/tests/tests/appop/src/android/app/appops/cts/
DAppOpsUtils.kt105 val uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation() in runWithShellPermissionIdentity() constant
106 uiAutomation.adoptShellPermissionIdentity() in runWithShellPermissionIdentity()
112 uiAutomation.dropShellPermissionIdentity() in runWithShellPermissionIdentity()
/cts/tests/tests/telephony/current/permissions/src/android/telephony/cts/telephonypermission/
DTelephonyManagerReadPhoneStatePermissionTest.java55 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in grantUserReadPhoneStatePermission() local
56 uiAutomation.grantRuntimePermission(getContext().getPackageName(), in grantUserReadPhoneStatePermission()
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/
DMockImeSession.java144 @NonNull UiAutomation uiAutomation, @NonNull String command) throws IOException { in executeShellCommand()
147 uiAutomation.executeShellCommand(command))) { in executeShellCommand()
184 private MockImeSession(@NonNull Context context, @NonNull UiAutomation uiAutomation) { in MockImeSession() argument
186 mUiAutomation = uiAutomation; in MockImeSession()
239 @NonNull UiAutomation uiAutomation, in create() argument
246 final MockImeSession client = new MockImeSession(context, uiAutomation); in create()
DMockImeSessionRule.java49 public MockImeSessionRule(@NonNull Context context, @NonNull UiAutomation uiAutomation, in MockImeSessionRule() argument
52 mUiAutomation = uiAutomation; in MockImeSessionRule()
/cts/hostsidetests/appsecurity/test-apps/ApplicationVisibilityCrossUserApp/src/com/android/cts/applicationvisibility/
DApplicationVisibilityCrossUserTest.java186 final UiAutomation uiAutomation = in ungrantAcrossUsersPermission() local
189 uiAutomation.adoptShellPermissionIdentity(); in ungrantAcrossUsersPermission()
193 uiAutomation.dropShellPermissionIdentity(); in ungrantAcrossUsersPermission()
/cts/tests/tests/media/src/android/media/cts/
DUtils.java114 UiAutomation uiAutomation = instrumentation.getUiAutomation(); in toggleNotificationPolicyAccess() local
116 try (ParcelFileDescriptor fd = uiAutomation.executeShellCommand(command)) { in toggleNotificationPolicyAccess()
126 uiAutomation.destroy(); in toggleNotificationPolicyAccess()
/cts/tests/app/src/android/app/cts/
DTileServiceTest.java188 UiAutomation uiAutomation = InstrumentationRegistry.getInstrumentation().getUiAutomation(); in runCommand() local
190 try (ParcelFileDescriptor fd = uiAutomation.executeShellCommand(command)) { in runCommand()
200 uiAutomation.destroy(); in runCommand()
/cts/tests/tests/notificationlegacy/notificationlegacy20/src/android/app/notification/legacy20/cts/
DLegacyNotificationManager20Test.java189 UiAutomation uiAutomation = instrumentation.getUiAutomation(); in runCommand() local
191 try (ParcelFileDescriptor fd = uiAutomation.executeShellCommand(command)) { in runCommand()
201 uiAutomation.destroy(); in runCommand()
/cts/tests/tests/text/src/android/text/method/cts/
DPasswordTransformationMethodTest.java126 UiAutomation uiAutomation = mInstrumentation.getUiAutomation(); in enableAppOps() local
132 uiAutomation.executeShellCommand(cmd.toString()); in enableAppOps()
142 ParcelFileDescriptor pfd = uiAutomation.executeShellCommand(queryStr); in enableAppOps()

12