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

Commit 4a2dbd87 authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android Git Automerger
Browse files

am d9a8e1cc: Enable CursorAnchorInfo callback when necessary

* commit 'd9a8e1cc':
  Enable CursorAnchorInfo callback when necessary
parents 3a346bf5 d9a8e1cc
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -424,6 +424,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
                                latinIme.getCurrentInputConnection(), true /* enableMonitor */);
                    }
                    if (ProductionFlags.ENABLE_CURSOR_ANCHOR_INFO_CALLBACK) {
                        // AcceptTypedWord feature relies on CursorAnchorInfo.
                        if (latinIme.mSettings.getCurrent().mShouldShowUiToAcceptTypedWord) {
                            InputConnectionCompatUtils.requestCursorAnchorInfo(
                                    latinIme.getCurrentInputConnection(), true /* enableMonitor */,
                                    true /* requestImmediateCallback */);
@@ -431,6 +433,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
                    }
                }
            }
        }

        public void onStartInputView(final EditorInfo editorInfo, final boolean restarting) {
            if (hasMessages(MSG_PENDING_IMS_CALLBACK)
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ public final class ProductionFlags {
     *  and prior. In general, this callback provides more detailed positional information,
     *  even though an explicit support is required by the editor.
     */
    public static final boolean ENABLE_CURSOR_ANCHOR_INFO_CALLBACK = false;
    public static final boolean ENABLE_CURSOR_ANCHOR_INFO_CALLBACK = true;

    /**
     * When true, enable {@link InputMethodService#onUpdateCursor} callback via