diff options
author | 2013-08-14 17:34:25 +0900 | |
---|---|---|
committer | 2013-08-14 18:39:28 +0900 | |
commit | af5fbe70ac9eff6979f444c3d938d28a0ec76ebd (patch) | |
tree | 522c22e24de2bd9612f2ece198fb93afa93907cc /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | 1162c0537d48fcec6dd5dc02594a16d24b4d1008 (diff) | |
download | latinime-af5fbe70ac9eff6979f444c3d938d28a0ec76ebd.tar.gz latinime-af5fbe70ac9eff6979f444c3d938d28a0ec76ebd.tar.xz latinime-af5fbe70ac9eff6979f444c3d938d28a0ec76ebd.zip |
Add looksValidForDictionaryInsertion
...and test it.
Also at the same time, add a facility to create a SettingsValues for
test, and some minor performance improvement to surrounding
methods.
Change-Id: I13b629ae14755c244af2a9406a7e9b4a4a16090f
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 20dc9ba53..d590d6685 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1355,10 +1355,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen } } - private static boolean isAlphabet(final int code) { - return Character.isLetter(code); - } - private void onSettingsKeyPressed() { if (isShowingOptionDialog()) return; showSubtypeSelectorAndSettings(); @@ -1989,8 +1985,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen // NOTE: isCursorTouchingWord() is a blocking IPC call, so it often takes several // dozen milliseconds. Avoid calling it as much as possible, since we are on the UI // thread here. - if (!isComposingWord && (isAlphabet(primaryCode) - || currentSettings.isWordConnector(primaryCode)) + if (!isComposingWord && currentSettings.isWordCodePoint(primaryCode) && currentSettings.isSuggestionsRequested(mDisplayOrientation) && !mConnection.isCursorTouchingWord(currentSettings)) { // Reset entirely the composing state anyway, then start composing a new word unless |