diff options
author | 2014-04-07 22:32:06 +0900 | |
---|---|---|
committer | 2014-04-10 17:32:05 +0900 | |
commit | 4370ff0998d3240cfda7745d08edbdd11703b984 (patch) | |
tree | be63baa9809d7b3541c55ec4f11c6af2e5f1cff5 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | a4ac18551f6bf6ca7ee84139e8cea3656a4a8b86 (diff) | |
download | latinime-4370ff0998d3240cfda7745d08edbdd11703b984.tar.gz latinime-4370ff0998d3240cfda7745d08edbdd11703b984.tar.xz latinime-4370ff0998d3240cfda7745d08edbdd11703b984.zip |
Fix some flaky tests.
In tests, we create many instances of LatinIME, but we never
destroy them. That means we never close the dictionaries nor
the handlers.
This change calls onDestroy, which closes all dictionaries, and
adds some code to finish the handlers.
Change-Id: I942517a2a940c54256b08763f6b38f5b55809f55
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 6d36af77a..1f15a9759 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -635,6 +635,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen super.onDestroy(); } + @UsedForTesting + public void recycle() { + mInputLogic.recycle(); + } + @Override public void onConfigurationChanged(final Configuration conf) { // If orientation changed while predicting, commit the change |