Loading packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +13 −20 Original line number Diff line number Diff line Loading @@ -918,7 +918,7 @@ public class NotificationStackScrollLayout extends ViewGroup int positionInLinearLayout = getPositionInLinearLayout(v); int targetScroll = positionInLinearLayout + expandableView.getActualHeight() + mBottomInset - getHeight() + getTopPadding(); getImeInset() - getHeight() + getTopPadding(); if (mOwnScrollY < targetScroll) { mScroller.startScroll(mScrollX, mOwnScrollY, 0, targetScroll - mOwnScrollY); mDontReportNextOverScroll = true; Loading @@ -928,8 +928,7 @@ public class NotificationStackScrollLayout extends ViewGroup @Override public WindowInsets onApplyWindowInsets(WindowInsets insets) { mBottomInset = Math.max(0, insets.getSystemWindowInsetBottom() - (getRootView().getHeight() - getHeight())); mBottomInset = insets.getSystemWindowInsetBottom(); int range = getScrollRange(); if (mOwnScrollY > range) { Loading Loading @@ -1498,23 +1497,17 @@ public class NotificationStackScrollLayout extends ViewGroup } private int getScrollRange() { int scrollRange = 0; ExpandableView firstChild = (ExpandableView) getFirstChildNotGone(); if (firstChild != null) { int contentHeight = getContentHeight(); scrollRange = Math.max(0, contentHeight - mMaxLayoutHeight + mBottomStackPeekSize int scrollRange = Math.max(0, contentHeight - mMaxLayoutHeight + mBottomStackPeekSize + mBottomStackSlowDownHeight); if (scrollRange > 0) { int firstChildMaxExpandHeight = getMaxExpandHeight(firstChild); // We want to at least be able collapse the first item and not ending in a weird // end state. scrollRange = Math.max(scrollRange, firstChildMaxExpandHeight - firstChild.getMinHeight()); int imeInset = getImeInset(); scrollRange += Math.min(imeInset, Math.max(0, getContentHeight() - (getHeight() - imeInset))); return scrollRange; } } int imeOverlap = Math.max(0, getContentHeight() - (getHeight() - mBottomInset)); return scrollRange + imeOverlap; private int getImeInset() { return Math.max(0, mBottomInset - (getRootView().getHeight() - getHeight())); } /** Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +13 −20 Original line number Diff line number Diff line Loading @@ -918,7 +918,7 @@ public class NotificationStackScrollLayout extends ViewGroup int positionInLinearLayout = getPositionInLinearLayout(v); int targetScroll = positionInLinearLayout + expandableView.getActualHeight() + mBottomInset - getHeight() + getTopPadding(); getImeInset() - getHeight() + getTopPadding(); if (mOwnScrollY < targetScroll) { mScroller.startScroll(mScrollX, mOwnScrollY, 0, targetScroll - mOwnScrollY); mDontReportNextOverScroll = true; Loading @@ -928,8 +928,7 @@ public class NotificationStackScrollLayout extends ViewGroup @Override public WindowInsets onApplyWindowInsets(WindowInsets insets) { mBottomInset = Math.max(0, insets.getSystemWindowInsetBottom() - (getRootView().getHeight() - getHeight())); mBottomInset = insets.getSystemWindowInsetBottom(); int range = getScrollRange(); if (mOwnScrollY > range) { Loading Loading @@ -1498,23 +1497,17 @@ public class NotificationStackScrollLayout extends ViewGroup } private int getScrollRange() { int scrollRange = 0; ExpandableView firstChild = (ExpandableView) getFirstChildNotGone(); if (firstChild != null) { int contentHeight = getContentHeight(); scrollRange = Math.max(0, contentHeight - mMaxLayoutHeight + mBottomStackPeekSize int scrollRange = Math.max(0, contentHeight - mMaxLayoutHeight + mBottomStackPeekSize + mBottomStackSlowDownHeight); if (scrollRange > 0) { int firstChildMaxExpandHeight = getMaxExpandHeight(firstChild); // We want to at least be able collapse the first item and not ending in a weird // end state. scrollRange = Math.max(scrollRange, firstChildMaxExpandHeight - firstChild.getMinHeight()); int imeInset = getImeInset(); scrollRange += Math.min(imeInset, Math.max(0, getContentHeight() - (getHeight() - imeInset))); return scrollRange; } } int imeOverlap = Math.max(0, getContentHeight() - (getHeight() - mBottomInset)); return scrollRange + imeOverlap; private int getImeInset() { return Math.max(0, mBottomInset - (getRootView().getHeight() - getHeight())); } /** Loading