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

Commit e55a4b54 authored by Michal Brzezinski's avatar Michal Brzezinski
Browse files

Fixing HUN translation and clipping when swiping up in split shade

This reverts changes in NSSL done in ag/19931457 - there I changed top clipping bound to introduce custom changes for split shade. Now I realised that there should be custom logic for bottom clipping bound and overriding height. So quite a bit custom logic, connected with the fact that this clipping is probably not needed at all, made me just disable clipping entirely for split shade. Couldn't find any case where this part would influence anything and fixes nicely two issues with translation and clipping that we have.

Fixes: 260083488
Test: manual, videos attached
Change-Id: Iad9a110b00ef927622345b22acd4bba5053022c1
parent b7b84320
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -1401,10 +1401,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
            mExpandedHeight = height;
            setIsExpanded(height > 0);
            int minExpansionHeight = getMinExpansionHeight();
            if (height < minExpansionHeight) {
            if (height < minExpansionHeight && !mShouldUseSplitNotificationShade) {
                mClipRect.left = 0;
                mClipRect.right = getWidth();
                mClipRect.top = getNotificationsClippingTopBound();
                mClipRect.top = 0;
                mClipRect.bottom = (int) height;
                height = minExpansionHeight;
                setRequestedClipBounds(mClipRect);
@@ -1466,17 +1466,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
        notifyAppearChangedListeners();
    }

    private int getNotificationsClippingTopBound() {
        if (isHeadsUpTransition()) {
            // HUN in split shade can go higher than bottom of NSSL when swiping up so we want
            // to give it extra clipping margin. Because clipping has rounded corners, we also
            // need to account for that corner clipping.
            return -mAmbientState.getStackTopMargin() - mCornerRadius;
        } else {
            return 0;
        }
    }

    private void notifyAppearChangedListeners() {
        float appear;
        float expandAmount;