am d9a8e1cc: Enable CursorAnchorInfo callback when necessary

* commit 'd9a8e1ccfd8196adf536e9622c72c1933ebf9a74':
  Enable CursorAnchorInfo callback when necessary
main
Yohei Yukawa 2014-08-13 11:33:28 +00:00 committed by Android Git Automerger
commit 4a2dbd87c4
2 changed files with 7 additions and 4 deletions

View File

@ -424,9 +424,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
latinIme.getCurrentInputConnection(), true /* enableMonitor */);
}
if (ProductionFlags.ENABLE_CURSOR_ANCHOR_INFO_CALLBACK) {
InputConnectionCompatUtils.requestCursorAnchorInfo(
latinIme.getCurrentInputConnection(), true /* enableMonitor */,
true /* requestImmediateCallback */);
// AcceptTypedWord feature relies on CursorAnchorInfo.
if (latinIme.mSettings.getCurrent().mShouldShowUiToAcceptTypedWord) {
InputConnectionCompatUtils.requestCursorAnchorInfo(
latinIme.getCurrentInputConnection(), true /* enableMonitor */,
true /* requestImmediateCallback */);
}
}
}
}

View File

@ -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