am 1f6e2faa: am e46d1292: Fix NPE in LatinIME.addToUserHistoryDictionary()

* commit '1f6e2faa33c28d815fb49117851027b95782c060':
  Fix NPE in LatinIME.addToUserHistoryDictionary()
main
Ken Wakasa 2012-08-17 08:14:26 -07:00 committed by Android Git Automerger
commit 99f3d68d70
1 changed files with 1 additions and 0 deletions

View File

@ -1961,6 +1961,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
private CharSequence addToUserHistoryDictionary(final CharSequence suggestion) { private CharSequence addToUserHistoryDictionary(final CharSequence suggestion) {
if (TextUtils.isEmpty(suggestion)) return null; if (TextUtils.isEmpty(suggestion)) return null;
if (mSuggest == null) return null;
// If correction is not enabled, we don't add words to the user history dictionary. // If correction is not enabled, we don't add words to the user history dictionary.
// That's to avoid unintended additions in some sensitive fields, or fields that // That's to avoid unintended additions in some sensitive fields, or fields that