Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 022113ad authored by Teng-Hui Zhu's avatar Teng-Hui Zhu
Browse files

Workaround the issue that parameterized test don't support @UiThreadTest

When the test infrastructure support it, this change should be reverted.
b/30746303

Change-Id: Ice181d93f4f1210bcd2c8566e61c90035fe12ec5
parent 17e76971
Loading
Loading
Loading
Loading
+25 −23
Original line number Diff line number Diff line
@@ -78,7 +78,8 @@ public class LayoutPerfTest {

    @Test
    @UiThreadTest
    public void testLayoutPerf() {
    public void testLayoutPerf() throws Throwable {
        mActivityRule.runOnUiThread(() -> {
            assertTrue("We should be running on the main thread",
                    Looper.getMainLooper().getThread() == Thread.currentThread());
            assertTrue("We should be running on the main thread",
@@ -102,5 +103,6 @@ public class LayoutPerfTest {
                    viewGroup.layout(0, 0, viewGroup.getMeasuredWidth(), viewGroup.getMeasuredHeight());
                }
            }
        });
    }
}