commit | e46d12927ee2717788248b05f00b751beaf2a02a | [log] [tgz] |
---|---|---|
author | Ken Wakasa <kwakasa@google.com> | Sat Aug 18 00:04:33 2012 +0900 |
committer | Ken Wakasa <kwakasa@google.com> | Sat Aug 18 00:04:33 2012 +0900 |
tree | fcae75d29e787d3a1833ec00fc6d9e7c8c44cd25 | |
parent | 4af100759b462e59b04008be4376e23226703efd [diff] |
Fix NPE in LatinIME.addToUserHistoryDictionary() bug: 7007063 Change-Id: Ie3e2f77dcbc597dda0c0df9a970336e5aac0edba
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 884e6db..c20f3a3 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -2001,6 +2001,7 @@ 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