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

Commit 8d27a7bc authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Deduplicate storage of StackTranslation

Bug: 296118689
Test: atest SystemUITests
Flag: NONE
Change-Id: I317ebb37df702cf828d393a4c16268d1af9ce22d
parent c6d55854
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -282,7 +282,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
     */
    private float mMinTopOverScrollToEscape;
    private int mIntrinsicPadding;
    private float mStackTranslation;
    private float mTopPaddingOverflow;
    private boolean mDontReportNextOverScroll;
    private boolean mDontClampNextScroll;
@@ -1653,12 +1652,11 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
    }

    public float getStackTranslation() {
        return mStackTranslation;
        return mAmbientState.getStackTranslation();
    }

    private void setStackTranslation(float stackTranslation) {
        if (stackTranslation != mStackTranslation) {
            mStackTranslation = stackTranslation;
        if (stackTranslation != getStackTranslation()) {
            mAmbientState.setStackTranslation(stackTranslation);
            requestChildrenUpdate();
        }
@@ -4077,7 +4075,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
                if (row.isChildInGroup()) {
                    endPosition += row.getNotificationParent().getTranslationY();
                }
                int layoutEnd = mMaxLayoutHeight + (int) mStackTranslation;
                int layoutEnd = mMaxLayoutHeight + (int) getStackTranslation();
                NotificationSection lastSection = getLastVisibleSection();
                ExpandableView lastVisibleChild =
                        lastSection == null ? null : lastSection.getLastVisibleChild();
@@ -4560,7 +4558,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
                }
            }
        }
        return touchY > mTopPadding + mStackTranslation;
        return touchY > mTopPadding + getStackTranslation();
    }

    /**