From 93f4aec07c07160cd339791e158c894865c1d4a2 Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Thu, 24 Apr 2014 23:08:48 -0700 Subject: [PATCH] Fix: Wrong null check for user history dict. Change-Id: Idf0bcc44247e35cd95f9482d2a8017329fc977bb --- .../inputmethod/latin/DictionaryFacilitatorForSuggest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/DictionaryFacilitatorForSuggest.java b/java/src/com/android/inputmethod/latin/DictionaryFacilitatorForSuggest.java index b75a55f2b..00b9f533c 100644 --- a/java/src/com/android/inputmethod/latin/DictionaryFacilitatorForSuggest.java +++ b/java/src/com/android/inputmethod/latin/DictionaryFacilitatorForSuggest.java @@ -333,7 +333,7 @@ public class DictionaryFacilitatorForSuggest { // of this method. public boolean hasInitializedMainDictionary() { final Dictionary mainDict = mDictionaries.getMainDict(); - return mainDict != null && mainDict.isInitialized(); + return mainDict != null && mainDict.isInitialized(); } public boolean hasPersonalizationDictionary() { @@ -384,7 +384,7 @@ public class DictionaryFacilitatorForSuggest { final Dictionaries dictionaries = mDictionaries; final ExpandableBinaryDictionary userHistoryDictionary = dictionaries.getSubDict(Dictionary.TYPE_USER_HISTORY); - if (userHistoryDictionary != null) { + if (userHistoryDictionary == null) { return; } final int maxFreq = getMaxFrequency(suggestion);