diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java index cbcccbe866386..b36dc56ffdf95 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/StackScrollAlgorithm.java @@ -399,7 +399,8 @@ public class StackScrollAlgorithm { ambientState.getExpansionFraction(), true /* notification */); } - if (view.mustStayOnScreen() && viewState.yTranslation >= 0) { + if (ambientState.isShadeExpanded() && view.mustStayOnScreen() + && viewState.yTranslation >= 0) { // Even if we're not scrolled away we're in view and we're also not in the // shelf. We can relax the constraints and let us scroll off the top! float end = viewState.yTranslation + viewState.height + ambientState.getStackY();