aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
diff options
context:
space:
mode:
authorsatok <satok@google.com>2011-01-14 13:45:21 +0900
committersatok <satok@google.com>2011-01-14 13:45:21 +0900
commite5585c1854f5faa3fbe3a998295c8dfdb28ed0c5 (patch)
treec2851f818c57bee621f519fe2d77fc2a4793f66f /java/src/com/android/inputmethod/latin/ExpandableDictionary.java
parent93e4b45f6e5cc6fc5ea588e67a6c546378de5f6f (diff)
parent3481a5252d0b55e163ef353cb11d3cae6d093b04 (diff)
downloadlatinime-e5585c1854f5faa3fbe3a998295c8dfdb28ed0c5.tar.gz
latinime-e5585c1854f5faa3fbe3a998295c8dfdb28ed0c5.tar.xz
latinime-e5585c1854f5faa3fbe3a998295c8dfdb28ed0c5.zip
Merge remote branch 'goog/master' into merge
Conflicts: java/src/com/android/inputmethod/latin/BinaryDictionary.java java/src/com/android/inputmethod/latin/SubtypeSwitcher.java Change-Id: Ib2b4acc9dd570d5f37b6aa455e2f07b0a884944a
Diffstat (limited to 'java/src/com/android/inputmethod/latin/ExpandableDictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/ExpandableDictionary.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
index bc08df042..0fc86c335 100644
--- a/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
+++ b/java/src/com/android/inputmethod/latin/ExpandableDictionary.java
@@ -146,7 +146,7 @@ public class ExpandableDictionary extends Dictionary {
public Context getContext() {
return mContext;
}
-
+
public int getMaxWordLength() {
return MAX_WORD_LENGTH;
}
@@ -158,6 +158,7 @@ public class ExpandableDictionary extends Dictionary {
private void addWordRec(NodeArray children, final String word, final int depth,
final int frequency, Node parentNode) {
final int wordLength = word.length();
+ if (wordLength <= depth) return;
final char c = word.charAt(depth);
// Does children have the current character?
final int childrenLength = children.mLength;