aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-08-14 17:34:25 +0900
committerJean Chalard <jchalard@google.com>2013-08-14 18:39:28 +0900
commitaf5fbe70ac9eff6979f444c3d938d28a0ec76ebd (patch)
tree522c22e24de2bd9612f2ece198fb93afa93907cc /java/src/com/android/inputmethod/latin/LatinIME.java
parent1162c0537d48fcec6dd5dc02594a16d24b4d1008 (diff)
downloadlatinime-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.java7
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