diff options
author | 2013-12-26 20:47:46 +0900 | |
---|---|---|
committer | 2013-12-26 20:48:19 +0900 | |
commit | be147f1fdcfb5d192f64eb97e508b43da1fd9509 (patch) | |
tree | 1b6fbd207fcc611752741b6c57aef87c535762c2 /java/src/com/android/inputmethod/research/ResearchLogger.java | |
parent | a374482719ef9f38395e7e39884433cc72e9cdb7 (diff) | |
download | latinime-be147f1fdcfb5d192f64eb97e508b43da1fd9509.tar.gz latinime-be147f1fdcfb5d192f64eb97e508b43da1fd9509.tar.xz latinime-be147f1fdcfb5d192f64eb97e508b43da1fd9509.zip |
Remove DictionaryFacilitatorForSuggest.getMainDictionary().
Bug: 8187060
Change-Id: Ide087f1e39b24695b610bd2b3c464b7e3cb9cd29
Diffstat (limited to 'java/src/com/android/inputmethod/research/ResearchLogger.java')
-rw-r--r-- | java/src/com/android/inputmethod/research/ResearchLogger.java | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/java/src/com/android/inputmethod/research/ResearchLogger.java b/java/src/com/android/inputmethod/research/ResearchLogger.java index 4447b1b70..e7f49a605 100644 --- a/java/src/com/android/inputmethod/research/ResearchLogger.java +++ b/java/src/com/android/inputmethod/research/ResearchLogger.java @@ -52,7 +52,6 @@ import com.android.inputmethod.keyboard.KeyboardSwitcher; import com.android.inputmethod.keyboard.KeyboardView; import com.android.inputmethod.keyboard.MainKeyboardView; import com.android.inputmethod.latin.Constants; -import com.android.inputmethod.latin.Dictionary; import com.android.inputmethod.latin.DictionaryFacilitatorForSuggest; import com.android.inputmethod.latin.LatinIME; import com.android.inputmethod.latin.R; @@ -254,10 +253,10 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang + ", cipd: " + canIncludePrivateData); } for (final String word : logUnit.getWordsAsStringArray()) { - final Dictionary dictionary = getDictionary(); + final boolean isDictionaryWord = mDictionaryFacilitator != null + && mDictionaryFacilitator.isValidMainDictWord(word); mStatistics.recordWordEntered( - dictionary != null && dictionary.isValidWord(word), - logUnit.containsUserDeletions()); + isDictionaryWord, logUnit.containsUserDeletions()); } } publishLogUnits(logUnits, mMainResearchLog, canIncludePrivateData); @@ -664,13 +663,6 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang } } - private Dictionary getDictionary() { - if (mDictionaryFacilitator == null) { - return null; - } - return mDictionaryFacilitator.getMainDictionary(); - } - private void setIsPasswordView(boolean isPasswordView) { mIsPasswordView = isPasswordView; } @@ -964,11 +956,7 @@ public class ResearchLogger implements SharedPreferences.OnSharedPreferenceChang } private String scrubWord(String word) { - final Dictionary dictionary = getDictionary(); - if (dictionary == null) { - return WORD_REPLACEMENT_STRING; - } - if (dictionary.isValidWord(word)) { + if (mDictionaryFacilitator != null && mDictionaryFacilitator.isValidMainDictWord(word)) { return word; } return WORD_REPLACEMENT_STRING; |