Skip to content
Snippets Groups Projects
Commit 85ce863d authored by Yohei Yukawa's avatar Yohei Yukawa Committed by Android Git Automerger
Browse files

am 4a2dbd87: am d9a8e1cc: Enable CursorAnchorInfo callback when necessary

* commit '4a2dbd87':
  Enable CursorAnchorInfo callback when necessary
parents bec6c6e3 4a2dbd87
No related branches found
No related tags found
No related merge requests found
...@@ -424,9 +424,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen ...@@ -424,9 +424,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
latinIme.getCurrentInputConnection(), true /* enableMonitor */); latinIme.getCurrentInputConnection(), true /* enableMonitor */);
} }
if (ProductionFlags.ENABLE_CURSOR_ANCHOR_INFO_CALLBACK) { if (ProductionFlags.ENABLE_CURSOR_ANCHOR_INFO_CALLBACK) {
InputConnectionCompatUtils.requestCursorAnchorInfo( // AcceptTypedWord feature relies on CursorAnchorInfo.
latinIme.getCurrentInputConnection(), true /* enableMonitor */, if (latinIme.mSettings.getCurrent().mShouldShowUiToAcceptTypedWord) {
true /* requestImmediateCallback */); InputConnectionCompatUtils.requestCursorAnchorInfo(
latinIme.getCurrentInputConnection(), true /* enableMonitor */,
true /* requestImmediateCallback */);
}
} }
} }
} }
......
...@@ -29,7 +29,7 @@ public final class ProductionFlags { ...@@ -29,7 +29,7 @@ public final class ProductionFlags {
* and prior. In general, this callback provides more detailed positional information, * and prior. In general, this callback provides more detailed positional information,
* even though an explicit support is required by the editor. * 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 * When true, enable {@link InputMethodService#onUpdateCursor} callback via
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment