Home
last modified time | relevance | path

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

12

/cts/tests/autofillservice/src/android/autofillservice/cts/activities/
DAbstractWebViewActivity.java55 KeyEvent keyEvent = new KeyEvent(/* downTime= */ downTime, in dispatchKeyPress() local
58 mWebView.dispatchKeyEvent(keyEvent); in dispatchKeyPress()
59 keyEvent = new KeyEvent(/* downTime= */ downTime, in dispatchKeyPress()
62 mWebView.dispatchKeyEvent(keyEvent); in dispatchKeyPress()
/cts/tests/tests/view/src/android/view/cts/
DKeyEventInterceptTest.java149 KeyEvent keyEvent = mActivity.mKeyEvents.poll(); in assertKeyNotReceived() local
150 if (keyEvent == null) { in assertKeyNotReceived()
153 fail("Should not have received " + KeyEvent.keyCodeToString(keyEvent.getKeyCode())); in assertKeyNotReceived()
157 KeyEvent keyEvent = mActivity.mKeyEvents.poll(); in assertKeyReceived() local
158 if (keyEvent == null) { in assertKeyReceived()
161 assertEquals(keyCode, keyEvent.getKeyCode()); in assertKeyReceived()
162 assertEquals(action, keyEvent.getAction()); in assertKeyReceived()
DVerifyInputEventTest.java318 private void compareKeys(KeyEvent keyEvent, VerifiedInputEvent verified) { in compareKeys() argument
320 assertEquals(keyEvent.getEventTime() * NANOS_PER_MILLISECOND, in compareKeys()
322 assertEquals(keyEvent.getSource(), verified.getSource()); in compareKeys()
326 if (keyEvent.getDisplayId() != INVALID_DISPLAY) { in compareKeys()
333 assertEquals(keyEvent.getAction(), verifiedKey.getAction()); in compareKeys()
334 assertEquals(keyEvent.getDownTime() * NANOS_PER_MILLISECOND, in compareKeys()
336 compareKeyFlags(keyEvent.getFlags(), verifiedKey); in compareKeys()
337 assertEquals(keyEvent.getKeyCode(), verifiedKey.getKeyCode()); in compareKeys()
338 assertEquals(keyEvent.getScanCode(), verifiedKey.getScanCode()); in compareKeys()
339 assertEquals(keyEvent.getMetaState(), verifiedKey.getMetaState()); in compareKeys()
[all …]
DKeyEventTest.java105 KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_0); in testConstructor() local
106 new KeyEvent(keyEvent); in testConstructor()
107 new KeyEvent(keyEvent, mEventTime, 1); in testConstructor()
121 KeyEvent keyEvent = parcelUnparcel(mKeyEvent); in testGetCharacters() local
122 assertEquals(mKeyEvent.getCharacters(), keyEvent.getCharacters()); in testGetCharacters()
666 KeyEvent keyEvent = parcelUnparcel(mKeyEvent); in testWriteToParcel() local
668 assertEquals(mKeyEvent.getAction(), keyEvent.getAction()); in testWriteToParcel()
669 assertEquals(mKeyEvent.getKeyCode(), keyEvent.getKeyCode()); in testWriteToParcel()
670 assertEquals(mKeyEvent.getRepeatCount(), keyEvent.getRepeatCount()); in testWriteToParcel()
671 assertEquals(mKeyEvent.getMetaState(), keyEvent.getMetaState()); in testWriteToParcel()
[all …]
DContentPaneFocusTest.java175 KeyEvent keyEvent = new KeyEvent(time, time, action, KeyEvent.KEYCODE_CTRL_LEFT, 0, in sendMetaKey() local
177 mInstrumentation.sendKeySync(keyEvent); in sendMetaKey()
/cts/tests/input/src/android/input/cts/
DGamepadWithAccessibilityTest.kt119 val keyEvent = lastInputEvent as KeyEvent in testDeviceId() constant
122 assertEquals(KeyEvent.FLAG_FROM_SYSTEM, keyEvent.getFlags()) in testDeviceId()
123 assertNotEquals(keyEvent.getDeviceId(), VIRTUAL_KEYBOARD) in testDeviceId()
124 assertEquals(keyEvent.getDeviceId(), uinputDevice.getDeviceId()) in testDeviceId()
/cts/tests/tests/media/bettertogether/src/android/media/bettertogether/cts/
DMediaButtonBroadcastReceiver.java34 KeyEvent keyEvent = intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT); in onReceive() local
37 mCallback.accept(keyEvent); in onReceive()
DMediaButtonReceiverService.java44 KeyEvent keyEvent = intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT); in onHandleIntent() local
47 mCallback.accept(keyEvent); in onHandleIntent()
DMediaSessionTest.java472 MediaButtonBroadcastReceiver.setCallback((keyEvent) -> { in testSetMediaButtonReceiver_broadcastReceiver() argument
473 assertThat(keyEvent.getKeyCode()).isEqualTo(keyCode); in testSetMediaButtonReceiver_broadcastReceiver()
476 assertThat(keyEvent.getAction()).isEqualTo(KeyEvent.ACTION_DOWN); in testSetMediaButtonReceiver_broadcastReceiver()
479 assertThat(keyEvent.getAction()).isEqualTo(KeyEvent.ACTION_UP); in testSetMediaButtonReceiver_broadcastReceiver()
523 MediaButtonReceiverService.setCallback((keyEvent) -> { in testSetMediaButtonReceiver_service() argument
524 assertThat(keyEvent.getKeyCode()).isEqualTo(keyCode); in testSetMediaButtonReceiver_service()
527 assertThat(keyEvent.getAction()).isEqualTo(KeyEvent.ACTION_DOWN); in testSetMediaButtonReceiver_service()
530 assertThat(keyEvent.getAction()).isEqualTo(KeyEvent.ACTION_UP); in testSetMediaButtonReceiver_service()
608 MediaButtonBroadcastReceiver.setCallback((keyEvent) -> { in testSetMediaButtonBroadcastReceiver_broadcastReceiver() argument
609 assertThat(keyEvent.getKeyCode()).isEqualTo(keyCode); in testSetMediaButtonBroadcastReceiver_broadcastReceiver()
[all …]
/cts/libs/input/src/com/android/cts/input/
DEventVerifier.kt46 val keyEvent = in getKeyEvent() constant
48 return keyEvent as KeyEvent in getKeyEvent()
/cts/tests/tests/text/src/android/text/method/cts/
DDialerKeyListenerTest.java54 KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, event); in testLookup() local
55 int keyChar = keyEvent.getNumber(); in testLookup()
57 assertEquals(keyChar, mockDialerKeyListener.lookup(keyEvent, span)); in testLookup()
DForwardDeleteTest.java55 final KeyEvent keyEvent = getKey(KeyEvent.KEYCODE_FORWARD_DEL, modifiers); in forwardDelete() local
56 mActivity.runOnUiThread(() -> mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent)); in forwardDelete() local
DBackspaceTest.java55 final KeyEvent keyEvent = getKey(KeyEvent.KEYCODE_DEL, modifiers); in backspace() local
56 mActivityRule.runOnUiThread(() -> mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent)); in backspace() local
/cts/tests/surfacecontrol/src/android/view/cts/util/
DASurfaceControlInputReceiverTestUtils.java36 boolean onKeyEvent(KeyEvent keyEvent); in onKeyEvent() argument
DEmbeddedSCVHService.java290 public boolean onKeyEvent(KeyEvent keyEvent) { in attachEmbeddedASurfaceControl()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityInputConnectionTest.java204 final KeyEvent keyEvent = new KeyEvent(eventTime, eventTime, in testSendKeyEvent() local
209 ic.sendKeyEvent(keyEvent); in testSendKeyEvent()
211 .sendKeyEvent(keyEvent); in testSendKeyEvent()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/
DInputMethodServiceTest.java437 private static void assertSynthesizedSoftwareKeyEvent(KeyEvent keyEvent, int expectedAction,
439 if (keyEvent.getEventTime() < expectedEventTimeBefore
440 || expectedEventTimeAfter < keyEvent.getEventTime()) {
443 keyEvent.getEventTime()));
445 assertEquals(expectedAction, keyEvent.getAction());
446 assertEquals(expectedKeyCode, keyEvent.getKeyCode());
447 assertEquals(KeyCharacterMap.VIRTUAL_KEYBOARD, keyEvent.getDeviceId());
448 assertEquals(0, keyEvent.getScanCode());
449 assertEquals(0, keyEvent.getRepeatCount());
450 assertEquals(0, keyEvent.getRepeatCount());
[all …]
DFocusHandlingTest.java268 final KeyEvent keyEvent = keyEvents.remove(); in testSwitchingBetweenEquivalentNonEditableViews() local
269 Assert.assertEquals(keyEvent.getAction(), KeyEvent.ACTION_MULTIPLE); in testSwitchingBetweenEquivalentNonEditableViews()
270 Assert.assertEquals(keyEvent.getKeyCode(), KeyEvent.KEYCODE_UNKNOWN); in testSwitchingBetweenEquivalentNonEditableViews()
271 Assert.assertEquals(keyEvent.getCharacters(), testInput); in testSwitchingBetweenEquivalentNonEditableViews()
/cts/tests/tests/tv/src/android/media/tv/cts/
DTvViewTest.java394 private void verifyKeyEvent(final KeyEvent keyEvent, final InputEvent[] unhandledEvent) { in verifyKeyEvent() argument
396 mInstrumentation.sendKeySync(keyEvent); in verifyKeyEvent()
406 assertEquals(unhandled.getAction(), keyEvent.getAction()); in verifyKeyEvent()
407 assertEquals(unhandled.getKeyCode(), keyEvent.getKeyCode()); in verifyKeyEvent()
/cts/tests/tests/view/jni/
Dandroid_view_cts_AInputNativeTest.cpp118 jobject keyEvent = AInputEvent_toJava(env, event); in obtainKeyEventCopyFromNative() local
120 return keyEvent; in obtainKeyEventCopyFromNative()
/cts/tests/app/app/src/android/app/stubs/
DTestDialog.java79 public KeyEvent keyEvent; field in TestDialog
316 keyEvent = event; in dispatchKeyEvent()
/cts/tests/tests/widget/src/android/widget/cts/
DAbsSeekBarTest.java240 KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_RIGHT); in testAccessKeyProgressIncrement() local
241 mInstrumentation.sendKeySync(keyEvent); in testAccessKeyProgressIncrement()
244 keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_LEFT); in testAccessKeyProgressIncrement()
245 mInstrumentation.sendKeySync(keyEvent); in testAccessKeyProgressIncrement()
DListViewTest.java566 KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_A); in testDispatchKeyEvent()
567 mListView.dispatchKeyEvent(keyEvent); in testDispatchKeyEvent()
572 KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, in testDispatchKeyEvent()
574 mListView.dispatchKeyEvent(keyEvent); in testDispatchKeyEvent()
575 mListView.dispatchKeyEvent(keyEvent); in testDispatchKeyEvent()
576 mListView.dispatchKeyEvent(keyEvent); in testDispatchKeyEvent()
/cts/tests/surfacecontrol/src/android/view/surfacecontrol/cts/
DASurfaceControlInputReceiverTest.java130 public boolean onKeyEvent(KeyEvent keyEvent) { in testLocalASurfaceControlReceivesInput()
224 public boolean onKeyEvent(KeyEvent keyEvent) { in testTransferGestureFromHostToEmbedded() argument
305 public boolean onKeyEvent(KeyEvent keyEvent) { in testTransferGestureFromEmbeddedToHost() argument
/cts/tests/framework/base/windowmanager/src/android/server/wm/input/
DWindowFocusTests.java97 final KeyEvent keyEvent = new KeyEvent(action, keyCode); in sendKey() local
98 keyEvent.setDisplayId(displayId); in sendKey()
99 getInstrumentation().sendKeySync(keyEvent); in sendKey()

12