Home
last modified time | relevance | path

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

12

/frameworks/support/emoji/core/tests/java/android/support/text/emoji/util/
DKeyboardUtil.java40 return keyEvent(KeyEvent.KEYCODE_0); in zero()
44 return keyEvent(KeyEvent.KEYCODE_DEL); in del()
48 return keyEvent(KeyEvent.KEYCODE_DEL, ALT); in altDel()
52 return keyEvent(KeyEvent.KEYCODE_DEL, CTRL); in ctrlDel()
56 return keyEvent(KeyEvent.KEYCODE_DEL, SHIFT); in shiftDel()
60 return keyEvent(KeyEvent.KEYCODE_DEL, FN); in fnDel()
64 return keyEvent(KeyEvent.KEYCODE_FORWARD_DEL); in forwardDel()
67 public static KeyEvent keyEvent(int keycode, int metaState) { in keyEvent() method in KeyboardUtil
72 public static KeyEvent keyEvent(int keycode) { in keyEvent() method in KeyboardUtil
/frameworks/base/services/core/java/com/android/server/media/
DMediaSessionService.java618 private void dispatchVolumeKeyLongPressLocked(KeyEvent keyEvent) { in dispatchVolumeKeyLongPressLocked() argument
620 mCurrentFullUserRecord.mOnVolumeKeyLongPressListener.onVolumeKeyLongPress(keyEvent); in dispatchVolumeKeyLongPressLocked()
622 Log.w(TAG, "Failed to send " + keyEvent + " to volume key long-press listener"); in dispatchVolumeKeyLongPressLocked()
923 public void dispatchMediaKeyEvent(KeyEvent keyEvent, boolean needWakeLock) { in dispatchMediaKeyEvent() argument
924 if (keyEvent == null || !KeyEvent.isMediaKey(keyEvent.getKeyCode())) { in dispatchMediaKeyEvent()
935 + keyEvent); in dispatchMediaKeyEvent()
957 Log.d(TAG, "Send " + keyEvent + " to the media key listener"); in dispatchMediaKeyEvent()
960 mCurrentFullUserRecord.mOnMediaKeyListener.onMediaKey(keyEvent, in dispatchMediaKeyEvent()
961 new MediaKeyListenerResultReceiver(keyEvent, needWakeLock)); in dispatchMediaKeyEvent()
964 Log.w(TAG, "Failed to send " + keyEvent in dispatchMediaKeyEvent()
[all …]
/frameworks/native/libs/input/tests/
DInputPublisherAndConsumer_test.cpp101 KeyEvent* keyEvent = static_cast<KeyEvent*>(event); in PublishAndConsumeKeyEvent() local
103 EXPECT_EQ(deviceId, keyEvent->getDeviceId()); in PublishAndConsumeKeyEvent()
104 EXPECT_EQ(source, keyEvent->getSource()); in PublishAndConsumeKeyEvent()
105 EXPECT_EQ(action, keyEvent->getAction()); in PublishAndConsumeKeyEvent()
106 EXPECT_EQ(flags, keyEvent->getFlags()); in PublishAndConsumeKeyEvent()
107 EXPECT_EQ(keyCode, keyEvent->getKeyCode()); in PublishAndConsumeKeyEvent()
108 EXPECT_EQ(scanCode, keyEvent->getScanCode()); in PublishAndConsumeKeyEvent()
109 EXPECT_EQ(metaState, keyEvent->getMetaState()); in PublishAndConsumeKeyEvent()
110 EXPECT_EQ(repeatCount, keyEvent->getRepeatCount()); in PublishAndConsumeKeyEvent()
111 EXPECT_EQ(downTime, keyEvent->getDownTime()); in PublishAndConsumeKeyEvent()
[all …]
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/util/
DMockWindow.java97 public void openPanel(int i, KeyEvent keyEvent) { in openPanel() argument
107 public void togglePanel(int i, KeyEvent keyEvent) { in togglePanel() argument
117 public boolean performPanelShortcut(int i, int i1, KeyEvent keyEvent, int i2) { in performPanelShortcut() argument
177 public boolean superDispatchKeyEvent(KeyEvent keyEvent) { in superDispatchKeyEvent() argument
182 public boolean superDispatchKeyShortcutEvent(KeyEvent keyEvent) { in superDispatchKeyShortcutEvent() argument
237 public boolean isShortcutKey(int i, KeyEvent keyEvent) { in isShortcutKey() argument
/frameworks/support/v17/leanback/src/android/support/v17/leanback/media/
DPlaybackTransportControlGlue.java245 boolean dispatchAction(Action action, KeyEvent keyEvent) { in dispatchAction() argument
248 boolean canPlay = keyEvent == null in dispatchAction()
249 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE in dispatchAction()
250 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY; in dispatchAction()
251 boolean canPause = keyEvent == null in dispatchAction()
252 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE in dispatchAction()
253 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PAUSE; in dispatchAction()
DPlaybackBannerControlGlue.java374 boolean dispatchAction(Action action, KeyEvent keyEvent) { in dispatchAction() argument
377 boolean canPlay = keyEvent == null in dispatchAction()
378 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE in dispatchAction()
379 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY; in dispatchAction()
380 boolean canPause = keyEvent == null in dispatchAction()
381 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE in dispatchAction()
382 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PAUSE; in dispatchAction()
DPlaybackControlGlue.java490 boolean dispatchAction(Action action, KeyEvent keyEvent) { in dispatchAction() argument
493 boolean canPlay = keyEvent == null in dispatchAction()
494 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE in dispatchAction()
495 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY; in dispatchAction()
496 boolean canPause = keyEvent == null in dispatchAction()
497 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE in dispatchAction()
498 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PAUSE; in dispatchAction()
/frameworks/support/samples/SupportLeanbackDemos/src/com/example/android/leanback/
DPlaybackTransportControlGlueSample.java75 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in onKey() argument
76 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in onKey()
77 Action action = getControlsRow().getActionForKeyCode(keyEvent.getKeyCode()); in onKey()
83 return super.onKey(view, keyCode, keyEvent); in onKey()
DPlaybackControlGlue.java104 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in onKey() argument
105 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in onKey()
106 Action action = getControlsRow().getActionForKeyCode(keyEvent.getKeyCode()); in onKey()
112 return super.onKey(view, keyCode, keyEvent); in onKey()
DPlaybackControlHelper.java120 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in onKey() argument
121 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in onKey()
122 Action action = getControlsRow().getActionForKeyCode(keyEvent.getKeyCode()); in onKey()
128 return super.onKey(view, keyCode, keyEvent); in onKey()
DPlaybackControlSupportHelper.java123 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in onKey() argument
124 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in onKey()
125 Action action = getControlsRow().getActionForKeyCode(keyEvent.getKeyCode()); in onKey()
131 return super.onKey(view, keyCode, keyEvent); in onKey()
/frameworks/base/media/java/android/media/session/
DISessionManager.aidl36 void dispatchMediaKeyEvent(in KeyEvent keyEvent, boolean needWakeLock); in dispatchMediaKeyEvent() argument
37 void dispatchVolumeKeyEvent(in KeyEvent keyEvent, int stream, boolean musicOnly); in dispatchVolumeKeyEvent() argument
DMediaSessionManager.java279 public void dispatchMediaKeyEvent(@NonNull KeyEvent keyEvent) { in dispatchMediaKeyEvent() argument
280 dispatchMediaKeyEvent(keyEvent, false); in dispatchMediaKeyEvent()
290 public void dispatchMediaKeyEvent(@NonNull KeyEvent keyEvent, boolean needWakeLock) { in dispatchMediaKeyEvent() argument
292 mService.dispatchMediaKeyEvent(keyEvent, needWakeLock); in dispatchMediaKeyEvent()
305 public void dispatchVolumeKeyEvent(@NonNull KeyEvent keyEvent, int stream, boolean musicOnly) { in dispatchVolumeKeyEvent() argument
307 mService.dispatchVolumeKeyEvent(keyEvent, stream, musicOnly); in dispatchVolumeKeyEvent()
DMediaSessionLegacyHelper.java168 public void sendMediaButtonEvent(KeyEvent keyEvent, boolean needWakeLock) { in sendMediaButtonEvent() argument
169 if (keyEvent == null) { in sendMediaButtonEvent()
173 mSessionManager.dispatchMediaKeyEvent(keyEvent, needWakeLock); in sendMediaButtonEvent()
175 Log.d(TAG, "dispatched media key " + keyEvent); in sendMediaButtonEvent()
179 public void sendVolumeKeyEvent(KeyEvent keyEvent, int stream, boolean musicOnly) { in sendVolumeKeyEvent() argument
180 if (keyEvent == null) { in sendVolumeKeyEvent()
184 mSessionManager.dispatchVolumeKeyEvent(keyEvent, stream, musicOnly); in sendVolumeKeyEvent()
/frameworks/base/apct-tests/perftests/core/src/android/widget/
DEditTextLongTextPerfTest.java112 final KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER); in testEditText() local
119 editText.onKeyDown(keyEvent.getKeyCode(), keyEvent); in testEditText() local
/frameworks/support/v17/leanback/src/android/support/v17/leanback/app/
DPlaybackControlSupportGlue.java174 KeyEvent keyEvent = (KeyEvent) event; in setOnKeyInterceptListener()
175 return onKeyListenerr.onKey(null, keyEvent.getKeyCode(), keyEvent); in setOnKeyInterceptListener()
DPlaybackControlGlue.java309 KeyEvent keyEvent = (KeyEvent) event; in setOnKeyInterceptListener()
310 return onKeyListener.onKey(null, keyEvent.getKeyCode(), keyEvent); in setOnKeyInterceptListener()
/frameworks/support/samples/Support7Demos/src/com/example/android/supportv7/util/
DSortedListActivity.java59 public boolean onEditorAction(TextView textView, int id, KeyEvent keyEvent) { in onCreate()
61 (keyEvent == null || keyEvent.getAction() == KeyEvent.ACTION_DOWN)) { in onCreate()
/frameworks/base/core/java/android/view/
DInputEventConsistencyVerifier.java174 final KeyEvent keyEvent = (KeyEvent)event; in onInputEvent() local
175 onKeyEvent(keyEvent, nestingLevel); in onInputEvent()
592 final KeyEvent keyEvent = (KeyEvent)event; in onUnhandledEvent() local
593 final int deviceId = keyEvent.getDeviceId(); in onUnhandledEvent()
594 final int source = keyEvent.getSource(); in onUnhandledEvent()
595 final int keyCode = keyEvent.getKeyCode(); in onUnhandledEvent()
/frameworks/support/v17/leanback/tests/java/android/support/v17/leanback/app/
DPlaybackTestFragment.java203 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in onKey() argument
204 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in onKey()
205 Action action = getControlsRow().getActionForKeyCode(keyEvent.getKeyCode()); in onKey()
211 return super.onKey(view, keyCode, keyEvent); in onKey()
DPlaybackTestSupportFragment.java206 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in onKey() argument
207 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in onKey()
208 Action action = getControlsRow().getActionForKeyCode(keyEvent.getKeyCode()); in onKey()
214 return super.onKey(view, keyCode, keyEvent); in onKey()
DPlaybackOverlayTestFragment.java249 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in onKey() argument
250 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in onKey()
251 Action action = getControlsRow().getActionForKeyCode(keyEvent.getKeyCode()); in onKey()
257 return super.onKey(view, keyCode, keyEvent); in onKey()
/frameworks/base/core/tests/coretests/src/android/text/method/
DForwardDeleteTest.java61 final KeyEvent keyEvent = KeyUtils.generateKeyEvent( in forwardDelete() local
63 mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent); in forwardDelete() local
/frameworks/base/services/core/jni/
Dcom_android_server_input_InputManagerService.cpp237 virtual void interceptKeyBeforeQueueing(const KeyEvent* keyEvent, uint32_t& policyFlags);
241 const KeyEvent* keyEvent, uint32_t policyFlags);
243 const KeyEvent* keyEvent, uint32_t policyFlags, KeyEvent* outFallbackKeyEvent);
938 void NativeInputManager::interceptKeyBeforeQueueing(const KeyEvent* keyEvent, in interceptKeyBeforeQueueing() argument
949 nsecs_t when = keyEvent->getEventTime(); in interceptKeyBeforeQueueing()
951 jobject keyEventObj = android_view_KeyEvent_fromNative(env, keyEvent); in interceptKeyBeforeQueueing()
1020 const KeyEvent* keyEvent, uint32_t policyFlags) { in interceptKeyBeforeDispatching() argument
1031 jobject keyEventObj = android_view_KeyEvent_fromNative(env, keyEvent); in interceptKeyBeforeDispatching()
1055 const KeyEvent* keyEvent, uint32_t policyFlags, KeyEvent* outFallbackKeyEvent) { in dispatchUnhandledKey() argument
1064 jobject keyEventObj = android_view_KeyEvent_fromNative(env, keyEvent); in dispatchUnhandledKey()
[all …]
/frameworks/base/media/java/android/media/
DRemoteController.java250 public boolean sendMediaKeyEvent(KeyEvent keyEvent) throws IllegalArgumentException { in sendMediaKeyEvent() argument
251 if (!KeyEvent.isMediaKey(keyEvent.getKeyCode())) { in sendMediaKeyEvent()
256 return mCurrentSession.dispatchMediaButtonEvent(keyEvent); in sendMediaKeyEvent()

12