Merge "Fix stack overflow from setOwnScrollY" into sc-dev

This commit is contained in:
Lyn Han
2021-05-04 21:56:28 +00:00
committed by Android (Google) Code Review

View File

@@ -1000,7 +1000,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
mAmbientState.setCurrentScrollVelocity(mScroller.isFinished()
? 0
: mScroller.getCurrVelocity());
mAmbientState.setScrollY(mOwnScrollY);
mStackScrollAlgorithm.resetViewStates(mAmbientState, getSpeedBumpIndex());
if (!isCurrentlyAnimating() && !mNeedsAnimation) {
applyCurrentState();
@@ -4532,7 +4531,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
// We still want to call the normal scrolled changed for accessibility reasons
onScrollChanged(mScrollX, ownScrollY, mScrollX, mOwnScrollY);
mOwnScrollY = ownScrollY;
updateChildren();
mAmbientState.setScrollY(mOwnScrollY);
updateOnScrollChange();
updateStackPosition();
}