From f672aa5cc3933e745e35547ea4bbd6dcd6c77b8f Mon Sep 17 00:00:00 2001 From: Andrii Kulian Date: Fri, 11 Aug 2017 18:01:11 -0700 Subject: Update background crop animation threshold Empiric value for animation epsilon covers only the last frame of the animation, which is not enough in some case. This CL makes it a little bigger to cover two last frames. The change is visually indistinguishable for user. Bug: 63156733 Test: Go to/from recents with letterboxed app. Change-Id: I42423527688dcb2dc157ae16bbe5b6de7eee3449 --- .../core/java/com/android/server/wm/SurfaceControlWithBackground.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/SurfaceControlWithBackground.java b/services/core/java/com/android/server/wm/SurfaceControlWithBackground.java index 9eb2b461e848..d3c2c80e6ec1 100644 --- a/services/core/java/com/android/server/wm/SurfaceControlWithBackground.java +++ b/services/core/java/com/android/server/wm/SurfaceControlWithBackground.java @@ -189,7 +189,7 @@ class SurfaceControlWithBackground extends SurfaceControl { // for background width/height then screen size at the end of the animation. Will round when // the value is smaller then some empiric epsilon. However, this should be fixed by // computing correct frames for letterboxed windows in WindowState. - d = d < 0.02f ? 0 : d; + d = d < 0.025f ? 0 : d; mWindowSurfaceController.getContainerRect(mTmpContainerRect); final int backgroundWidth = (int) (crop.width() + (mTmpContainerRect.width() - mLastWidth) * (1 - d) + 0.5); -- cgit v1.2.3-59-g8ed1b