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

Commit fc8bf749 authored by Cary Clark's avatar Cary Clark
Browse files

add select text to context menu

Make select text available as an external interface
so that the browser can initiate it from a context
menu.

Interface is marked hidden pending API council approval.

companion change in packages/apps/Browser

bug:3214410
Change-Id: I7d513a38cc3a5ac9c0d1b3be39c02e0835bea90a
parent dac85cb8
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -3549,6 +3549,15 @@ public class WebView extends AbsoluteLayout
         * click action, look for a word under the  click. If one is found,
         * animate the text selection into view.
         * FIXME: no animation code yet */
        return selectText();
    }

    /**
     * Select the word at the last click point.
     *
     * @hide pending API council approval
     */
    public boolean selectText() {
        int x = viewToContentX((int) mLastTouchX + mScrollX);
        int y = viewToContentY((int) mLastTouchY + mScrollY);
        setUpSelect();