Delete user history files.
Bug 19669016. Change-Id: I8069fe561347851bf3c27423dbd8ba99d38c049emain
parent
77fd5dbf3e
commit
bdd6c995ce
|
@ -63,7 +63,7 @@ import javax.annotation.Nullable;
|
||||||
*/
|
*/
|
||||||
public final class KeyboardLayoutSet {
|
public final class KeyboardLayoutSet {
|
||||||
private static final String TAG = KeyboardLayoutSet.class.getSimpleName();
|
private static final String TAG = KeyboardLayoutSet.class.getSimpleName();
|
||||||
private static final boolean DEBUG_CACHE = DebugFlags.DEBUG_ENABLED;
|
private static final boolean DEBUG_CACHE = false;
|
||||||
|
|
||||||
private static final String TAG_KEYBOARD_SET = "KeyboardLayoutSet";
|
private static final String TAG_KEYBOARD_SET = "KeyboardLayoutSet";
|
||||||
private static final String TAG_ELEMENT = "Element";
|
private static final String TAG_ELEMENT = "Element";
|
||||||
|
|
|
@ -169,10 +169,10 @@ public interface DictionaryFacilitator {
|
||||||
|
|
||||||
int getMaxFrequencyOfExactMatches(final String word);
|
int getMaxFrequencyOfExactMatches(final String word);
|
||||||
|
|
||||||
void clearUserHistoryDictionary();
|
void clearUserHistoryDictionary(final Context context);
|
||||||
|
|
||||||
String dump(final Context context);
|
String dump(final Context context);
|
||||||
|
|
||||||
void dumpDictionaryForDebug(final String dictName);
|
void dumpDictionaryForDebug(final String dictName);
|
||||||
|
|
||||||
ArrayList<Pair<String, DictionaryStats>> getStatsOfEnabledSubDicts();
|
ArrayList<Pair<String, DictionaryStats>> getStatsOfEnabledSubDicts();
|
||||||
|
|
|
@ -776,7 +776,7 @@ public class DictionaryFacilitatorImpl implements DictionaryFacilitator {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clearUserHistoryDictionary() {
|
public void clearUserHistoryDictionary(final Context context) {
|
||||||
clearSubDictionary(Dictionary.TYPE_USER_HISTORY);
|
clearSubDictionary(Dictionary.TYPE_USER_HISTORY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -609,7 +609,6 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
|
|
||||||
private void refreshPersonalizationDictionarySession(
|
private void refreshPersonalizationDictionarySession(
|
||||||
final SettingsValues currentSettingsValues) {
|
final SettingsValues currentSettingsValues) {
|
||||||
// TODO: Remove all existing personalized dictionaries.
|
|
||||||
mDictionaryFacilitator.setIsMonolingualUser(
|
mDictionaryFacilitator.setIsMonolingualUser(
|
||||||
mRichImm.isSystemLocaleSameAsLocaleOfAllEnabledSubtypesOfEnabledImes());
|
mRichImm.isSystemLocaleSameAsLocaleOfAllEnabledSubtypesOfEnabledImes());
|
||||||
final boolean shouldKeepUserHistoryDictionaries;
|
final boolean shouldKeepUserHistoryDictionaries;
|
||||||
|
@ -621,7 +620,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
if (!shouldKeepUserHistoryDictionaries) {
|
if (!shouldKeepUserHistoryDictionaries) {
|
||||||
// Remove user history dictionaries.
|
// Remove user history dictionaries.
|
||||||
PersonalizationHelper.removeAllUserHistoryDictionaries(this);
|
PersonalizationHelper.removeAllUserHistoryDictionaries(this);
|
||||||
mDictionaryFacilitator.clearUserHistoryDictionary();
|
mDictionaryFacilitator.clearUserHistoryDictionary(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1802,7 +1801,7 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
||||||
// DO NOT USE THIS for any other purpose than testing.
|
// DO NOT USE THIS for any other purpose than testing.
|
||||||
@UsedForTesting
|
@UsedForTesting
|
||||||
/* package for test */ void clearPersonalizedDictionariesForTest() {
|
/* package for test */ void clearPersonalizedDictionariesForTest() {
|
||||||
mDictionaryFacilitator.clearUserHistoryDictionary();
|
mDictionaryFacilitator.clearUserHistoryDictionary(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@UsedForTesting
|
@UsedForTesting
|
||||||
|
|
Loading…
Reference in New Issue