diff options
author | 2013-11-27 16:49:30 +0900 | |
---|---|---|
committer | 2013-11-27 17:37:57 +0900 | |
commit | dfc5aade2d9e33c48cd0a6c89eadd2fcbf69c52f (patch) | |
tree | 3bd4ba229fdf6d6a168453bb9d6551cd7668b416 /tests/src | |
parent | fd15afae4623e1583bab771b40ee853709175385 (diff) | |
download | latinime-dfc5aade2d9e33c48cd0a6c89eadd2fcbf69c52f.tar.gz latinime-dfc5aade2d9e33c48cd0a6c89eadd2fcbf69c52f.tar.xz latinime-dfc5aade2d9e33c48cd0a6c89eadd2fcbf69c52f.zip |
Fix messages in tests
They are not failing because of this right now, but future
tests would fail without this.
Concretely, since the Handler for any given main thread is
a singleton managed by the framework, the messages won't
be removed automatically. In particular, messages posted
with a delay have a large destructive potential, because
they will go through before the startInputViewInternal
method is called, because it's called with a message too (in
turn, this is because of working around framework bugs).
Bug: 11142685
Change-Id: If81a168efcfd7d93806ddc4ea432d438c45a3e1d
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/com/android/inputmethod/latin/InputTestsBase.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/src/com/android/inputmethod/latin/InputTestsBase.java b/tests/src/com/android/inputmethod/latin/InputTestsBase.java index 5e7a9e6c5..aaad740e4 100644 --- a/tests/src/com/android/inputmethod/latin/InputTestsBase.java +++ b/tests/src/com/android/inputmethod/latin/InputTestsBase.java @@ -193,6 +193,7 @@ public class InputTestsBase extends ServiceTestCase<LatinIMEForTests> { @Override protected void tearDown() { + mLatinIME.mHandler.removeAllMessages(); setStringPreference(PREF_AUTO_CORRECTION_THRESHOLD, mPreviousAutoCorrectSetting, DEFAULT_AUTO_CORRECTION_THRESHOLD); setDebugMode(mPreviousDebugSetting); |