Merge "Process all messages of TestLooper after each test" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-02-26 20:57:05 +00:00
committed by Android (Google) Code Review

View File

@@ -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();
}