Fix NPE in LatinIME.addToUserHistoryDictionary()
bug: 7007063 Change-Id: Ie3e2f77dcbc597dda0c0df9a970336e5aac0edba
This commit is contained in:
parent
4af100759b
commit
e46d12927e
1 changed files with 1 additions and 0 deletions
|
@ -2001,6 +2001,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
|
||||
private CharSequence addToUserHistoryDictionary(final CharSequence suggestion) {
|
||||
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.
|
||||
// That's to avoid unintended additions in some sensitive fields, or fields that
|
||||
|
|
Loading…
Reference in a new issue