Home
last modified time | relevance | path

Searched refs:keyCode (Results 1 – 25 of 50) sorted by relevance

12

/cts/tests/tests/view/src/android/view/cts/
DKeyEventInjectionTest.java111 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
117 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
123 public boolean onKeyLongPress(int keyCode, KeyEvent event) { in onKeyLongPress() argument
129 public boolean onKeyMultiple(int keyCode, int count, KeyEvent event) { in onKeyMultiple() argument
143 private void sendKeyViaAdb(int keyCode, boolean longPress) { in sendKeyViaAdb() argument
145 final String command = "input keyevent " + (longPress ? "--longpress " : "") + keyCode; in sendKeyViaAdb()
153 private void sendKeyViaInstrumentation(int keyCode, boolean longPress) { in sendKeyViaInstrumentation() argument
157 new KeyEvent(downTime, downTime, KeyEvent.ACTION_DOWN, keyCode, repeatCount); in sendKeyViaInstrumentation()
162 KeyEvent.ACTION_DOWN, keyCode, repeatCount); in sendKeyViaInstrumentation()
166 KeyEvent.ACTION_UP, keyCode, 0 /* repeatCount */); in sendKeyViaInstrumentation()
[all …]
DKeyEventInjectionActivity.java29 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
32 return mCallback.onKeyDown(keyCode, event); in onKeyDown()
36 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
37 return mCallback.onKeyUp(keyCode, event); in onKeyUp()
41 public boolean onKeyLongPress(int keyCode, KeyEvent event) { in onKeyLongPress() argument
42 return mCallback.onKeyLongPress(keyCode, event); in onKeyLongPress()
46 public boolean onKeyMultiple(int keyCode, int count, KeyEvent event) { in onKeyMultiple() argument
48 return mCallback.onKeyMultiple(keyCode, count, event); in onKeyMultiple()
DLongPressBackActivity.java49 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
50 if (keyCode == KeyEvent.KEYCODE_BACK && !event.isCanceled()) { in onKeyDown()
53 return super.onKeyDown(keyCode, event); in onKeyDown()
57 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
58 if (keyCode == KeyEvent.KEYCODE_BACK) { in onKeyUp()
61 return super.onKeyUp(keyCode, event); in onKeyUp()
DKeyEventInterceptTest.java120 private void testKey(int keyCode) { in testKey() argument
121 sendKey(keyCode); in testKey()
146 private void assertKeyReceived(int keyCode, int action) { in assertKeyReceived() argument
149 fail("Did not receive " + KeyEvent.keyCodeToString(keyCode) + ", queue is empty"); in assertKeyReceived()
151 assertEquals(keyCode, keyEvent.getKeyCode()); in assertKeyReceived()
DMockView.java98 public boolean onKeyShortcut(int keyCode, KeyEvent event) { in onKeyShortcut() argument
100 return super.onKeyShortcut(keyCode, event); in onKeyShortcut()
180 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
182 return super.onKeyDown(keyCode, event); in onKeyDown()
190 public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) { in onKeyMultiple() argument
192 return super.onKeyMultiple(keyCode, repeatCount, event); in onKeyMultiple()
200 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
202 return super.onKeyUp(keyCode, event); in onKeyUp()
617 public boolean onKeyPreIme(int keyCode, KeyEvent event) { in onKeyPreIme() argument
619 return super.onKeyPreIme(keyCode, event); in onKeyPreIme()
DContentPaneFocusTest.java148 private void sendMetaHotkey(int keyCode) throws Throwable { in sendMetaHotkey() argument
151 KeyEvent metaHotkey = new KeyEvent(time, time, KeyEvent.ACTION_DOWN, keyCode, in sendMetaHotkey()
155 metaHotkey = new KeyEvent(time, time, KeyEvent.ACTION_UP, keyCode, in sendMetaHotkey()
/cts/tests/tests/widget/src/android/widget/cts/
DMockViewForListPopupWindow.java41 public boolean onKeyPreIme(int keyCode, KeyEvent event) { in onKeyPreIme() argument
43 return mListPopupWindow.onKeyPreIme(keyCode, event); in onKeyPreIme()
45 return super.onKeyPreIme(keyCode, event); in onKeyPreIme()
49 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
51 return mListPopupWindow.onKeyDown(keyCode, event); in onKeyDown()
53 return super.onKeyDown(keyCode, event); in onKeyDown()
57 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
59 return mListPopupWindow.onKeyUp(keyCode, event); in onKeyUp()
61 return super.onKeyUp(keyCode, event); in onKeyUp()
DToolbarCtsActivity.java64 public boolean onKeyShortcut(int keyCode, KeyEvent event) { in onKeyShortcut() argument
66 return super.onKeyShortcut(keyCode, event); in onKeyShortcut()
DMultiAutoCompleteTextViewTest.java276 protected void performFiltering(CharSequence text, int keyCode) { in performFiltering() argument
277 super.performFiltering(text, keyCode); in performFiltering()
280 protected void performFiltering(CharSequence text, int start, int end, int keyCode) { in performFiltering() argument
281 super.performFiltering(text, start, end, keyCode); in performFiltering()
/cts/tests/tests/text/src/android/text/method/cts/
DTextMethodUtils.java29 for (int keyCode = KeyEvent.KEYCODE_A; keyCode <= KeyEvent.KEYCODE_Z; keyCode++) { in getUnacceptedKeyCode()
30 KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode); in getUnacceptedKeyCode()
32 return keyCode; in getUnacceptedKeyCode()
DDateKeyListenerTest.java162 int keyCode = TextMethodUtils.getUnacceptedKeyCode(DateKeyListener.CHARACTERS); in testDateTimeKeyListener() local
163 if (-1 != keyCode) { in testDateTimeKeyListener()
164 CtsKeyEventUtil.sendKeys(mInstrumentation, mTextView, keyCode); in testDateTimeKeyListener()
/cts/tests/app/app/src/android/app/stubs/
DKeyguardManagerActivity.java30 public int keyCode; field in KeyguardManagerActivity
54 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
55 this.keyCode = keyCode; in onKeyDown()
56 if (keyCode == KeyEvent.KEYCODE_0 && mKeyLock != null) { in onKeyDown()
66 return super.onKeyDown(keyCode, event); in onKeyDown()
DTestDialog.java146 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
148 keyDownCode = keyCode; in onKeyDown()
149 onKeyDownReturn = super.onKeyDown(keyCode, event); in onKeyDown()
155 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
158 return super.onKeyUp(keyCode, event); in onKeyUp()
162 public boolean onKeyMultiple(int keyCode, int repeatCount, KeyEvent event) { in onKeyMultiple() argument
164 onKeyMultipleReturn = super.onKeyMultiple(keyCode, repeatCount, event); in onKeyMultiple()
DInstrumentationTestActivity.java213 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
215 mKeyDownCode = keyCode; in onKeyDown()
216 return super.onKeyDown(keyCode, event); in onKeyDown()
226 public boolean onKeyUp(int keyCode, KeyEvent event) { in onKeyUp() argument
228 mKeyUpCode = keyCode; in onKeyUp()
229 return super.onKeyUp(keyCode, event); in onKeyUp()
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DWindowFocusTests.java80 private static void sendKey(int action, int keyCode, int displayId) { in sendKey() argument
81 final KeyEvent keyEvent = new KeyEvent(action, keyCode); in sendKey()
88 private static void sendAndAssertTargetConsumedKey(InputTargetActivity target, int keyCode, in sendAndAssertTargetConsumedKey() argument
90 sendAndAssertTargetConsumedKey(target, ACTION_DOWN, keyCode, targetDisplayId); in sendAndAssertTargetConsumedKey()
91 sendAndAssertTargetConsumedKey(target, ACTION_UP, keyCode, targetDisplayId); in sendAndAssertTargetConsumedKey()
95 int keyCode, int targetDisplayId) { in sendAndAssertTargetConsumedKey() argument
97 sendKey(action, keyCode, targetDisplayId); in sendAndAssertTargetConsumedKey()
98 target.assertAndConsumeKeyEvent(action, keyCode, 0 /* flags */); in sendAndAssertTargetConsumedKey()
427 private KeyEvent consumeKeyEvent(int action, int keyCode, int flags) { in consumeKeyEvent() argument
431 if (event.getAction() == action && event.getKeyCode() == keyCode in consumeKeyEvent()
[all …]
DWindowCtsActivity.java55 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
57 return super.onKeyDown(keyCode, event); in onKeyDown()
/cts/tests/autofillservice/src/android/autofillservice/cts/
DAbstractWebViewActivity.java50 public void dispatchKeyPress(int keyCode) { in dispatchKeyPress() argument
52 KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode); in dispatchKeyPress()
54 keyEvent = new KeyEvent(KeyEvent.ACTION_UP, keyCode); in dispatchKeyPress()
/cts/tests/tests/keystore/src/android/server/am/
DUiDeviceUtils.java111 private static void retryPressKeyCode(int keyCode, BooleanSupplier waitFor, String msg) { in retryPressKeyCode() argument
114 pressKeyCode(keyCode); in retryPressKeyCode()
126 private static void pressKeyCode(int keyCode) { in pressKeyCode() argument
127 getDevice().pressKeyCode(keyCode); in pressKeyCode()
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/
DUiDeviceUtils.java118 private static void retryPressKeyCode(int keyCode, BooleanSupplier waitFor, String msg) { in retryPressKeyCode() argument
121 pressKeyCode(keyCode); in retryPressKeyCode()
133 private static void pressKeyCode(int keyCode) { in pressKeyCode() argument
134 getDevice().pressKeyCode(keyCode); in pressKeyCode()
/cts/tests/tests/tv/src/android/media/tv/cts/
DTvInputServiceTest.java542 final int keyCode = KeyEvent.KEYCODE_Q; in verifyCommandDispatchKeyDown() local
543 final KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode); in verifyCommandDispatchKeyDown()
552 && session.mKeyDownCode == keyCode in verifyCommandDispatchKeyDown()
561 final int keyCode = KeyEvent.KEYCODE_Q; in verifyCommandDispatchKeyMultiple() local
562 final KeyEvent event = new KeyEvent(KeyEvent.ACTION_MULTIPLE, keyCode); in verifyCommandDispatchKeyMultiple()
571 && session.mKeyMultipleCode == keyCode in verifyCommandDispatchKeyMultiple()
581 final int keyCode = KeyEvent.KEYCODE_Q; in verifyCommandDispatchKeyUp() local
582 final KeyEvent event = new KeyEvent(KeyEvent.ACTION_UP, keyCode); in verifyCommandDispatchKeyUp()
591 && session.mKeyUpCode == keyCode in verifyCommandDispatchKeyUp()
1219 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
[all …]
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DShellUtils.java75 public static void sendKeyEvent(String keyCode) { in sendKeyEvent() argument
76 runShellCommand("input keyevent " + keyCode); in sendKeyEvent()
/cts/common/device-side/util/src/com/android/compatibility/common/util/
DShellUtils.java75 public static void sendKeyEvent(String keyCode) { in sendKeyEvent() argument
76 runShellCommand("input keyevent " + keyCode); in sendKeyEvent()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/projection/widgets/
DProjectionWidgetActivity.java37 InjectDPadClickListener(int keyCode) { in InjectDPadClickListener() argument
38 mKeyCode = keyCode; in InjectDPadClickListener()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DUSBAudioPeripheralButtonsActivity.java118 public boolean onKeyDown(int keyCode, KeyEvent event) { in onKeyDown() argument
120 switch (keyCode) { in onKeyDown()
140 return super.onKeyDown(keyCode, event); in onKeyDown()
/cts/tests/tests/media/src/android/media/cts/
DMediaActivityTest.java180 private void sendKeyEvent(int keyCode) { in sendKeyEvent() argument
182 final KeyEvent down = new KeyEvent(downTime, downTime, KeyEvent.ACTION_DOWN, keyCode, 0); in sendKeyEvent()
184 final KeyEvent up = new KeyEvent(downTime, upTime, KeyEvent.ACTION_UP, keyCode, 0); in sendKeyEvent()

12