Home
last modified time | relevance | path

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

12

/frameworks/base/services/tests/servicestests/src/com/android/server/
DGestureLauncherServiceTest.java177 KeyEvent keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_firstPowerDownCameraPowerGestureOnInteractive() local
181 boolean intercepted = mGestureLauncherService.interceptPowerKeyDown(keyEvent, interactive, in testInterceptPowerKeyDown_firstPowerDownCameraPowerGestureOnInteractive()
196 KeyEvent keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive() local
200 boolean intercepted = mGestureLauncherService.interceptPowerKeyDown(keyEvent, interactive, in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive()
207 keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive()
210 intercepted = mGestureLauncherService.interceptPowerKeyDown(keyEvent, interactive, in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive()
240 KeyEvent keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive() local
244 boolean intercepted = mGestureLauncherService.interceptPowerKeyDown(keyEvent, interactive, in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive()
251 keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive()
254 intercepted = mGestureLauncherService.interceptPowerKeyDown(keyEvent, interactive, in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive()
[all …]
/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.java609 private void dispatchVolumeKeyLongPressLocked(KeyEvent keyEvent) { in dispatchVolumeKeyLongPressLocked() argument
611 mCurrentFullUserRecord.mOnVolumeKeyLongPressListener.onVolumeKeyLongPress(keyEvent); in dispatchVolumeKeyLongPressLocked()
613 Log.w(TAG, "Failed to send " + keyEvent + " to volume key long-press listener"); in dispatchVolumeKeyLongPressLocked()
914 public void dispatchMediaKeyEvent(KeyEvent keyEvent, boolean needWakeLock) { in dispatchMediaKeyEvent() argument
915 if (keyEvent == null || !KeyEvent.isMediaKey(keyEvent.getKeyCode())) { in dispatchMediaKeyEvent()
926 + keyEvent); in dispatchMediaKeyEvent()
948 Log.d(TAG, "Send " + keyEvent + " to the media key listener"); in dispatchMediaKeyEvent()
951 mCurrentFullUserRecord.mOnMediaKeyListener.onMediaKey(keyEvent, in dispatchMediaKeyEvent()
952 new MediaKeyListenerResultReceiver(keyEvent, needWakeLock)); in dispatchMediaKeyEvent()
955 Log.w(TAG, "Failed to send " + keyEvent in dispatchMediaKeyEvent()
[all …]
/frameworks/native/libs/input/tests/
DInputPublisherAndConsumer_test.cpp102 KeyEvent* keyEvent = static_cast<KeyEvent*>(event); in PublishAndConsumeKeyEvent() local
104 EXPECT_EQ(deviceId, keyEvent->getDeviceId()); in PublishAndConsumeKeyEvent()
105 EXPECT_EQ(source, keyEvent->getSource()); in PublishAndConsumeKeyEvent()
106 EXPECT_EQ(action, keyEvent->getAction()); in PublishAndConsumeKeyEvent()
107 EXPECT_EQ(flags, keyEvent->getFlags()); in PublishAndConsumeKeyEvent()
108 EXPECT_EQ(keyCode, keyEvent->getKeyCode()); in PublishAndConsumeKeyEvent()
109 EXPECT_EQ(scanCode, keyEvent->getScanCode()); in PublishAndConsumeKeyEvent()
110 EXPECT_EQ(metaState, keyEvent->getMetaState()); in PublishAndConsumeKeyEvent()
111 EXPECT_EQ(repeatCount, keyEvent->getRepeatCount()); in PublishAndConsumeKeyEvent()
112 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.java236 boolean dispatchAction(Action action, KeyEvent keyEvent) { in dispatchAction() argument
239 boolean canPlay = keyEvent == null in dispatchAction()
240 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE in dispatchAction()
241 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY; in dispatchAction()
242 boolean canPause = keyEvent == null in dispatchAction()
243 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE in dispatchAction()
244 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PAUSE; in dispatchAction()
DPlaybackBannerControlGlue.java439 boolean dispatchAction(Action action, KeyEvent keyEvent) { in dispatchAction() argument
442 boolean canPlay = keyEvent == null in dispatchAction()
443 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE in dispatchAction()
444 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY; in dispatchAction()
445 boolean canPause = keyEvent == null in dispatchAction()
446 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE in dispatchAction()
447 || 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/
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()
DPlaybackTransportControlGlueSample.java129 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in onKey() argument
130 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in onKey()
131 Action action = getControlsRow().getActionForKeyCode(keyEvent.getKeyCode()); in onKey()
137 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()
DMediaController.java128 public boolean dispatchMediaButtonEvent(@NonNull KeyEvent keyEvent) { in dispatchMediaButtonEvent() argument
129 if (keyEvent == null) { in dispatchMediaButtonEvent()
132 if (!KeyEvent.isMediaKey(keyEvent.getKeyCode())) { in dispatchMediaButtonEvent()
136 return mSessionBinder.sendMediaButton(keyEvent); in dispatchMediaButtonEvent()
/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/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()
/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
DBackspaceTest.java61 final KeyEvent keyEvent = KeyUtils.generateKeyEvent( in backspace() local
63 mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent); in backspace() local
/frameworks/base/services/core/jni/
Dcom_android_server_input_InputManagerService.cpp247 virtual void interceptKeyBeforeQueueing(const KeyEvent* keyEvent, uint32_t& policyFlags);
251 const KeyEvent* keyEvent, uint32_t policyFlags);
253 const KeyEvent* keyEvent, uint32_t policyFlags, KeyEvent* outFallbackKeyEvent);
985 void NativeInputManager::interceptKeyBeforeQueueing(const KeyEvent* keyEvent, in interceptKeyBeforeQueueing() argument
997 nsecs_t when = keyEvent->getEventTime(); in interceptKeyBeforeQueueing()
999 jobject keyEventObj = android_view_KeyEvent_fromNative(env, keyEvent); in interceptKeyBeforeQueueing()
1069 const KeyEvent* keyEvent, uint32_t policyFlags) { in interceptKeyBeforeDispatching() argument
1081 jobject keyEventObj = android_view_KeyEvent_fromNative(env, keyEvent); in interceptKeyBeforeDispatching()
1105 const KeyEvent* keyEvent, uint32_t policyFlags, KeyEvent* outFallbackKeyEvent) { in dispatchUnhandledKey() argument
1115 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()
/frameworks/support/v17/leanback/src/android/support/v17/leanback/widget/
DPlaybackTransportRowPresenter.java280 public boolean onKey(View view, int keyCode, KeyEvent keyEvent) { in ViewHolder()
290 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in ViewHolder()
297 if (keyEvent.getAction() == KeyEvent.ACTION_DOWN) { in ViewHolder()
306 if (keyEvent.getAction() == KeyEvent.ACTION_UP) { in ViewHolder()
315 if (keyEvent.getAction() == KeyEvent.ACTION_UP) { in ViewHolder()
/frameworks/base/core/java/android/inputmethodservice/
DIInputMethodSessionWrapper.java231 KeyEvent keyEvent = (KeyEvent)event; in onInputEvent() local
232 mInputMethodSession.dispatchKeyEvent(seq, keyEvent, this); in onInputEvent()

12