From af5fbe70ac9eff6979f444c3d938d28a0ec76ebd Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 14 Aug 2013 17:34:25 +0900 Subject: 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 --- java/src/com/android/inputmethod/latin/LatinIME.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java') 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 -- cgit v1.2.3-83-g751a