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

Commit e5359373 authored by George Mount's avatar George Mount Committed by Android (Google) Code Review
Browse files

Merge "Support "prev" for IME input."

parents 8d4ada4c a34a5ed9
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -548,10 +548,14 @@ public final class WebViewClassic implements WebViewProvider, WebViewProvider.Sc
            if (!initData.mIsSpellCheckEnabled) {
                inputType |= InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
            }
            if (WebTextView.TEXT_AREA != type
                    && initData.mIsTextFieldNext) {
            if (WebTextView.TEXT_AREA != type) {
                if (initData.mIsTextFieldNext) {
                    imeOptions |= EditorInfo.IME_FLAG_NAVIGATE_NEXT;
                }
                if (initData.mIsTextFieldPrev) {
                    imeOptions |= EditorInfo.IME_FLAG_NAVIGATE_PREVIOUS;
                }
            }
            switch (type) {
                case WebTextView.NORMAL_TEXT_FIELD:
                    imeOptions |= EditorInfo.IME_ACTION_GO;
+7 −4
Original line number Diff line number Diff line
@@ -954,14 +954,15 @@ public final class WebViewCore {
        public TextFieldInitData(int fieldPointer,
                String text, int type, boolean isSpellCheckEnabled,
                boolean autoComplete, boolean isTextFieldNext,
                String name, String label, int maxLength,
                Rect nodeBounds, int nodeLayerId) {
                boolean isTextFieldPrev, String name, String label,
                int maxLength, Rect nodeBounds, int nodeLayerId) {
            mFieldPointer = fieldPointer;
            mText = text;
            mType = type;
            mIsAutoCompleteEnabled = autoComplete;
            mIsSpellCheckEnabled = isSpellCheckEnabled;
            mIsTextFieldNext = isTextFieldNext;
            mIsTextFieldPrev = isTextFieldPrev;
            mName = name;
            mLabel = label;
            mMaxLength = maxLength;
@@ -973,6 +974,7 @@ public final class WebViewCore {
        int mType;
        boolean mIsSpellCheckEnabled;
        boolean mIsTextFieldNext;
        boolean mIsTextFieldPrev;
        boolean mIsAutoCompleteEnabled;
        String mName;
        String mLabel;
@@ -2798,7 +2800,7 @@ public final class WebViewCore {
    // called by JNI
    private void initEditField(int pointer, String text, int inputType,
            boolean isSpellCheckEnabled, boolean isAutoCompleteEnabled,
            boolean nextFieldIsText, String name,
            boolean nextFieldIsText, boolean prevFieldIsText, String name,
            String label, int start, int end, int selectionPtr, int maxLength,
            Rect nodeRect, int nodeLayer) {
        if (mWebView == null) {
@@ -2806,7 +2808,8 @@ public final class WebViewCore {
        }
        TextFieldInitData initData = new TextFieldInitData(pointer,
                text, inputType, isSpellCheckEnabled, isAutoCompleteEnabled,
                nextFieldIsText, name, label, maxLength, nodeRect, nodeLayer);
                nextFieldIsText, prevFieldIsText, name, label, maxLength,
                nodeRect, nodeLayer);
        Message.obtain(mWebView.mPrivateHandler,
                WebViewClassic.INIT_EDIT_FIELD, initData).sendToTarget();
        Message.obtain(mWebView.mPrivateHandler,