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

Commit df5bda63 authored by Lucas Dupin's avatar Lucas Dupin Committed by android-build-merger
Browse files

Merge "Avoid pixel rounding issue during animation" into oc-dev am: 4a7d0772

am: b277f4ab

Change-Id: I585eed549a85dee0d213641255e62b4ce9cc252e
parents 6ca0b27e b277f4ab
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2225,14 +2225,15 @@ public class NotificationStackScrollLayout extends ViewGroup
        ActivatableNotificationView firstView = mFirstVisibleBackgroundChild;
        int top = 0;
        if (firstView != null) {
            int finalTranslationY = (int) ViewState.getFinalTranslationY(firstView);
            // Round Y up to avoid seeing the background during animation
            int finalTranslationY = (int) Math.ceil(ViewState.getFinalTranslationY(firstView));
            if (mAnimateNextBackgroundTop
                    || mTopAnimator == null && mCurrentBounds.top == finalTranslationY
                    || mTopAnimator != null && mEndAnimationRect.top == finalTranslationY) {
                // we're ending up at the same location as we are now, lets just skip the animation
                top = finalTranslationY;
            } else {
                top = (int) firstView.getTranslationY();
                top = (int) Math.ceil(firstView.getTranslationY());
            }
        }
        ActivatableNotificationView lastView =