Loading java/src/com/android/inputmethod/research/MainLogBuffer.java +9 −7 Original line number Diff line number Diff line Loading @@ -93,6 +93,11 @@ public abstract class MainLogBuffer extends FixedLogBuffer { mSuggest = suggest; } private Dictionary getDictionary() { if (mSuggest == null || !mSuggest.hasMainDictionary()) return null; return mSuggest.getMainDictionary(); } public void resetWordCounter() { mNumWordsUntilSafeToSample = mNumWordsBetweenNGrams; } Loading Loading @@ -137,16 +142,13 @@ public abstract class MainLogBuffer extends FixedLogBuffer { if (mNumWordsUntilSafeToSample > 0) { return false; } if (mSuggest == null || !mSuggest.hasMainDictionary()) { // Main dictionary is unavailable. Since we cannot check it, we cannot tell if a // word is out-of-vocabulary or not. Therefore, we must judge the entire buffer // contents to potentially pose a privacy risk. return false; } // Reload the dictionary in case it has changed (e.g., because the user has changed // languages). final Dictionary dictionary = mSuggest.getMainDictionary(); final Dictionary dictionary = getDictionary(); if (dictionary == null) { // Main dictionary is unavailable. Since we cannot check it, we cannot tell if a // word is out-of-vocabulary or not. Therefore, we must judge the entire buffer // contents to potentially pose a privacy risk. return false; } Loading Loading
java/src/com/android/inputmethod/research/MainLogBuffer.java +9 −7 Original line number Diff line number Diff line Loading @@ -93,6 +93,11 @@ public abstract class MainLogBuffer extends FixedLogBuffer { mSuggest = suggest; } private Dictionary getDictionary() { if (mSuggest == null || !mSuggest.hasMainDictionary()) return null; return mSuggest.getMainDictionary(); } public void resetWordCounter() { mNumWordsUntilSafeToSample = mNumWordsBetweenNGrams; } Loading Loading @@ -137,16 +142,13 @@ public abstract class MainLogBuffer extends FixedLogBuffer { if (mNumWordsUntilSafeToSample > 0) { return false; } if (mSuggest == null || !mSuggest.hasMainDictionary()) { // Main dictionary is unavailable. Since we cannot check it, we cannot tell if a // word is out-of-vocabulary or not. Therefore, we must judge the entire buffer // contents to potentially pose a privacy risk. return false; } // Reload the dictionary in case it has changed (e.g., because the user has changed // languages). final Dictionary dictionary = mSuggest.getMainDictionary(); final Dictionary dictionary = getDictionary(); if (dictionary == null) { // Main dictionary is unavailable. Since we cannot check it, we cannot tell if a // word is out-of-vocabulary or not. Therefore, we must judge the entire buffer // contents to potentially pose a privacy risk. return false; } Loading