Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f672aa5c authored by Andrii Kulian's avatar Andrii Kulian
Browse files

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
parent 1cbfe74f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);