Loading libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/BackProgressAnimatorTest.java +7 −7 Original line number Diff line number Diff line Loading @@ -187,14 +187,14 @@ public class BackProgressAnimatorTest { mTargetProgressCalled.await(1, TimeUnit.SECONDS); assertNotNull(mReceivedBackEvent); // Trigger back invoked animation CountDownLatch finishCallbackCalled = new CountDownLatch(1); InstrumentationRegistry.getInstrumentation().runOnMainSync( () -> mProgressAnimator.onBackInvoked(finishCallbackCalled::countDown)); // remove onBackCancelled finishCallback (while progress is still animating to 0) InstrumentationRegistry.getInstrumentation().runOnMainSync( () -> mProgressAnimator.removeOnBackInvokedFinishCallback()); // Trigger back invoked animation and remove onBackInvoked finishCallback (while progress // is still animating to 1) InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> { mProgressAnimator.onBackInvoked(finishCallbackCalled::countDown); mProgressAnimator.removeOnBackInvokedFinishCallback(); } ); // call reset (which triggers the finishCallback invocation, if one is present) InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> mProgressAnimator.reset()); Loading Loading
libs/WindowManager/Shell/tests/unittest/src/com/android/wm/shell/back/BackProgressAnimatorTest.java +7 −7 Original line number Diff line number Diff line Loading @@ -187,14 +187,14 @@ public class BackProgressAnimatorTest { mTargetProgressCalled.await(1, TimeUnit.SECONDS); assertNotNull(mReceivedBackEvent); // Trigger back invoked animation CountDownLatch finishCallbackCalled = new CountDownLatch(1); InstrumentationRegistry.getInstrumentation().runOnMainSync( () -> mProgressAnimator.onBackInvoked(finishCallbackCalled::countDown)); // remove onBackCancelled finishCallback (while progress is still animating to 0) InstrumentationRegistry.getInstrumentation().runOnMainSync( () -> mProgressAnimator.removeOnBackInvokedFinishCallback()); // Trigger back invoked animation and remove onBackInvoked finishCallback (while progress // is still animating to 1) InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> { mProgressAnimator.onBackInvoked(finishCallbackCalled::countDown); mProgressAnimator.removeOnBackInvokedFinishCallback(); } ); // call reset (which triggers the finishCallback invocation, if one is present) InstrumentationRegistry.getInstrumentation().runOnMainSync(() -> mProgressAnimator.reset()); Loading