Scale timeout with animation scale

So slowed down animations still work
Test: RemoteAnimationControllerTest
Test: go/wm-smoke-auto

Change-Id: I23116fdd0f2e75e4320bd77aee704d1e2a9de5e7
diff --git a/services/core/java/com/android/server/wm/RemoteAnimationController.java b/services/core/java/com/android/server/wm/RemoteAnimationController.java
index 8269a3b..9251993 100644
--- a/services/core/java/com/android/server/wm/RemoteAnimationController.java
+++ b/services/core/java/com/android/server/wm/RemoteAnimationController.java
@@ -92,7 +92,10 @@
             onAnimationFinished();
             return;
         }
-        mHandler.postDelayed(mTimeoutRunnable, TIMEOUT_MS);
+
+        // Scale the timeout with the animator scale the controlling app is using.
+        mHandler.postDelayed(mTimeoutRunnable,
+                (long) (TIMEOUT_MS * mService.getCurrentAnimatorScale()));
         try {
             mRemoteAnimationAdapter.getRunner().onAnimationStart(createAnimations(),
                     mFinishedCallback);