From 6780b898ec2647a21319601a03ae1c393c0e1b29 Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Wed, 17 Mar 2010 21:37:25 -0700 Subject: [PATCH] Fix a StringIndexOutOfBounds. Bug: 2524050 --- java/src/com/android/inputmethod/latin/LatinIME.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 70d49f564..dc6be4346 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -1468,7 +1468,7 @@ public class LatinIME extends InputMethodService mHandler.removeMessages(MSG_UPDATE_SUGGESTIONS); updateSuggestions(); } - if (mBestWord != null) { + if (mBestWord != null && mBestWord.length() > 0) { TextEntryState.acceptedDefault(mWord.getTypedWord(), mBestWord); mJustAccepted = true; pickSuggestion(mBestWord);