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

Commit 31f579a1 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix waitForIdleSync not working with robolectric" into main

parents be4ff5bd bca1de6a
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -271,11 +271,15 @@ public abstract class SysuiTestCase {
    }

    protected void waitForIdleSync() {
        if (isRobolectricTest()) {
            mRealInstrumentation.waitForIdleSync();
        } else {
            if (mHandler == null) {
                mHandler = new Handler(Looper.getMainLooper());
            }
            waitForIdleSync(mHandler);
        }
    }

    protected void waitForUiOffloadThread() {
        Future<?> future = Dependency.get(UiOffloadThread.class).execute(() -> { });