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

Commit d6d79bd6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Adjusted the expand animation to be smooth again" into rvc-dev am:...

Merge "Adjusted the expand animation to be smooth again" into rvc-dev am: 8b9d2ed3 am: 926c990b am: 740c5ea9

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11958696

Change-Id: Ifc630a1267c6d1ed643df4b974c8c249798dd99d
parents c1496852 740c5ea9
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -535,6 +535,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
    private float mLastSentAppear;
    private float mLastSentAppear;
    private float mLastSentExpandedHeight;
    private float mLastSentExpandedHeight;
    private boolean mWillExpand;
    private boolean mWillExpand;
    private int mGapHeight;


    private int mWaterfallTopInset;
    private int mWaterfallTopInset;


@@ -1060,6 +1061,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd


        Resources res = context.getResources();
        Resources res = context.getResources();
        mCollapsedSize = res.getDimensionPixelSize(R.dimen.notification_min_height);
        mCollapsedSize = res.getDimensionPixelSize(R.dimen.notification_min_height);
        mGapHeight = res.getDimensionPixelSize(R.dimen.notification_section_divider_height);
        mStackScrollAlgorithm.initView(context);
        mStackScrollAlgorithm.initView(context);
        mAmbientState.reload(context);
        mAmbientState.reload(context);
        mPaddingBetweenElements = Math.max(1,
        mPaddingBetweenElements = Math.max(1,
@@ -5099,8 +5101,10 @@ public class NotificationStackScrollLayout extends ViewGroup implements ScrollAd
    }
    }


    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    public int getFooterViewHeight() {
    public int getFooterViewHeightWithPadding() {
        return mFooterView == null ? 0 : mFooterView.getHeight() + mPaddingBetweenElements;
        return mFooterView == null ? 0 : mFooterView.getHeight()
                + mPaddingBetweenElements
                + mGapHeight;
    }
    }


    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
    @ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
+2 −2
Original line number Original line Diff line number Diff line
@@ -2397,8 +2397,8 @@ public class NotificationPanelViewController extends PanelViewController {
    }
    }


    @Override
    @Override
    protected int getClearAllHeight() {
    protected int getClearAllHeightWithPadding() {
        return mNotificationStackScroller.getFooterViewHeight();
        return mNotificationStackScroller.getFooterViewHeightWithPadding();
    }
    }


    @Override
    @Override
+4 −4
Original line number Original line Diff line number Diff line
@@ -537,9 +537,9 @@ public abstract class PanelViewController {
        // the animation only to the last notification, and then jump to the maximum panel height so
        // the animation only to the last notification, and then jump to the maximum panel height so
        // clear all just fades in and the decelerating motion is towards the last notification.
        // clear all just fades in and the decelerating motion is towards the last notification.
        final boolean clearAllExpandHack = expand &&
        final boolean clearAllExpandHack = expand &&
                shouldExpandToTopOfClearAll(getMaxPanelHeight() - getClearAllHeight());
                shouldExpandToTopOfClearAll(getMaxPanelHeight() - getClearAllHeightWithPadding());
        if (clearAllExpandHack) {
        if (clearAllExpandHack) {
            target = getMaxPanelHeight() - getClearAllHeight();
            target = getMaxPanelHeight() - getClearAllHeightWithPadding();
        }
        }
        if (target == mExpandedHeight || getOverExpansionAmount() > 0f && expand) {
        if (target == mExpandedHeight || getOverExpansionAmount() > 0f && expand) {
            notifyExpandingFinished();
            notifyExpandingFinished();
@@ -1030,9 +1030,9 @@ public abstract class PanelViewController {
    protected abstract boolean isClearAllVisible();
    protected abstract boolean isClearAllVisible();


    /**
    /**
     * @return the height of the clear all button, in pixels
     * @return the height of the clear all button, in pixels including padding
     */
     */
    protected abstract int getClearAllHeight();
    protected abstract int getClearAllHeightWithPadding();


    public void setHeadsUpManager(HeadsUpManagerPhone headsUpManager) {
    public void setHeadsUpManager(HeadsUpManagerPhone headsUpManager) {
        mHeadsUpManager = headsUpManager;
        mHeadsUpManager = headsUpManager;