diff options
author | 2025-03-03 07:16:16 -0800 | |
---|---|---|
committer | 2025-03-03 07:16:16 -0800 | |
commit | 330d157f025eb8def998692bd95c1545478f0f87 (patch) | |
tree | d893cf9e61a77af8f25fe195b593d60c7f33fcb8 | |
parent | ab91934822d643d9d64c45913b9371b9691217f6 (diff) | |
parent | 1e952fe9f70d9464d2d0ea08a90925efa9695fb8 (diff) |
Merge "Fix FlingOnBackAnimationCallbackTest flake" into main
-rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/animation/back/FlingOnBackAnimationCallbackTest.kt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/animation/back/FlingOnBackAnimationCallbackTest.kt b/packages/SystemUI/tests/src/com/android/systemui/animation/back/FlingOnBackAnimationCallbackTest.kt index 75a5768193cf..c81900da2581 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/animation/back/FlingOnBackAnimationCallbackTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/animation/back/FlingOnBackAnimationCallbackTest.kt @@ -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... - assertFalse(callback.backInvokedCalled) + 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) |