aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/LatinIME.java
diff options
context:
space:
mode:
authorKeisuke Kuroyanagi <ksk@google.com>2014-02-20 22:20:43 +0900
committerKeisuke Kuroyanagi <ksk@google.com>2014-02-20 22:20:43 +0900
commitd36328cecf3b0c5e7acde7bd5963ea670b8d634f (patch)
tree07661eda031fda169b87917e37e7540faed1585b /java/src/com/android/inputmethod/latin/LatinIME.java
parenta7ee108fc549a3b0cd939e875ff3fc3e9dff3973 (diff)
downloadlatinime-d36328cecf3b0c5e7acde7bd5963ea670b8d634f.tar.gz
latinime-d36328cecf3b0c5e7acde7bd5963ea670b8d634f.tar.xz
latinime-d36328cecf3b0c5e7acde7bd5963ea670b8d634f.zip
Add test only methods to test personalized dicts.
Bug: 11122480 Change-Id: I79a4a73ff09a2d34d4ca094d705e901fb4bc855c
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r--java/src/com/android/inputmethod/latin/LatinIME.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java
index 346ba8523..47a3e9469 100644
--- a/java/src/com/android/inputmethod/latin/LatinIME.java
+++ b/java/src/com/android/inputmethod/latin/LatinIME.java
@@ -1717,9 +1717,10 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
// DO NOT USE THIS for any other purpose than testing. This is information private to LatinIME.
@UsedForTesting
- /* package for test */ void waitForMainDictionary(final long timeout, final TimeUnit unit)
+ /* package for test */ void waitForLoadingDictionaries(final long timeout, final TimeUnit unit)
throws InterruptedException {
- mInputLogic.mSuggest.mDictionaryFacilitator.waitForLoadingMainDictionary(timeout, unit);
+ mInputLogic.mSuggest.mDictionaryFacilitator.waitForLoadingDictionariesForTesting(
+ timeout, unit);
}
// DO NOT USE THIS for any other purpose than testing. This can break the keyboard badly.
@@ -1733,6 +1734,13 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
resetSuggest(new Suggest(locale, dictionaryFacilitator));
}
+ // DO NOT USE THIS for any other purpose than testing.
+ @UsedForTesting
+ /* package for test */ void clearPersonalizedDictionariesForTest() {
+ mInputLogic.mSuggest.mDictionaryFacilitator.clearUserHistoryDictionary();
+ mInputLogic.mSuggest.mDictionaryFacilitator.clearPersonalizationDictionary();
+ }
+
public void dumpDictionaryForDebug(final String dictName) {
if (mInputLogic.mSuggest == null) {
initSuggest();