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

Commit ccf973fa authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

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
parent 983469ba
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3522,6 +3522,12 @@ public class Activity extends ContextThemeWrapper
     * Default implementation of {@link KeyEvent.Callback#onKeyLongPress(int, KeyEvent)
     * KeyEvent.Callback.onKeyLongPress()}: always returns false (doesn't handle
     * the event).
     *
     * To receive this callback, you must return true from onKeyDown for the current
     * event stream.
     *
     * @see KeyEvent.Callback#onKeyLongPress()
     * @see KeyEvent.Callback#onKeyLongPress(int, KeyEvent)
     */
    public boolean onKeyLongPress(int keyCode, KeyEvent event) {
        return false;
+1 −1

File changed.

Contains only whitespace changes.