aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2014-07-21 18:37:30 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-21 18:37:30 +0000
commitec626d4bfed1a06c54639d700dd21a1d837caecb (patch)
treed1dcdca0f298d4bbbb6335caa021388a661e5f80 /java/src/com/android/inputmethod/latin/LatinIME.java
parentd8f522b6cef0bb1c2f848756d84436e307059d53 (diff)
parente2ceff04582791af2d25facfa5124b44ea95de3b (diff)
downloadlatinime-ec626d4bfed1a06c54639d700dd21a1d837caecb.tar.gz
latinime-ec626d4bfed1a06c54639d700dd21a1d837caecb.tar.xz
latinime-ec626d4bfed1a06c54639d700dd21a1d837caecb.zip
am e2ceff04: am 3f513f10: Enable InputMethodService#onUpdateCursor behind the flag
* commit 'e2ceff04582791af2d25facfa5124b44ea95de3b': Enable InputMethodService#onUpdateCursor behind the flag
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index dd0060f4a..b641f3a8b 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -55,6 +55,7 @@ import android.view.inputmethod.InputMethodSubtype;
import com.android.inputmethod.accessibility.AccessibilityUtils;
import com.android.inputmethod.annotations.UsedForTesting;
+import com.android.inputmethod.compat.InputConnectionCompatUtils;
import com.android.inputmethod.compat.InputMethodServiceCompatUtils;
import com.android.inputmethod.dictionarypack.DictionaryPackConstants;
import com.android.inputmethod.event.Event;
@@ -413,11 +414,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (latinIme != null) {
executePendingImsCallback(latinIme, editorInfo, restarting);
latinIme.onStartInputInternal(editorInfo, restarting);
- if (ProductionFlags.USES_CURSOR_ANCHOR_MONITOR) {
- // Currently we need to call this every time when the IME is attached to
- // new application.
- // TODO: Consider if we can do this automatically in the framework.
- InputMethodServiceCompatUtils.setCursorAnchorMonitorMode(latinIme, 1);
+ if (ProductionFlags.ENABLE_CURSOR_RECT_CALLBACK) {
+ InputConnectionCompatUtils.requestCursorRect(
+ latinIme.getCurrentInputConnection(), true /* enableMonitor */);
+ }
+ if (ProductionFlags.ENABLE_CURSOR_ANCHOR_INFO_CALLBACK) {
+ InputConnectionCompatUtils.requestCursorAnchorInfo(
+ latinIme.getCurrentInputConnection(), true /* enableMonitor */,
+ true /* requestImmediateCallback */);
}
}
}