Home
last modified time | relevance | path

Searched refs:instrumentation (Results 1 – 25 of 61) sorted by relevance

123

/cts/tests/app/src/android/app/cts/
DInstrumentation_ActivityMonitorTest.java48 Instrumentation instrumentation = getInstrumentation(); in testActivityMonitor() local
49 ActivityMonitor am = instrumentation.addMonitor( in testActivityMonitor()
51 Context context = instrumentation.getTargetContext(); in testActivityMonitor()
66 instrumentation.waitForIdleSync(); in testActivityMonitor()
76 instrumentation.removeMonitor(am); in testActivityMonitor()
94 final Instrumentation instrumentation = getInstrumentation(); in testActivityMonitor_onStartActivity() local
95 final Context context = instrumentation.getTargetContext(); in testActivityMonitor_onStartActivity()
101 instrumentation.addMonitor(cam1); in testActivityMonitor_onStartActivity()
109 instrumentation.removeMonitor(cam1); in testActivityMonitor_onStartActivity()
115 instrumentation.addMonitor(cam2); in testActivityMonitor_onStartActivity()
[all …]
DApplicationTest.java45 final Instrumentation instrumentation = getInstrumentation(); in testApplication() local
46 final Context targetContext = instrumentation.getTargetContext(); in testApplication()
51 final Activity activity = instrumentation.startActivitySync(intent); in testApplication()
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DCtsTouchUtils.java68 public static void emulateTapOnViewCenter(Instrumentation instrumentation, View view) { in emulateTapOnViewCenter() argument
69 emulateTapOnView(instrumentation, view, view.getWidth() / 2, view.getHeight() / 2); in emulateTapOnViewCenter()
81 public static void emulateTapOnView(Instrumentation instrumentation, View anchorView, in emulateTapOnView() argument
89 final UiAutomation uiAutomation = instrumentation.getUiAutomation(); in emulateTapOnView()
97 instrumentation.waitForIdleSync(); in emulateTapOnView()
106 public static void emulateDoubleTapOnViewCenter(Instrumentation instrumentation, View view) { in emulateDoubleTapOnViewCenter() argument
107 emulateDoubleTapOnView(instrumentation, view, view.getWidth() / 2, view.getHeight() / 2); in emulateDoubleTapOnViewCenter()
119 public static void emulateDoubleTapOnView(Instrumentation instrumentation, View anchorView, in emulateDoubleTapOnView() argument
127 final UiAutomation uiAutomation = instrumentation.getUiAutomation(); in emulateDoubleTapOnView()
138 instrumentation.waitForIdleSync(); in emulateDoubleTapOnView()
[all …]
DCtsKeyEventUtil.java48 public static void sendString(final Instrumentation instrumentation, final View targetView, in sendString() argument
63 sendKey(instrumentation, targetView, KeyEvent.changeTimeRepeat( in sendString()
77 public static void sendKeys(final Instrumentation instrumentation, final View targetView, in sendKeys() argument
83 sendKeyDownUp(instrumentation, targetView, keys[i]); in sendKeys()
103 public static void sendKeys(final Instrumentation instrumentation, final View targetView, in sendKeys() argument
129 sendKeyDownUp(instrumentation, targetView, keyCode); in sendKeys()
153 public static void sendKeyDownUp(final Instrumentation instrumentation, final View targetView, in sendKeyDownUp() argument
155 sendKey(instrumentation, targetView, new KeyEvent(KeyEvent.ACTION_DOWN, key)); in sendKeyDownUp()
156 sendKey(instrumentation, targetView, new KeyEvent(KeyEvent.ACTION_UP, key)); in sendKeyDownUp()
166 public static void sendKey(final Instrumentation instrumentation, final View targetView, in sendKey() argument
[all …]
DLocationUtils.java27 public static void registerMockLocationProvider(Instrumentation instrumentation, in registerMockLocationProvider() argument
31 command.append(instrumentation.getContext().getPackageName()); in registerMockLocationProvider()
35 SystemUtil.runShellCommand(instrumentation, command.toString()); in registerMockLocationProvider()
/cts/tests/tests/text/src/android/text/method/cts/
DKeyListenerTestCase.java68 final Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in enableAutoCapSettings() local
69 final Context context = instrumentation.getContext(); in enableAutoCapSettings()
70 instrumentation.runOnMainSync(() -> { in enableAutoCapSettings()
80 instrumentation.waitForIdleSync(); in enableAutoCapSettings()
85 final Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in resetAutoCapSettings() local
86 final Context context = instrumentation.getContext(); in resetAutoCapSettings()
87 instrumentation.runOnMainSync(() -> { in resetAutoCapSettings()
96 instrumentation.waitForIdleSync(); in resetAutoCapSettings()
/cts/tests/tests/mediastress/src/android/mediastress/cts/
DNativeMediaTest.java69 final Instrumentation instrumentation = getInstrumentation(); in runPlayTest() local
73 instrumentation.runOnMainSync(() -> { in runPlayTest()
74 instrumentation.callActivityOnPause(activity); in runPlayTest()
76 instrumentation.waitForIdleSync(); in runPlayTest()
78 instrumentation.runOnMainSync(() -> { in runPlayTest()
79 instrumentation.callActivityOnResume(activity); in runPlayTest()
/cts/tests/tests/media/src/android/media/cts/
DUtils.java45 Instrumentation instrumentation) { in enableAppOps() argument
46 setAppOps(packageName, operation, instrumentation, true); in enableAppOps()
50 Instrumentation instrumentation) { in disableAppOps() argument
51 setAppOps(packageName, operation, instrumentation, false); in disableAppOps()
61 Instrumentation instrumentation, boolean enable) { in setAppOps() argument
68 instrumentation.getUiAutomation().executeShellCommand(cmd.toString()); in setAppOps()
80 ParcelFileDescriptor pfd = instrumentation.getUiAutomation().executeShellCommand( in setAppOps()
88 Instrumentation instrumentation, boolean on) throws IOException { in toggleNotificationPolicyAccess() argument
93 UiAutomation uiAutomation = instrumentation.getUiAutomation(); in toggleNotificationPolicyAccess()
108 NotificationManager nm = (NotificationManager) instrumentation.getContext() in toggleNotificationPolicyAccess()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/utils/
DActivityLaunchUtils.java42 public static Activity launchActivityAndWaitForItToBeOnscreen(Instrumentation instrumentation, in launchActivityAndWaitForItToBeOnscreen() argument
56 instrumentation.runOnMainSync(() -> { in launchActivityAndWaitForItToBeOnscreen()
60 instrumentation.waitForIdleSync(); in launchActivityAndWaitForItToBeOnscreen()
61 activityTitle.append(getActivityTitle(instrumentation, mTempActivity)); in launchActivityAndWaitForItToBeOnscreen()
80 Instrumentation instrumentation, Activity activity) { in getActivityTitle() argument
82 instrumentation.runOnMainSync(() -> titleBuilder.append(activity.getTitle())); in getActivityTitle()
DRunOnMainUtils.java32 Instrumentation instrumentation, Callable<T> callable) { in getOnMain() argument
35 instrumentation.runOnMainSync(() -> { in getOnMain()
/cts/tests/tests/view/src/android/view/animation/cts/
DAnimationTestUtils.java52 public static void assertRunAnimation(final Instrumentation instrumentation, in assertRunAnimation() argument
55 assertRunAnimation(instrumentation, activityTestRule, view, animation, in assertRunAnimation()
69 public static void assertRunAnimation(final Instrumentation instrumentation, in assertRunAnimation() argument
81 instrumentation.waitForIdleSync(); in assertRunAnimation()
/cts/tests/accessibility/src/android/view/accessibility/cts/
DServiceControlUtils.java55 public static void enableSpeakingAndVibratingServices(Instrumentation instrumentation) in enableSpeakingAndVibratingServices() argument
57 Context context = instrumentation.getContext(); in enableSpeakingAndVibratingServices()
60 UiAutomation uiAutomation = instrumentation.getUiAutomation(); in enableSpeakingAndVibratingServices()
120 public static void enableMultipleFeedbackTypesService(Instrumentation instrumentation) in enableMultipleFeedbackTypesService() argument
122 Context context = instrumentation.getContext(); in enableMultipleFeedbackTypesService()
125 UiAutomation uiAutomation = instrumentation.getUiAutomation(); in enableMultipleFeedbackTypesService()
172 public static void turnAccessibilityOff(Instrumentation instrumentation) { in turnAccessibilityOff() argument
187 AccessibilityManager manager = (AccessibilityManager) instrumentation in turnAccessibilityOff()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/
DFocusHandlingTest.java237 final Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in testFocusableWindowDoesNotInvalidateExistingInputConnection() local
240 instrumentation.getUiAutomation(), in testFocusableWindowDoesNotInvalidateExistingInputConnection()
246 instrumentation.runOnMainSync(() -> editText.requestFocus()); in testFocusableWindowDoesNotInvalidateExistingInputConnection()
258 instrumentation.runOnMainSync(() -> editText.setText("")); in testFocusableWindowDoesNotInvalidateExistingInputConnection()
262 final Context context = instrumentation.getTargetContext(); in testFocusableWindowDoesNotInvalidateExistingInputConnection()
273 instrumentation.runOnMainSync(() -> popupWindow.showAsDropDown(editText)); in testFocusableWindowDoesNotInvalidateExistingInputConnection()
274 instrumentation.waitForIdleSync(); in testFocusableWindowDoesNotInvalidateExistingInputConnection()
284 instrumentation.runOnMainSync(() -> editText.setText("")); in testFocusableWindowDoesNotInvalidateExistingInputConnection()
290 instrumentation.runOnMainSync(() -> { in testFocusableWindowDoesNotInvalidateExistingInputConnection()
314 instrumentation.runOnMainSync(() -> editText.setText("")); in testFocusableWindowDoesNotInvalidateExistingInputConnection()
[all …]
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/
DTestUtils.java54 final Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in getOnMainSync() local
55 instrumentation.runOnMainSync(() -> result.set(supplier.get())); in getOnMainSync()
73 final Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in waitOnMainUntil() local
78 instrumentation.runOnMainSync(() -> { in waitOnMainUntil()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DStubFingerprintGestureService.java23 public static StubFingerprintGestureService enableSelf(Instrumentation instrumentation) { in enableSelf() argument
25 instrumentation, StubFingerprintGestureService.class); in enableSelf()
DStubMagnificationAccessibilityService.java25 Instrumentation instrumentation) { in enableSelf() argument
27 instrumentation, StubMagnificationAccessibilityService.class); in enableSelf()
DStubAccessibilityButtonService.java23 public static StubAccessibilityButtonService enableSelf(Instrumentation instrumentation) { in enableSelf() argument
25 instrumentation, StubAccessibilityButtonService.class); in enableSelf()
DShellCommandBuilder.java37 public static ShellCommandBuilder create(Instrumentation instrumentation) { in create() argument
38 return new ShellCommandBuilder(instrumentation); in create()
41 private ShellCommandBuilder(Instrumentation instrumentation) { in ShellCommandBuilder() argument
42 mInstrumentation = instrumentation; in ShellCommandBuilder()
DStubGestureAccessibilityService.java31 public static StubGestureAccessibilityService enableSelf(Instrumentation instrumentation) { in enableSelf() argument
33 instrumentation, StubGestureAccessibilityService.class); in enableSelf()
DInstrumentedAccessibilityService.java137 Instrumentation instrumentation, Class<T> clazz) { in enableService() argument
139 final Context context = instrumentation.getContext(); in enableService()
153 ShellCommandBuilder.create(instrumentation) in enableService()
161 ShellCommandBuilder.create(instrumentation) in enableService()
198 public static void disableAllServices(Instrumentation instrumentation) { in disableAllServices() argument
200 final Context context = instrumentation.getContext(); in disableAllServices()
209 ShellCommandBuilder.create(instrumentation) in disableAllServices()
DAccessibilityFingerprintGestureTest.java70 Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in setUp() local
71 mFingerprintManager = instrumentation.getContext().getPackageManager() in setUp()
73 ? instrumentation.getContext().getSystemService(FingerprintManager.class) : null; in setUp()
74 mFingerprintGestureService = StubFingerprintGestureService.enableSelf(instrumentation); in setUp()
/cts/tests/tests/telecom/src/android/telecom/cts/
DTestUtils.java197 public static String setDefaultDialer(Instrumentation instrumentation, String packageName) in setDefaultDialer() argument
199 return executeShellCommand(instrumentation, COMMAND_SET_DEFAULT_DIALER + packageName); in setDefaultDialer()
202 public static String getDefaultDialer(Instrumentation instrumentation) throws Exception { in getDefaultDialer() argument
203 return executeShellCommand(instrumentation, COMMAND_GET_DEFAULT_DIALER); in getDefaultDialer()
206 public static String getSystemDialer(Instrumentation instrumentation) throws Exception { in getSystemDialer() argument
207 return executeShellCommand(instrumentation, COMMAND_GET_SYSTEM_DIALER); in getSystemDialer()
210 public static void enablePhoneAccount(Instrumentation instrumentation, in enablePhoneAccount() argument
213 executeShellCommand(instrumentation, COMMAND_ENABLE in enablePhoneAccount()
218 public static void registerSimPhoneAccount(Instrumentation instrumentation, in registerSimPhoneAccount() argument
221 executeShellCommand(instrumentation, COMMAND_REGISTER_SIM in registerSimPhoneAccount()
[all …]
/cts/hostsidetests/shortcuts/deviceside/multiuser/src/android/content/pm/cts/shortcut/multiuser/
DLauncher.java25 public static void setAsDefaultLauncher(Instrumentation instrumentation, Context context) { in setAsDefaultLauncher() argument
26 setDefaultLauncher(instrumentation, in setAsDefaultLauncher()
/cts/hostsidetests/shortcuts/deviceside/upgrade/src/android/content/pm/cts/shortcut/upgrade/
DLauncher.java25 public static void setAsDefaultLauncher(Instrumentation instrumentation, Context context) { in setAsDefaultLauncher() argument
26 setDefaultLauncher(instrumentation, in setAsDefaultLauncher()
/cts/tests/tests/view/src/android/view/cts/
DView_InitialFocusTest.java54 Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in setup() local
55 instrumentation.setInTouchMode(true); in setup()
59 Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); in getInitialAndFirstFocus() local
63 instrumentation.waitForIdleSync(); in getInitialAndFirstFocus()
66 instrumentation.sendKeyDownUpSync(KeyEvent.KEYCODE_TAB); // leaves touch-mode in getInitialAndFirstFocus()

123