summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Andrii Kulian <akulian@google.com> 2017-08-11 18:01:11 -0700
committer Andrii Kulian <akulian@google.com> 2017-08-11 18:01:11 -0700
commitf672aa5cc3933e745e35547ea4bbd6dcd6c77b8f (patch)
tree08bc313865c70f50e316048a14c784a89adfaaf8
parent1cbfe74fc2822819a898c92b22200ae549692e8e (diff)
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
-rw-r--r--services/core/java/com/android/server/wm/SurfaceControlWithBackground.java2
1 files changed, 1 insertions, 1 deletions
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);