diff options
author | 2014-02-20 15:35:01 +0900 | |
---|---|---|
committer | 2014-02-20 23:49:20 +0900 | |
commit | 3b4c1d30565c06a7f5a4c362002862e8bcb61f01 (patch) | |
tree | 54404c3a3b9c6cd1ea340f6739e3b7a8b4154828 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 1b3a142cace93ab22064ae5cf5f2d2ff7635ae9e (diff) | |
download | latinime-3b4c1d30565c06a7f5a4c362002862e8bcb61f01.tar.gz latinime-3b4c1d30565c06a7f5a4c362002862e8bcb61f01.tar.xz latinime-3b4c1d30565c06a7f5a4c362002862e8bcb61f01.zip |
Change a heuristic and add a log.
The heuristic in RichInputConnection makes little sense
when textLength > mExpectedSelStart but we have
more than 1024 characters of text. If there are that many,
it's about 100% sure that 1024 is not the correct cursor
position. With no good guess, we'll just continue trusting
the app, even though we know it's lying : at least it will
make the problem visible to the app author.
Also, there have been a lot of confusion about initialSelStart
and initialSelEnd. The keyboard should log them so that
it helps us and editor authors debug more easily these
common problems.
Issue #65170 in AOSP and
Bug: 12772035
Change-Id: I6665a16c9f2832d33ee323f033bb38bcc092a3b4
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 47137e7fb..16d5f5bb4 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -751,6 +751,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen + ", word caps = " + ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_WORDS) != 0)); } + Log.i(TAG, "Starting input. Cursor position = " + + editorInfo.initialSelStart + "," + editorInfo.initialSelEnd); if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) { final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); ResearchLogger.latinIME_onStartInputViewInternal(editorInfo, prefs); |