am 0d3f01f3: Remove last vestiges of contextual+personal dictionary.

* commit '0d3f01f3014e7a519b08c9337bc4b73670f741ef':
  Remove last vestiges of contextual+personal dictionary.
This commit is contained in:
Dan Zivkovic 2015-02-04 19:44:55 +00:00 committed by Android Git Automerger
commit e105a6fde0
3 changed files with 2 additions and 29 deletions

View file

@ -49,8 +49,7 @@ public abstract class Dictionary {
// Spawned by resuming suggestions. Comes from a span that was in the TextView.
public static final String TYPE_RESUMED = "resumed";
public static final PhonyDictionary DICTIONARY_RESUMED =
new PhonyDictionary(TYPE_RESUMED);
public static final PhonyDictionary DICTIONARY_RESUMED = new PhonyDictionary(TYPE_RESUMED);
// The following types of dictionary have actual functional instances. We don't need final
// phony dictionary instances for them.
@ -60,10 +59,6 @@ public abstract class Dictionary {
public static final String TYPE_USER = "user";
// User history dictionary internal to LatinIME.
public static final String TYPE_USER_HISTORY = "history";
// Personalization dictionary.
public static final String TYPE_PERSONALIZATION = "personalization";
// Contextual dictionary.
public static final String TYPE_CONTEXTUAL = "contextual";
public final String mDictType;
// The locale for this dictionary. May be null if unknown (phony dictionary for example).
public final Locale mLocale;
@ -76,9 +71,7 @@ public abstract class Dictionary {
TYPE_USER_TYPED,
TYPE_USER,
TYPE_CONTACTS,
TYPE_USER_HISTORY,
TYPE_PERSONALIZATION,
TYPE_CONTEXTUAL));
TYPE_USER_HISTORY));
public Dictionary(final String dictType, final Locale locale) {
mDictType = dictType;

View file

@ -115,8 +115,6 @@ public interface DictionaryFacilitator {
boolean hasAtLeastOneUninitializedMainDictionary();
boolean hasPersonalizationDictionary();
void waitForLoadingMainDictionaries(final long timeout, final TimeUnit unit)
throws InterruptedException;

View file

@ -392,8 +392,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
}
if (usePersonalizedDicts) {
subDictTypesToUse.add(Dictionary.TYPE_USER_HISTORY);
subDictTypesToUse.add(Dictionary.TYPE_PERSONALIZATION);
subDictTypesToUse.add(Dictionary.TYPE_CONTEXTUAL);
}
// Gather all dictionaries. We'll remove them from the list to clean up later.
@ -600,16 +598,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
return false;
}
public boolean hasPersonalizationDictionary() {
final DictionaryGroup[] dictionaryGroups = mDictionaryGroups;
for (final DictionaryGroup dictionaryGroup : dictionaryGroups) {
if (dictionaryGroup.hasDict(Dictionary.TYPE_PERSONALIZATION, null /* account */)) {
return true;
}
}
return false;
}
public void waitForLoadingMainDictionaries(final long timeout, final TimeUnit unit)
throws InterruptedException {
mLatchForWaitingLoadingMainDictionaries.await(timeout, unit);
@ -708,8 +696,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
public void removeWordFromPersonalizedDicts(final String word) {
removeWord(Dictionary.TYPE_USER_HISTORY, word);
removeWord(Dictionary.TYPE_PERSONALIZATION, word);
removeWord(Dictionary.TYPE_CONTEXTUAL, word);
}
// TODO: Revise the way to fusion suggestion results.
@ -814,10 +800,6 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
clearSubDictionary(Dictionary.TYPE_USER_HISTORY);
}
public void clearContextualDictionary() {
clearSubDictionary(Dictionary.TYPE_CONTEXTUAL);
}
public void dumpDictionaryForDebug(final String dictName) {
final DictionaryGroup[] dictionaryGroups = mDictionaryGroups;
for (final DictionaryGroup dictionaryGroup : dictionaryGroups) {