/frameworks/base/core/tests/coretests/src/android/view/ |
D | KeyEventTest.java | 47 KeyEvent keyEvent = KeyEvent.obtain(DOWN_TIME, EVENT_TIME, ACTION, KEYCODE, REPEAT, in testObtain() local 49 assertEquals(DOWN_TIME, keyEvent.getDownTime()); in testObtain() 50 assertEquals(EVENT_TIME, keyEvent.getEventTime()); in testObtain() 51 assertEquals(ACTION, keyEvent.getAction()); in testObtain() 52 assertEquals(KEYCODE, keyEvent.getKeyCode()); in testObtain() 53 assertEquals(REPEAT, keyEvent.getRepeatCount()); in testObtain() 54 assertEquals(METASTATE, keyEvent.getMetaState()); in testObtain() 55 assertEquals(DEVICE_ID, keyEvent.getDeviceId()); in testObtain() 56 assertEquals(SCAN_CODE, keyEvent.getScanCode()); in testObtain() 57 assertEquals(FLAGS, keyEvent.getFlags()); in testObtain() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/ |
D | GestureLauncherServiceTest.java | 180 KeyEvent keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_firstPowerDownCameraPowerGestureOnInteractive() local 184 boolean intercepted = mGestureLauncherService.interceptPowerKeyDown(keyEvent, interactive, in testInterceptPowerKeyDown_firstPowerDownCameraPowerGestureOnInteractive() 199 KeyEvent keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive() local 203 boolean intercepted = mGestureLauncherService.interceptPowerKeyDown(keyEvent, interactive, in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive() 210 keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive() 213 intercepted = mGestureLauncherService.interceptPowerKeyDown(keyEvent, interactive, in testInterceptPowerKeyDown_intervalInBoundsCameraPowerGestureOffInteractive() 243 KeyEvent keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive() local 247 boolean intercepted = mGestureLauncherService.interceptPowerKeyDown(keyEvent, interactive, in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive() 254 keyEvent = new KeyEvent(IGNORED_DOWN_TIME, eventTime, IGNORED_ACTION, IGNORED_CODE, in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive() 257 intercepted = mGestureLauncherService.interceptPowerKeyDown(keyEvent, interactive, in testInterceptPowerKeyDown_intervalMidBoundsCameraPowerGestureOffInteractive() [all …]
|
/frameworks/base/media/java/android/media/session/ |
D | MediaSessionManager.java | 497 public void dispatchMediaKeyEvent(@NonNull KeyEvent keyEvent) { in dispatchMediaKeyEvent() argument 498 dispatchMediaKeyEvent(keyEvent, false); in dispatchMediaKeyEvent() 508 public void dispatchMediaKeyEvent(@NonNull KeyEvent keyEvent, boolean needWakeLock) { in dispatchMediaKeyEvent() argument 509 dispatchMediaKeyEventInternal(false, keyEvent, needWakeLock); in dispatchMediaKeyEvent() 522 public void dispatchMediaKeyEventAsSystemService(KeyEvent keyEvent) { in dispatchMediaKeyEventAsSystemService() argument 523 dispatchMediaKeyEventInternal(true, keyEvent, false); in dispatchMediaKeyEventAsSystemService() 526 private void dispatchMediaKeyEventInternal(boolean asSystemService, @NonNull KeyEvent keyEvent, in dispatchMediaKeyEventInternal() argument 529 mService.dispatchMediaKeyEvent(mContext.getPackageName(), asSystemService, keyEvent, in dispatchMediaKeyEventInternal() local 548 @NonNull KeyEvent keyEvent) { in dispatchMediaKeyEventAsSystemService() argument 552 if (keyEvent == null) { in dispatchMediaKeyEventAsSystemService() [all …]
|
D | ISessionManager.aidl | 44 void dispatchMediaKeyEvent(String packageName, boolean asSystemService, in KeyEvent keyEvent, in dispatchMediaKeyEvent() argument 47 in MediaSession.Token sessionToken, in KeyEvent keyEvent); in dispatchMediaKeyEventToSessionAsSystemService() argument 49 in KeyEvent keyEvent, int stream, boolean musicOnly); in dispatchVolumeKeyEvent() argument 51 in MediaSession.Token sessionToken, in KeyEvent keyEvent); in dispatchVolumeKeyEventToSessionAsSystemService() argument
|
D | MediaSessionLegacyHelper.java | 169 public void sendMediaButtonEvent(KeyEvent keyEvent, boolean needWakeLock) { in sendMediaButtonEvent() argument 170 if (keyEvent == null) { in sendMediaButtonEvent() 174 mSessionManager.dispatchMediaKeyEvent(keyEvent, needWakeLock); in sendMediaButtonEvent() 176 Log.d(TAG, "dispatched media key " + keyEvent); in sendMediaButtonEvent() 180 public void sendVolumeKeyEvent(KeyEvent keyEvent, int stream, boolean musicOnly) { in sendVolumeKeyEvent() argument 181 if (keyEvent == null) { in sendVolumeKeyEvent() 185 mSessionManager.dispatchVolumeKeyEvent(keyEvent, stream, musicOnly); in sendVolumeKeyEvent()
|
D | MediaController.java | 126 public boolean dispatchMediaButtonEvent(@NonNull KeyEvent keyEvent) { in dispatchMediaButtonEvent() argument 127 if (keyEvent == null) { in dispatchMediaButtonEvent() 130 if (!KeyEvent.isMediaSessionKey(keyEvent.getKeyCode())) { in dispatchMediaButtonEvent() 134 return mSessionBinder.sendMediaButton(mContext.getPackageName(), mCbStub, keyEvent); in dispatchMediaButtonEvent()
|
/frameworks/base/services/core/java/com/android/server/media/ |
D | MediaSessionService.java | 709 private void dispatchVolumeKeyLongPressLocked(KeyEvent keyEvent) { in dispatchVolumeKeyLongPressLocked() argument 714 mCurrentFullUserRecord.mOnVolumeKeyLongPressListener.onVolumeKeyLongPress(keyEvent); in dispatchVolumeKeyLongPressLocked() 716 Log.w(TAG, "Failed to send " + keyEvent + " to volume key long-press listener"); in dispatchVolumeKeyLongPressLocked() 1312 KeyEvent keyEvent, boolean needWakeLock) { in dispatchMediaKeyEvent() argument 1313 if (keyEvent == null || !KeyEvent.isMediaSessionKey(keyEvent.getKeyCode())) { in dispatchMediaKeyEvent() 1325 + keyEvent); in dispatchMediaKeyEvent() 1347 Log.d(TAG, "Send " + keyEvent + " to the media key listener"); in dispatchMediaKeyEvent() 1350 mCurrentFullUserRecord.mOnMediaKeyListener.onMediaKey(keyEvent, in dispatchMediaKeyEvent() 1352 asSystemService, keyEvent, needWakeLock)); in dispatchMediaKeyEvent() 1355 Log.w(TAG, "Failed to send " + keyEvent in dispatchMediaKeyEvent() [all …]
|
D | MediaSessionRecord.java | 995 boolean asSystemService, KeyEvent keyEvent, int sequenceId, ResultReceiver cb) { in sendMediaButton() argument 999 Process.SYSTEM_UID, createMediaButtonIntent(keyEvent), sequenceId, cb); in sendMediaButton() 1002 createMediaButtonIntent(keyEvent), sequenceId, cb); in sendMediaButton() 1013 KeyEvent keyEvent) { in sendMediaButton() argument 1017 Process.SYSTEM_UID, createMediaButtonIntent(keyEvent), 0, null); in sendMediaButton() 1020 createMediaButtonIntent(keyEvent)); in sendMediaButton() 1229 private Intent createMediaButtonIntent(KeyEvent keyEvent) { in createMediaButtonIntent() argument 1231 mediaButtonIntent.putExtra(Intent.EXTRA_KEY_EVENT, keyEvent); in createMediaButtonIntent() 1246 KeyEvent keyEvent) { in sendMediaButton() argument 1248 Binder.getCallingUid(), cb, false, keyEvent); in sendMediaButton()
|
/frameworks/native/libs/input/tests/ |
D | InputPublisherAndConsumer_test.cpp | 102 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(displayId, keyEvent->getDisplayId()); in PublishAndConsumeKeyEvent() 107 EXPECT_EQ(action, keyEvent->getAction()); in PublishAndConsumeKeyEvent() 108 EXPECT_EQ(flags, keyEvent->getFlags()); in PublishAndConsumeKeyEvent() 109 EXPECT_EQ(keyCode, keyEvent->getKeyCode()); in PublishAndConsumeKeyEvent() 110 EXPECT_EQ(scanCode, keyEvent->getScanCode()); in PublishAndConsumeKeyEvent() 111 EXPECT_EQ(metaState, keyEvent->getMetaState()); in PublishAndConsumeKeyEvent() 112 EXPECT_EQ(repeatCount, keyEvent->getRepeatCount()); in PublishAndConsumeKeyEvent() [all …]
|
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/util/ |
D | MockWindow.java | 97 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/native/services/inputflinger/dispatcher/include/ |
D | InputDispatcherPolicyInterface.h | 74 virtual void interceptKeyBeforeQueueing(const KeyEvent* keyEvent, uint32_t& policyFlags) = 0; 88 const KeyEvent* keyEvent, 93 virtual bool dispatchUnhandledKey(const sp<IBinder>& token, const KeyEvent* keyEvent,
|
/frameworks/base/apct-tests/perftests/core/src/android/widget/ |
D | EditTextLongTextPerfTest.java | 105 final KeyEvent keyEvent = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_ENTER); in testEditText() local 112 editText.onKeyDown(keyEvent.getKeyCode(), keyEvent); in testEditText() local
|
/frameworks/base/core/java/com/android/internal/policy/ |
D | PhoneFallbackEventHandler.java | 331 private void handleVolumeKeyEvent(KeyEvent keyEvent) { in handleVolumeKeyEvent() argument 332 getMediaSessionManager().dispatchVolumeKeyEventAsSystemService(keyEvent, in handleVolumeKeyEvent() 336 private void handleMediaKeyEvent(KeyEvent keyEvent) { in handleMediaKeyEvent() argument 337 getMediaSessionManager().dispatchMediaKeyEventAsSystemService(keyEvent); in handleMediaKeyEvent()
|
/frameworks/base/core/java/android/view/ |
D | InputEventConsistencyVerifier.java | 177 final KeyEvent keyEvent = (KeyEvent)event; in onInputEvent() local 178 onKeyEvent(keyEvent, nestingLevel); in onInputEvent() 597 final KeyEvent keyEvent = (KeyEvent)event; in onUnhandledEvent() local 598 final int deviceId = keyEvent.getDeviceId(); in onUnhandledEvent() 599 final int source = keyEvent.getSource(); in onUnhandledEvent() 600 final int keyCode = keyEvent.getKeyCode(); in onUnhandledEvent()
|
/frameworks/base/core/tests/coretests/src/android/text/method/ |
D | ForwardDeleteTest.java | 64 final KeyEvent keyEvent = KeyUtils.generateKeyEvent( in forwardDelete() local 66 mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent); in forwardDelete() local
|
D | BackspaceTest.java | 66 final KeyEvent keyEvent = KeyUtils.generateKeyEvent( in backspace() local 68 mTextView.onKeyDown(keyEvent.getKeyCode(), keyEvent); in backspace() local
|
/frameworks/base/media/java/android/media/ |
D | RemoteController.java | 250 public boolean sendMediaKeyEvent(KeyEvent keyEvent) throws IllegalArgumentException { in sendMediaKeyEvent() argument 251 if (!KeyEvent.isMediaSessionKey(keyEvent.getKeyCode())) { in sendMediaKeyEvent() 256 return mCurrentSession.dispatchMediaButtonEvent(keyEvent); in sendMediaKeyEvent()
|
/frameworks/base/services/core/jni/ |
D | com_android_server_input_InputManagerService.cpp | 257 virtual void interceptKeyBeforeQueueing(const KeyEvent* keyEvent, uint32_t& policyFlags); 262 const KeyEvent* keyEvent, uint32_t policyFlags); 264 const KeyEvent* keyEvent, uint32_t policyFlags, KeyEvent* outFallbackKeyEvent); 1024 void NativeInputManager::interceptKeyBeforeQueueing(const KeyEvent* keyEvent, in interceptKeyBeforeQueueing() argument 1036 nsecs_t when = keyEvent->getEventTime(); in interceptKeyBeforeQueueing() 1038 jobject keyEventObj = android_view_KeyEvent_fromNative(env, keyEvent); in interceptKeyBeforeQueueing() 1109 const KeyEvent* keyEvent, uint32_t policyFlags) { in interceptKeyBeforeDispatching() argument 1123 jobject keyEventObj = android_view_KeyEvent_fromNative(env, keyEvent); in interceptKeyBeforeDispatching() 1146 const KeyEvent* keyEvent, uint32_t policyFlags, KeyEvent* outFallbackKeyEvent) { in dispatchUnhandledKey() argument 1157 jobject keyEventObj = android_view_KeyEvent_fromNative(env, keyEvent); in dispatchUnhandledKey() [all …]
|
/frameworks/base/core/java/android/inputmethodservice/ |
D | IInputMethodSessionWrapper.java | 234 KeyEvent keyEvent = (KeyEvent)event; in onInputEvent() local 235 mInputMethodSession.dispatchKeyEvent(seq, keyEvent, this); in onInputEvent()
|
/frameworks/native/services/inputflinger/dispatcher/ |
D | InputDispatcher.cpp | 2856 KeyEvent keyEvent; in injectInputEvent() local 2857 keyEvent.initialize(*static_cast<const KeyEvent*>(event)); in injectInputEvent() 2858 int32_t action = keyEvent.getAction(); in injectInputEvent() 2863 int32_t flags = keyEvent.getFlags(); in injectInputEvent() 2864 int32_t keyCode = keyEvent.getKeyCode(); in injectInputEvent() 2865 int32_t metaState = keyEvent.getMetaState(); in injectInputEvent() 2866 accelerateMetaShortcuts(keyEvent.getDeviceId(), action, in injectInputEvent() 2868 keyEvent.initialize(keyEvent.getDeviceId(), keyEvent.getSource(), in injectInputEvent() 2869 keyEvent.getDisplayId(), action, flags, keyCode, in injectInputEvent() 2870 keyEvent.getScanCode(), metaState, keyEvent.getRepeatCount(), in injectInputEvent() [all …]
|
/frameworks/base/core/jni/ |
D | android_view_InputQueue.cpp | 117 KeyEvent* keyEvent = static_cast<KeyEvent*>(e); in preDispatchEvent() local 118 if (keyEvent->getFlags() & AKEY_EVENT_FLAG_PREDISPATCH) { in preDispatchEvent()
|
/frameworks/base/core/java/android/view/autofill/ |
D | IAutoFillManagerClient.aidl | 84 void dispatchUnhandledKey(int sessionId, in AutofillId id, in KeyEvent keyEvent); in dispatchUnhandledKey() argument
|
/frameworks/base/services/autofill/java/com/android/server/autofill/ui/ |
D | AutoFillUI.java | 86 void dispatchUnhandledKey(AutofillId id, KeyEvent keyEvent); in dispatchUnhandledKey() argument 261 public void dispatchUnhandledKey(KeyEvent keyEvent) { in showFillUi() 263 mCallback.dispatchUnhandledKey(focusedId, keyEvent); in showFillUi()
|
/frameworks/base/packages/SystemUI/src/com/android/keyguard/ |
D | KeyguardHostView.java | 400 private void handleMediaKeyEvent(KeyEvent keyEvent) { in handleMediaKeyEvent() argument 407 mAudioManager.dispatchMediaKeyEvent(keyEvent); in handleMediaKeyEvent()
|
/frameworks/base/media/java/android/media/tv/ |
D | TvInputService.java | 1416 KeyEvent keyEvent = (KeyEvent) event; 1417 if (keyEvent.dispatch(this, mDispatcherState, this)) { 1420 isNavigationKey = isNavigationKey(keyEvent.getKeyCode()); 1425 skipDispatchToOverlayView = KeyEvent.isMediaSessionKey(keyEvent.getKeyCode()) 1426 || keyEvent.getKeyCode() == KeyEvent.KEYCODE_MEDIA_AUDIO_TRACK;
|