From 065c01cc4d14b2c9d80294e7e619024e3d3b2364 Mon Sep 17 00:00:00 2001 From: Riddle Hsu Date: Thu, 10 May 2018 23:14:19 +0800 Subject: [PATCH] Fix focusable on entire notification area if QS is expanded Notifications are shown as shelf if QS is expanded. Because none of notification contents are visible, the notification scroll layout should be unscrollable and non-focusable. Test: Use TalkBack to perform go/sysui-stackscroll-test Change-Id: Icf27546fa43241b267be84761b7847a6e25c9a7a Fixes: 72956614 --- .../statusbar/stack/NotificationStackScrollLayout.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java index 5deebffc47781..cea81f5710e70 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/NotificationStackScrollLayout.java @@ -2223,7 +2223,7 @@ public class NotificationStackScrollLayout extends ViewGroup } private void updateScrollability() { - boolean scrollable = getScrollRange() > 0; + boolean scrollable = !mQsExpanded && getScrollRange() > 0; if (scrollable != mScrollable) { mScrollable = scrollable; setFocusable(scrollable); @@ -4504,6 +4504,7 @@ public class NotificationStackScrollLayout extends ViewGroup public void setQsExpanded(boolean qsExpanded) { mQsExpanded = qsExpanded; updateAlgorithmLayoutMinHeight(); + updateScrollability(); } public void setQsExpansionFraction(float qsExpansionFraction) {