Process all messages of TestLooper after each test
So that they won't process messages during the next test. Test: atest SystemUITests Fixes: 149740127 Change-Id: I082231b8f544f8b71f3404d247e10c3967c1c972
This commit is contained in:
@@ -86,7 +86,9 @@ public abstract class SysuiTestCase {
|
||||
public void SysuiTeardown() {
|
||||
InstrumentationRegistry.registerInstance(mRealInstrumentation,
|
||||
InstrumentationRegistry.getArguments());
|
||||
// Reset the assert's testable looper to null.
|
||||
if (TestableLooper.get(this) != null) {
|
||||
TestableLooper.get(this).processAllMessages();
|
||||
}
|
||||
disallowTestableLooperAsMainThread();
|
||||
SystemUIFactory.cleanup();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user