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

Commit a85187d9 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] Merge "Fixed an issue where the contentHeight was wrong" into...

[automerger] Merge "Fixed an issue where the contentHeight was wrong" into pi-dev am: ed9df0d1 am: 5c2a056a

Change-Id: I501b10108f3f075b171ed0d97bc0ae1385e49a55
parents fcfd26b6 5c2a056a
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -2053,11 +2053,9 @@ public class NotificationStackScrollLayout extends ViewGroup
    }

    private int getScrollRange() {
        int contentHeight = getContentHeight();
        int scrollRange = Math.max(0, contentHeight - mMaxLayoutHeight);
        int scrollRange = Math.max(0, mContentHeight - mMaxLayoutHeight);
        int imeInset = getImeInset();
        scrollRange += Math.min(imeInset, Math.max(0,
                getContentHeight() - (getHeight() - imeInset)));
        scrollRange += Math.min(imeInset, Math.max(0, mContentHeight - (getHeight() - imeInset)));
        return scrollRange;
    }

@@ -2158,10 +2156,6 @@ public class NotificationStackScrollLayout extends ViewGroup
        return count;
    }

    public int getContentHeight() {
        return mContentHeight;
    }

    private void updateContentHeight() {
        int height = 0;
        float previousPaddingRequest = mPaddingBetweenElements;
@@ -2225,7 +2219,11 @@ public class NotificationStackScrollLayout extends ViewGroup
            }
        }
        mIntrinsicContentHeight = height;
        mContentHeight = height + mTopPadding + mBottomMargin;

        // We don't want to use the toppadding since that might be interpolated and we want
        // to take the final value of the animation.
        int topPadding = mAmbientState.isFullyDark() ? mDarkTopPadding : mRegularTopPadding;
        mContentHeight = height + topPadding + mBottomMargin;
        updateScrollability();
        clampScrollPosition();
        mAmbientState.setLayoutMaxHeight(mContentHeight);