commit | a19d781a8a03757334a4dd1be8cfe2bc5e0299a7 | [log] [tgz] |
---|---|---|
author | Jorim Jaggi <jjaggi@google.com> | Thu Feb 01 15:03:59 2018 +0100 |
committer | Jorim Jaggi <jjaggi@google.com> | Thu Feb 01 15:03:59 2018 +0100 |
tree | 27a5252291c53ba56bdad3e7864a0b0f4060665b | |
parent | 9d3986bdc3b9fe5a85a54bf6a4f787e198eade40 [diff] [blame] |
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);