am 2834ddf1
: am b9768702
: Merge "Use #onStartInputInternal to initialize cursor rect retrieval" into lmp-dev
* commit '2834ddf1a0c9bea38569429f90bdf7526ba8fa22': Use #onStartInputInternal to initialize cursor rect retrieval
This commit is contained in:
commit
b8337e7232
1 changed files with 12 additions and 12 deletions
|
@ -420,18 +420,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
if (latinIme != null) {
|
if (latinIme != null) {
|
||||||
executePendingImsCallback(latinIme, editorInfo, restarting);
|
executePendingImsCallback(latinIme, editorInfo, restarting);
|
||||||
latinIme.onStartInputInternal(editorInfo, restarting);
|
latinIme.onStartInputInternal(editorInfo, restarting);
|
||||||
if (ProductionFlags.ENABLE_CURSOR_RECT_CALLBACK) {
|
|
||||||
InputConnectionCompatUtils.requestCursorRect(
|
|
||||||
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 */);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -766,6 +754,18 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
private void onStartInputInternal(final EditorInfo editorInfo, final boolean restarting) {
|
private void onStartInputInternal(final EditorInfo editorInfo, final boolean restarting) {
|
||||||
super.onStartInput(editorInfo, restarting);
|
super.onStartInput(editorInfo, restarting);
|
||||||
|
if (ProductionFlags.ENABLE_CURSOR_RECT_CALLBACK) {
|
||||||
|
InputConnectionCompatUtils.requestCursorRect(getCurrentInputConnection(),
|
||||||
|
true /* enableMonitor */);
|
||||||
|
}
|
||||||
|
if (ProductionFlags.ENABLE_CURSOR_ANCHOR_INFO_CALLBACK) {
|
||||||
|
// AcceptTypedWord feature relies on CursorAnchorInfo.
|
||||||
|
if (mSettings.getCurrent().mShouldShowUiToAcceptTypedWord) {
|
||||||
|
InputConnectionCompatUtils.requestCursorAnchorInfo(
|
||||||
|
getCurrentInputConnection(), true /* enableMonitor */,
|
||||||
|
true /* requestImmediateCallback */);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
|
|
Loading…
Reference in a new issue