WindowInsetsAnimation: Update CTS for refactored API

Bug: 143556682
Test: atest WindowInsetsControllerTests
Change-Id: I0dca5ffdcef6e1f89e2288d5e55ad0f134bb3f4e
diff --git a/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsControllerTests.java b/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsControllerTests.java
index 4a4775f..60bc160 100644
--- a/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsControllerTests.java
+++ b/tests/framework/base/windowmanager/src/android/server/wm/WindowInsetsControllerTests.java
@@ -29,7 +29,7 @@
 import android.view.View;
 import android.view.WindowInsets;
 import android.view.WindowInsets.Type;
-import android.view.WindowInsetsAnimationCallback;
+import android.view.WindowInsetsAnimation;
 
 import com.android.compatibility.common.util.PollingCheck;
 import com.android.compatibility.common.util.SystemUtil;
@@ -37,6 +37,8 @@
 import org.junit.Ignore;
 import org.junit.Test;
 
+import java.util.List;
+
 /**
  * Test whether WindowInsetsController controls window insets as expected.
  *
@@ -199,22 +201,22 @@
                 () -> getInstrumentation().sendPointerSync(event));
     }
 
-    private static class AnimationCallback implements WindowInsetsAnimationCallback {
+    private static class AnimationCallback extends WindowInsetsAnimation.Callback {
 
         private boolean mFinished = false;
 
-        @Override
-        public int getDispatchMode() {
-            return DISPATCH_MODE_CONTINUE_ON_SUBTREE;
+        AnimationCallback() {
+            super(DISPATCH_MODE_CONTINUE_ON_SUBTREE);
         }
 
         @Override
-        public WindowInsets onProgress(WindowInsets insets) {
+        public WindowInsets onProgress(WindowInsets insets,
+                List<WindowInsetsAnimation> runningAnimations) {
             return insets;
         }
 
         @Override
-        public void onFinish(InsetsAnimation animation) {
+        public void onEnd(WindowInsetsAnimation animation) {
             synchronized (this) {
                 mFinished = true;
                 notify();