aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2014-04-11 10:41:12 +0900
committerYohei Yukawa <yukawa@google.com>2014-04-11 12:26:33 +0900
commitfab4ce43f8e68bba7645e6fb71ed7cd300b68119 (patch)
tree3710414fe71f593ff6a4bdd3129a9f0df24fbe65 /java/src/com/android/inputmethod/latin
parenta4ac18551f6bf6ca7ee84139e8cea3656a4a8b86 (diff)
downloadlatinime-fab4ce43f8e68bba7645e6fb71ed7cd300b68119.tar.gz
latinime-fab4ce43f8e68bba7645e6fb71ed7cd300b68119.tar.xz
latinime-fab4ce43f8e68bba7645e6fb71ed7cd300b68119.zip
Plumbing for ProductionFlag.USES_CURSOR_ANCHOR_MONITOR
With this CL, LatinIME starts calling InputMethodService#setCursorAnchorMonitorMode in #onStartInput() when ProductionFlag.USES_CURSOR_ANCHOR_MONITOR flag is explicitly set to true. BUG: 13891796 Change-Id: Ib2fb0c3521b61859d4cc530155ccaaee7ee16cbc
Diffstat (limited to 'java/src/com/android/inputmethod/latin')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 6d36af77a..2cfecd740 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -366,6 +366,12 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
if (latinIme != null) {
executePendingImsCallback(latinIme, editorInfo, restarting);
latinIme.onStartInputInternal(editorInfo, restarting);
+ if (ProductionFlag.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);
+ }
}
}
}
@@ -923,6 +929,14 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
mSubtypeState.currentSubtypeUsed();
}
+ @Override
+ public void onUpdateCursor(Rect rect) {
+ if (DEBUG) {
+ Log.i(TAG, "onUpdateCursor:" + rect.toShortString());
+ }
+ super.onUpdateCursor(rect);
+ }
+
/**
* This is called when the user has clicked on the extracted text view,
* when running in fullscreen mode. The default implementation hides