From ae46b5c714319ef03c0a2ea9ebee5b5ae7207ab5 Mon Sep 17 00:00:00 2001 From: Lyn Han Date: Thu, 10 Jun 2021 15:34:08 -0500 Subject: [PATCH] If notifications can scroll at all, allow scroll up to status bar Fixes: 190748504 Test: 1 notif => no scroll Test: 2 notifs, just enough to scroll => scrolls up to status bar Test: no scrollRange regressions with - enough notifs to scroll up and cover qs completely - inline reply to show IME Change-Id: I8d2215d841b52df21a45293a23e7aff09b39c7ae --- .../notification/stack/NotificationStackScrollLayout.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index c640714321b7d..ba2f555f79299 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -2073,6 +2073,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable int scrollRange = Math.max(0, contentHeight - mMaxLayoutHeight); int imeInset = getImeInset(); scrollRange += Math.min(imeInset, Math.max(0, contentHeight - (getHeight() - imeInset))); + if (scrollRange > 0) { + scrollRange = Math.max(getScrollAmountToScrollBoundary(), scrollRange); + } return scrollRange; }