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

Commit 899f609f authored by George Mount's avatar George Mount
Browse files

Only open CAB for long-press.

 Bug 6182286

Change-Id: I18590c457548e63cf45f5f7b626f5e8bd855f521
parent 66757217
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -7986,7 +7986,9 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
        }
        nativeSetTextSelection(mNativeClass, data.mSelectTextPtr);

        if (data.mSelectionReason == TextSelectionData.REASON_ACCESSIBILITY_INJECTOR) {
        if ((data.mSelectionReason == TextSelectionData.REASON_ACCESSIBILITY_INJECTOR)
                || (!mSelectingText
                        && data.mSelectionReason != TextSelectionData.REASON_SELECT_WORD)) {
            selectionDone();
            mShowTextSelectionExtra = true;
            invalidate();
+5 −1
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.database.Cursor;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.Region;
import android.media.MediaFile;
import android.net.ProxyProperties;
import android.net.Uri;
@@ -864,6 +863,7 @@ public final class WebViewCore {
    static class TextSelectionData {
        static final int REASON_UNKNOWN = 0;
        static final int REASON_ACCESSIBILITY_INJECTOR = 1;
        static final int REASON_SELECT_WORD = 2;
        public TextSelectionData(int start, int end, int selectTextPtr) {
            mStart = start;
            mEnd = end;
@@ -1718,12 +1718,16 @@ public final class WebViewCore {
                            break;
                        }
                        case SELECT_WORD_AT: {
                            mTextSelectionChangeReason
                                    = TextSelectionData.REASON_SELECT_WORD;
                            int x = msg.arg1;
                            int y = msg.arg2;
                            if (!nativeSelectWordAt(mNativeClass, x, y)) {
                                mWebViewClassic.mPrivateHandler.obtainMessage(WebViewClassic.SHOW_CARET_HANDLE)
                                    .sendToTarget();
                            }
                            mTextSelectionChangeReason
                                    = TextSelectionData.REASON_UNKNOWN;
                            break;
                        }
                        case SELECT_ALL: