From ccf973fa9f22dbafe7e98952773ec2dc2b3e90a5 Mon Sep 17 00:00:00 2001 From: Siarhei Vishniakou Date: Tue, 30 Oct 2018 14:04:57 -0700 Subject: Inject long press documentation Clarify usage of Activity.onKeyLongPress(..). It is not obvious at all that onKeyDown should be used in order for OnKeyLongPress to work. Direct readers to the other api to make sure that this nuance is not missed. Bug: 21451760 Test: atest KeyEventInjectionTest Change-Id: Ic73f6fe06b2108a3967ac590d22acfb283a700e1 --- cmds/input/src/com/android/commands/input/Input.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/input/src') diff --git a/cmds/input/src/com/android/commands/input/Input.java b/cmds/input/src/com/android/commands/input/Input.java index 0c861cfd3e63..a0777459311b 100644 --- a/cmds/input/src/com/android/commands/input/Input.java +++ b/cmds/input/src/com/android/commands/input/Input.java @@ -196,7 +196,7 @@ public class Input extends BaseCommand { int repeatCount = 0; KeyEvent event = new KeyEvent(now, now, KeyEvent.ACTION_DOWN, keyCode, repeatCount, - 0 /*metaState*/, KeyCharacterMap.VIRTUAL_KEYBOARD, 0 /*scancode*/, 0/*flags*/, + 0 /*metaState*/, KeyCharacterMap.VIRTUAL_KEYBOARD, 0 /*scancode*/, 0 /*flags*/, inputSource); event.setDisplayId(displayId); -- cgit v1.2.3-59-g8ed1b