am 9a289da4: Remove deprecated distractor filtering methods.
* commit '9a289da4e6ea40417422a540e821069d5d6e4a82': Remove deprecated distractor filtering methods.main
commit
9a2e1ef6b4
|
@ -89,9 +89,6 @@ public interface DictionaryFacilitator {
|
|||
void onUpdateMainDictionaryAvailability(boolean isMainDictionaryAvailable);
|
||||
}
|
||||
|
||||
// TODO: remove this, it's confusing with seamless multiple language switching
|
||||
void setIsMonolingualUser(final boolean isMonolingualUser);
|
||||
|
||||
boolean isActive();
|
||||
|
||||
/**
|
||||
|
@ -165,10 +162,6 @@ public interface DictionaryFacilitator {
|
|||
|
||||
boolean isValidSuggestionWord(final String word);
|
||||
|
||||
int getFrequency(final String word);
|
||||
|
||||
int getMaxFrequencyOfExactMatches(final String word);
|
||||
|
||||
void clearUserHistoryDictionary(final Context context);
|
||||
|
||||
String dump(final Context context);
|
||||
|
|
|
@ -230,10 +230,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
|
|||
public DictionaryFacilitatorImpl() {
|
||||
}
|
||||
|
||||
// TODO: remove this, it's confusing with seamless multiple language switching
|
||||
public void setIsMonolingualUser(final boolean isMonolingualUser) {
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return null != mDictionaryGroups[0].mLocale;
|
||||
}
|
||||
|
@ -730,8 +726,7 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
|
|||
return false;
|
||||
}
|
||||
|
||||
private int getFrequencyInternal(final String word,
|
||||
final boolean isGettingMaxFrequencyOfExactMatches) {
|
||||
private int getFrequency(final String word) {
|
||||
if (TextUtils.isEmpty(word)) {
|
||||
return Dictionary.NOT_A_PROBABILITY;
|
||||
}
|
||||
|
@ -741,12 +736,7 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
|
|||
for (final String dictType : ALL_DICTIONARY_TYPES) {
|
||||
final Dictionary dictionary = dictionaryGroup.getDict(dictType);
|
||||
if (dictionary == null) continue;
|
||||
final int tempFreq;
|
||||
if (isGettingMaxFrequencyOfExactMatches) {
|
||||
tempFreq = dictionary.getMaxFrequencyOfExactMatches(word);
|
||||
} else {
|
||||
tempFreq = dictionary.getFrequency(word);
|
||||
}
|
||||
final int tempFreq = dictionary.getFrequency(word);
|
||||
if (tempFreq >= maxFreq) {
|
||||
maxFreq = tempFreq;
|
||||
}
|
||||
|
@ -755,16 +745,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
|
|||
return maxFreq;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFrequency(final String word) {
|
||||
return getFrequencyInternal(word, false /* isGettingMaxFrequencyOfExactMatches */);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxFrequencyOfExactMatches(final String word) {
|
||||
return getFrequencyInternal(word, true /* isGettingMaxFrequencyOfExactMatches */);
|
||||
}
|
||||
|
||||
private void clearSubDictionary(final String dictName) {
|
||||
final DictionaryGroup[] dictionaryGroups = mDictionaryGroups;
|
||||
for (final DictionaryGroup dictionaryGroup : dictionaryGroups) {
|
||||
|
|
|
@ -609,15 +609,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
|
||||
private void refreshPersonalizationDictionarySession(
|
||||
final SettingsValues currentSettingsValues) {
|
||||
mDictionaryFacilitator.setIsMonolingualUser(
|
||||
mRichImm.isSystemLocaleSameAsLocaleOfAllEnabledSubtypesOfEnabledImes());
|
||||
final boolean shouldKeepUserHistoryDictionaries;
|
||||
if (currentSettingsValues.mUsePersonalizedDicts) {
|
||||
shouldKeepUserHistoryDictionaries = true;
|
||||
} else {
|
||||
shouldKeepUserHistoryDictionaries = false;
|
||||
}
|
||||
if (!shouldKeepUserHistoryDictionaries) {
|
||||
if (!currentSettingsValues.mUsePersonalizedDicts) {
|
||||
// Remove user history dictionaries.
|
||||
PersonalizationHelper.removeAllUserHistoryDictionaries(this);
|
||||
mDictionaryFacilitator.clearUserHistoryDictionary(this);
|
||||
|
|
Loading…
Reference in New Issue