commit | 3d36cdcd2d4a4cfb6fab6d89f1a6fcc62dfce6e6 | [log] [tgz] |
---|---|---|
author | Jean Chalard <jchalard@google.com> | Thu Oct 06 03:44:24 2011 -0700 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Thu Oct 06 03:44:24 2011 -0700 |
tree | f017eb663ca776ed85504ed723753cce8baa6848 | |
parent | c53661f152f2d676f8cec656cbdd93adfa7fc908 [diff] | |
parent | 51075d145a85d1acaff08c02f4d6b10b175eaa36 [diff] |
Merge "Fix possible NPE in debug mode"
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java index 04d68e1..4d569b8 100644 --- a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java +++ b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
@@ -156,6 +156,11 @@ // } return true; } + if (insertIndex >= mMaxLength) { + // We found a suggestion, but its score is too weak to be kept considering + // the suggestion limit. + return true; + } // Compute the normalized score and skip this word if it's normalized score does not // make the threshold.