Add SysuiTestCase.runOnMainThreadAndWaitForIdleSync()

This CL introduces a runOnMainThreadAndWaitForIdleSync() utility to
easily post work in the main thread and wait for its completion in a
test. This should make it easier to work with code that has to run on
the main thread, like dialogs.

Bug: 346519570
Test: None, this is a test utility
Flag: EXEMPT test utility
Change-Id: I93790fb9a729d273b3806db9637d9a9af94d966f
1 file changed