diff options
author | 2014-10-01 18:17:49 +0900 | |
---|---|---|
committer | 2014-10-01 18:33:47 +0900 | |
commit | 57e29436b1f4a7b1e0072f33212e97118ed924d2 (patch) | |
tree | e97f50d7bf1536b9cbe54d2e4cd24fe76f009891 /java | |
parent | 7b673c72651aa7dbfc3fc87fe2190d8cffb320c1 (diff) | |
download | latinime-57e29436b1f4a7b1e0072f33212e97118ed924d2.tar.gz latinime-57e29436b1f4a7b1e0072f33212e97118ed924d2.tar.xz latinime-57e29436b1f4a7b1e0072f33212e97118ed924d2.zip |
Fix an NPE on ICS factory rom.
In ICS factory rom and MR0, there was a bug where calling the
constructor for SuggestionSpan that doesn't take a context as
an argument would always return in a crash. Don't call it,
and pass an explicit context instead.
Bug: 13552505
Change-Id: I5c919499b9d086c2cf283795b2af5b91cb425933
Diffstat (limited to 'java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java index d7e1eba8b..48c8afa2a 100644 --- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java +++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java @@ -1649,8 +1649,10 @@ public final class InputLogic { } } // Add the suggestion list to the list of suggestions. - textToCommit.setSpan(new SuggestionSpan(inputTransaction.mSettingsValues.mLocale, - suggestions.toArray(new String[suggestions.size()]), 0 /* flags */), + textToCommit.setSpan(new SuggestionSpan(mLatinIME /* context */, + inputTransaction.mSettingsValues.mLocale, + suggestions.toArray(new String[suggestions.size()]), 0 /* flags */, + null /* notificationTargetClass */), 0 /* start */, lastCharIndex /* end */, 0 /* flags */); } |