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

Commit 330d157f authored by Johannes Gallmann's avatar Johannes Gallmann Committed by Android (Google) Code Review
Browse files

Merge "Fix FlingOnBackAnimationCallbackTest flake" into main

parents ab919348 1e952fe9
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -69,9 +69,11 @@ class FlingOnBackAnimationCallbackTest : SysuiTestCase() {
        callback.onBackProgressed(backEventOf(0.6f, 32))
        assertTrue("Assert onBackProgressedCompat called", callback.backProgressedCalled)
        assertEquals("Assert interpolated progress", 0.6f, callback.progressEvent?.progress)
        getInstrumentation().runOnMainSync { callback.onBackInvoked() }
        // Assert that onBackInvoked is not called immediately...
        getInstrumentation().runOnMainSync {
            callback.onBackInvoked()
            // Assert that onBackInvoked is not called immediately.
            assertFalse(callback.backInvokedCalled)
        }
        // Instead the fling animation is played and eventually onBackInvoked is called.
        callback.backInvokedLatch.await(1000, TimeUnit.MILLISECONDS)
        assertTrue(callback.backInvokedCalled)