diff options
Diffstat (limited to 'java/src')
-rw-r--r-- | java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 2 | ||||
-rw-r--r-- | java/src/com/android/inputmethod/latin/utils/StringUtils.java | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index 05f9aa884..6e9bdc34a 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -1702,7 +1702,7 @@ public final class InputLogic { final LatinIME.UIHandler handler) { if (!mConnection.resetCachesUponCursorMoveAndReturnSuccess( mConnection.getExpectedSelectionStart(), mConnection.getExpectedSelectionEnd(), - false)) { + false /* shouldFinishComposition */)) { if (0 < remainingTries) { handler.postResetCaches(tryResumeSuggestions, remainingTries - 1); return false; diff --git a/java/src/com/android/inputmethod/latin/utils/StringUtils.java b/java/src/com/android/inputmethod/latin/utils/StringUtils.java index 8fc245d9b..6f15b11bf 100644 --- a/java/src/com/android/inputmethod/latin/utils/StringUtils.java +++ b/java/src/com/android/inputmethod/latin/utils/StringUtils.java @@ -174,6 +174,13 @@ public final class StringUtils { return toCodePointArray(string, 0, string.length()); } + /** + * Converts a range of a string to an array of code points. + * @param string the source string. + * @param startIndex the start index inside the string in java chars, inclusive. + * @param endIndex the end index inside the string in java chars, exclusive. + * @return a new array of code points. At most endIndex - startIndex, but possibly less. + */ public static int[] toCodePointArray(final String string, final int startIndex, final int endIndex) { final int length = string.length(); |