Loading services/core/java/com/android/server/wm/RemoteAnimationController.java +4 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,10 @@ class RemoteAnimationController { * Called when the transition is ready to be started, and all leashes have been set up. */ void goodToGo() { if (mPendingAnimations.isEmpty()) { onAnimationFinished(); return; } mHandler.postDelayed(mTimeoutRunnable, TIMEOUT_MS); try { mRemoteAnimationAdapter.getRunner().onAnimationStart(createAnimations(), Loading services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; import android.graphics.Point; import android.graphics.Rect; Loading Loading @@ -134,4 +135,10 @@ public class RemoteAnimationControllerTest extends WindowTestsBase { verify(mMockRunner).onAnimationCancelled(); verify(mFinishedCallback).onAnimationFinished(eq(adapter)); } @Test public void testZeroAnimations() throws Exception { mController.goodToGo(); verifyZeroInteractions(mMockRunner); } } Loading
services/core/java/com/android/server/wm/RemoteAnimationController.java +4 −0 Original line number Diff line number Diff line Loading @@ -88,6 +88,10 @@ class RemoteAnimationController { * Called when the transition is ready to be started, and all leashes have been set up. */ void goodToGo() { if (mPendingAnimations.isEmpty()) { onAnimationFinished(); return; } mHandler.postDelayed(mTimeoutRunnable, TIMEOUT_MS); try { mRemoteAnimationAdapter.getRunner().onAnimationStart(createAnimations(), Loading
services/tests/servicestests/src/com/android/server/wm/RemoteAnimationControllerTest.java +7 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_BASE_APPLICATION; import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; import android.graphics.Point; import android.graphics.Rect; Loading Loading @@ -134,4 +135,10 @@ public class RemoteAnimationControllerTest extends WindowTestsBase { verify(mMockRunner).onAnimationCancelled(); verify(mFinishedCallback).onAnimationFinished(eq(adapter)); } @Test public void testZeroAnimations() throws Exception { mController.goodToGo(); verifyZeroInteractions(mMockRunner); } }