Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38e6aa36 authored by The Android Open Source Project's avatar The Android Open Source Project Committed by Android Git Automerger
Browse files

am 9a069c80: am 63ece47f: am 2a9ae01f: merge from open-source master

parents dff3d166 9a069c80
Loading
Loading
Loading
Loading
+26 −9
Original line number Diff line number Diff line
@@ -6528,18 +6528,30 @@ public class WindowManagerService extends IWindowManager.Stub
                            case RawInputEvent.CLASS_KEYBOARD:
                                KeyEvent ke = (KeyEvent)ev.event;
                                if (ke.isDown()) {
                                    lastKey = ke;
                                    lastKeyTime = curTime;
                                    if (lastKey != null &&
                                            ke.getKeyCode() == lastKey.getKeyCode()) {
                                        keyRepeatCount++;
                                        // Arbitrary long timeout to block
                                        // repeating here since we know that
                                        // the device driver takes care of it.
                                        nextKeyTime = lastKeyTime + LONG_WAIT;
                                        if (DEBUG_INPUT) Slog.v(
                                                TAG, "Received repeated key down");
                                    } else {
                                        downTime = curTime;
                                        keyRepeatCount = 0;
                                    lastKeyTime = curTime;
                                        nextKeyTime = lastKeyTime
                                                + ViewConfiguration.getLongPressTimeout();
                                        if (DEBUG_INPUT) Slog.v(
                                            TAG, "Received key down: first repeat @ "
                                            + nextKeyTime);
                                    }
                                    lastKey = ke;
                                } else {
                                    lastKey = null;
                                    downTime = 0;
                                    keyRepeatCount = 0;
                                    // Arbitrary long timeout.
                                    lastKeyTime = curTime;
                                    nextKeyTime = curTime + LONG_WAIT;
@@ -6547,7 +6559,12 @@ public class WindowManagerService extends IWindowManager.Stub
                                        TAG, "Received key up: ignore repeat @ "
                                        + nextKeyTime);
                                }
                                dispatchKey((KeyEvent)ev.event, 0, 0);
                                if (keyRepeatCount > 0) {
                                    dispatchKey(KeyEvent.changeTimeRepeat(ke,
                                            ke.getEventTime(), keyRepeatCount), 0, 0);
                                } else {
                                    dispatchKey(ke, 0, 0);
                                }
                                mQueue.recycleEvent(ev);
                                break;
                            case RawInputEvent.CLASS_TOUCHSCREEN: