summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Johannes Gallmann <gallmann@google.com> 2025-02-28 19:41:07 +0000
committer Johannes Gallmann <gallmann@google.com> 2025-02-28 19:41:07 +0000
commit1e952fe9f70d9464d2d0ea08a90925efa9695fb8 (patch)
tree3dceb2ab6e450f760493f9cad3ef9e4969e9f25a
parent03d6b1fc48aa5e91d7fb3c807ca4c440c8db2e1f (diff)
Fix FlingOnBackAnimationCallbackTest flake
Bug: 390517215 Test: FlingOnBackAnimationCallbackTest Flag: EXEMPT test-only bugfix Change-Id: I8bd385686ed317b95cfc18ea3582ec4ea3217000
-rw-r--r--packages/SystemUI/tests/src/com/android/systemui/animation/back/FlingOnBackAnimationCallbackTest.kt8
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)