Skip to content
Snippets Groups Projects
Commit 296adf57 authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "Change a heuristic and add a log."

parents 1269ae31 3b4c1d30
No related branches found
No related tags found
No related merge requests found
...@@ -750,6 +750,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen ...@@ -750,6 +750,8 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
+ ", word caps = " + ", word caps = "
+ ((editorInfo.inputType & InputType.TYPE_TEXT_FLAG_CAP_WORDS) != 0)); + ((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) { if (ProductionFlag.USES_DEVELOPMENT_ONLY_DIAGNOSTICS) {
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
ResearchLogger.latinIME_onStartInputViewInternal(editorInfo, prefs); ResearchLogger.latinIME_onStartInputViewInternal(editorInfo, prefs);
......
...@@ -847,9 +847,9 @@ public final class RichInputConnection { ...@@ -847,9 +847,9 @@ public final class RichInputConnection {
mExpectedSelStart = mExpectedSelEnd = Constants.NOT_A_CURSOR_POSITION; mExpectedSelStart = mExpectedSelEnd = Constants.NOT_A_CURSOR_POSITION;
} else { } else {
final int textLength = textBeforeCursor.length(); final int textLength = textBeforeCursor.length();
if (textLength > mExpectedSelStart if (textLength < Constants.EDITOR_CONTENTS_CACHE_SIZE
|| (textLength < Constants.EDITOR_CONTENTS_CACHE_SIZE && (textLength > mExpectedSelStart
&& mExpectedSelStart < Constants.EDITOR_CONTENTS_CACHE_SIZE)) { || mExpectedSelStart < Constants.EDITOR_CONTENTS_CACHE_SIZE)) {
// It should not be possible to have only one of those variables be // It should not be possible to have only one of those variables be
// NOT_A_CURSOR_POSITION, so if they are equal, either the selection is zero-sized // NOT_A_CURSOR_POSITION, so if they are equal, either the selection is zero-sized
// (simple cursor, no selection) or there is no cursor/we don't know its pos // (simple cursor, no selection) or there is no cursor/we don't know its pos
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment