am 943e28d2: Merge "Periodic GC for personalization dict."

* commit '943e28d202787c15c49c00f98267ca6cc1be7a3f':
  Periodic GC for personalization dict.
main
Keisuke Kuroyanagi 2014-05-09 03:45:19 +00:00 committed by Android Git Automerger
commit 377f4903fa
2 changed files with 2 additions and 3 deletions

View File

@ -61,6 +61,7 @@ public class DictionaryDecayBroadcastReciever extends BroadcastReceiver {
final String action = intent.getAction();
if (action.equals(DICTIONARY_DECAY_INTENT_ACTION)) {
PersonalizationHelper.runGCOnAllOpenedUserHistoryDictionaries();
PersonalizationHelper.runGCOnAllOpenedPersonalizationDictionaries();
}
}
}

View File

@ -16,7 +16,6 @@
package com.android.inputmethod.latin.personalization;
import com.android.inputmethod.annotations.UsedForTesting;
import com.android.inputmethod.latin.utils.CollectionUtils;
import com.android.inputmethod.latin.utils.FileUtils;
@ -66,8 +65,8 @@ public class PersonalizationHelper {
if (TimeUnit.MILLISECONDS.toSeconds(
DictionaryDecayBroadcastReciever.DICTIONARY_DECAY_INTERVAL)
< currentTimestamp - sCurrentTimestampForTesting) {
// TODO: Run GC for both PersonalizationDictionary and UserHistoryDictionary.
runGCOnAllOpenedUserHistoryDictionaries();
runGCOnAllOpenedPersonalizationDictionaries();
}
}
@ -75,7 +74,6 @@ public class PersonalizationHelper {
runGCOnAllDictionariesIfRequired(sLangUserHistoryDictCache);
}
@UsedForTesting
public static void runGCOnAllOpenedPersonalizationDictionaries() {
runGCOnAllDictionariesIfRequired(sLangPersonalizationDictCache);
}