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

Commit c42db8df authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed an issue when launching notification groups

The clipping on the bottom wasn't calculated accurately

Change-Id: Iaf4aab575418ce8477503ae3079f9913f8b669f6
Fixes: 110093221
Test: launch group, observe normal animation
parent b53030f9
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -299,6 +299,10 @@ public class ActivityLaunchAnimator {
            return top;
        }

        public int getBottom() {
            return bottom;
        }

        public int getWidth() {
            return right - left;
        }
+8 −3
Original line number Diff line number Diff line
@@ -2001,7 +2001,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        float interpolation = Interpolators.FAST_OUT_SLOW_IN.getInterpolation(params.getProgress());
        int startClipTopAmount = params.getStartClipTopAmount();
        if (mNotificationParent != null) {
            top -= mNotificationParent.getTranslationY();
            float parentY = mNotificationParent.getTranslationY();
            top -= parentY;
            mNotificationParent.setTranslationZ(translationZ);
            int parentStartClipTopAmount = params.getParentStartClipTopAmount();
            if (startClipTopAmount != 0) {
@@ -2011,8 +2012,12 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
                mNotificationParent.setClipTopAmount(clipTopAmount);
            }
            mNotificationParent.setExtraWidthForClipping(extraWidthForClipping);
            mNotificationParent.setMinimumHeightForClipping(params.getHeight()
                    + mNotificationParent.getActualHeight());
            float clipBottom = Math.max(params.getBottom(),
                    parentY + mNotificationParent.getActualHeight()
                            - mNotificationParent.getClipBottomAmount());
            float clipTop = Math.min(params.getTop(), parentY);
            int minimumHeightForClipping = (int) (clipBottom - clipTop);
            mNotificationParent.setMinimumHeightForClipping(minimumHeightForClipping);
        } else if (startClipTopAmount != 0) {
            int clipTopAmount = (int) MathUtils.lerp(startClipTopAmount, 0, interpolation);
            setClipTopAmount(clipTopAmount);