diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-10-12 13:57:59 -0700 |
---|---|---|
committer | Winson Chung <winsonc@google.com> | 2011-10-12 15:05:59 -0700 |
commit | d5bb82d18cbd95bb9e751d8315b9ed0b69595033 (patch) | |
tree | 697ff41b80db12758a412c3555677d0d347aa2f0 /services/java | |
parent | 99b70f3f5d051261229d1792c169a374fc23326b (diff) | |
download | frameworks_base-d5bb82d18cbd95bb9e751d8315b9ed0b69595033.zip frameworks_base-d5bb82d18cbd95bb9e751d8315b9ed0b69595033.tar.gz frameworks_base-d5bb82d18cbd95bb9e751d8315b9ed0b69595033.tar.bz2 |
DO NOT MERGE. Improve screenshot chord debouncing.
Bug: 5011907
Introduce a 150ms delay in handling volume down keys
while waiting to see if a power key will follow.
Don't trigger the screenshot chord if both volume up and
volume down are pressed together.
Don't trigger the long-press power menu if volume keys are
also pressed.
Require the user to press both keys in the chord within
the debounce time and continue long-pressing them in order
to trigger the screenshot action.
Change-Id: I248968d37b73c09d6d08e7f62667c443eba32da0
Diffstat (limited to 'services/java')
-rw-r--r-- | services/java/com/android/server/wm/InputManager.java | 2 | ||||
-rw-r--r-- | services/java/com/android/server/wm/InputMonitor.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/services/java/com/android/server/wm/InputManager.java b/services/java/com/android/server/wm/InputManager.java index 60333a3..df7e0e1 100644 --- a/services/java/com/android/server/wm/InputManager.java +++ b/services/java/com/android/server/wm/InputManager.java @@ -575,7 +575,7 @@ public class InputManager implements Watchdog.Monitor { } @SuppressWarnings("unused") - public boolean interceptKeyBeforeDispatching(InputWindowHandle focus, + public long interceptKeyBeforeDispatching(InputWindowHandle focus, KeyEvent event, int policyFlags) { return mWindowManagerService.mInputMonitor.interceptKeyBeforeDispatching( focus, event, policyFlags); diff --git a/services/java/com/android/server/wm/InputMonitor.java b/services/java/com/android/server/wm/InputMonitor.java index 9a559e0..fb74d27 100644 --- a/services/java/com/android/server/wm/InputMonitor.java +++ b/services/java/com/android/server/wm/InputMonitor.java @@ -288,7 +288,7 @@ final class InputMonitor { /* Provides an opportunity for the window manager policy to process a key before * ordinary dispatch. */ - public boolean interceptKeyBeforeDispatching( + public long interceptKeyBeforeDispatching( InputWindowHandle focus, KeyEvent event, int policyFlags) { WindowState windowState = focus != null ? (WindowState) focus.windowState : null; return mService.mPolicy.interceptKeyBeforeDispatching(windowState, event, policyFlags); |