summaryrefslogtreecommitdiff
path: root/core/java/android/view/ViewConfiguration.java
diff options
context:
space:
mode:
authorPhilip Junker <philipjunker@google.com>2021-08-05 18:01:06 +0200
committerPhilip Junker <philipjunker@google.com>2021-08-09 16:42:24 +0200
commit2dd95b3f41f5be32fdb463c304bd65e120d92322 (patch)
tree45736219d13bb64b40e2ee4f1d5794c0df7bf572 /core/java/android/view/ViewConfiguration.java
parent764792b6cbee2df746805f025e33dbf6a1326483 (diff)
Make sure adb shell input keyevent --longpress KEYCODE_DPAD_CENTER triggers View#performLongClick(...)
KeyEvent#ACTION_UP removes the CheckForLongPress callback that triggers View#performLongClick(...) after the longpress timeout. By adding a delay in case of a long press, the View#CheckForLongPress callback runs as expected and the long press is triggered. Bug: 194799728 Test: manual; build ohm_gtv-userdebug and flash it; navigate to movie / app on main view of LauncherX; adb shell input keyevent --longpress KEYCODE_DPAD_CENTER; verify that longpress menu opens; adb shell input keyevent KEYCODE_DPAD_CENTER; verify that entity page opens Change-Id: Iae08a6c3b2c52888eae63c91a609f4aff06d2297
Diffstat (limited to 'core/java/android/view/ViewConfiguration.java')
-rw-r--r--core/java/android/view/ViewConfiguration.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java
index 0a3d0da6da1e..495edab57abd 100644
--- a/core/java/android/view/ViewConfiguration.java
+++ b/core/java/android/view/ViewConfiguration.java
@@ -600,6 +600,8 @@ public class ViewConfiguration {
}
/**
+ * Used for both key and motion events.
+ *
* @return the duration in milliseconds before a press turns into
* a long press
*/