diff options
| author | Ben Murdoch <benm@google.com> | 2011-08-12 11:50:41 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-08-12 11:50:41 -0700 |
| commit | d67fee861baf623a62ea61e3331230b2811f00b4 (patch) | |
| tree | 6c1630fadcbe03ad2b97f127c67b568880052521 | |
| parent | b8e9b810a863c504cd63cbb132f743f5e66c8595 (diff) | |
| parent | adf096c85259af2f7e8b42766989d1e195c00831 (diff) | |
| download | frameworks_base-d67fee861baf623a62ea61e3331230b2811f00b4.zip frameworks_base-d67fee861baf623a62ea61e3331230b2811f00b4.tar.gz frameworks_base-d67fee861baf623a62ea61e3331230b2811f00b4.tar.bz2 | |
Merge "Increase WebView.TAP_TIMEOUT to 300ms to account for trackpad taps."
| -rw-r--r-- | core/java/android/webkit/WebView.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 7620a63..2bb9da1 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -537,7 +537,10 @@ public class WebView extends AbsoluteLayout // This should be ViewConfiguration.getTapTimeout() // But system time out is 100ms, which is too short for the browser. // In the browser, if it switches out of tap too soon, jump tap won't work. - private static final int TAP_TIMEOUT = 200; + // In addition, a double tap on a trackpad will always have a duration of + // 300ms, so this value must be at least that (otherwise we will timeout the + // first tap and convert it to a long press). + private static final int TAP_TIMEOUT = 300; // This should be ViewConfiguration.getLongPressTimeout() // But system time out is 500ms, which is too short for the browser. // With a short timeout, it's difficult to treat trigger a short press. |
