Fix a possible OutOfBoundsException

Change-Id: I6eb13c228738119c78496a96acaedbccefd83cd3
diff --git a/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java b/java/src/com/android/inputmethod/latin/spellcheck/AndroidSpellCheckerService.java
index b197c5b..86d7865 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.