From a2f705e1911d33e581fdc23644a45abe57b0bc32 Mon Sep 17 00:00:00 2001 From: Jeff DeCew Date: Thu, 17 Jun 2021 12:04:08 -0400 Subject: [PATCH] Remove dividers when expanding groups. The logic needed a tweak because the HideDividersDuringExpand config wasn't being applied to the user-locked-expansion. Fixes: 191187506 Test: expand and collapse groups a bunch Change-Id: Ifc111233a041c14f58f921db55fd06f2040e1316 --- packages/SystemUI/res/values/config.xml | 2 +- .../stack/NotificationChildrenContainer.java | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index b4deaa0af543f..47f7751d03162 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -430,7 +430,7 @@ - false + true true diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java index 99fe541d01353..f2e39e78df360 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationChildrenContainer.java @@ -710,10 +710,10 @@ public class NotificationChildrenContainer extends ViewGroup { if (mUserLocked) { expandFraction = getGroupExpandFraction(); } - final boolean dividersVisible = mUserLocked && !showingAsLowPriority() - || (mChildrenExpanded && mShowDividersWhenExpanded) - || (mContainingNotification.isGroupExpansionChanging() - && !mHideDividersDuringExpand); + final boolean isExpanding = !showingAsLowPriority() + && (mUserLocked || mContainingNotification.isGroupExpansionChanging()); + final boolean dividersVisible = (mChildrenExpanded && mShowDividersWhenExpanded) + || (isExpanding && !mHideDividersDuringExpand); for (int i = 0; i < childCount; i++) { ExpandableNotificationRow child = mAttachedChildren.get(i); ExpandableViewState viewState = child.getViewState(); @@ -789,10 +789,10 @@ public class NotificationChildrenContainer extends ViewGroup { int childCount = mAttachedChildren.size(); ViewState tmpState = new ViewState(); float expandFraction = getGroupExpandFraction(); - final boolean dividersVisible = mUserLocked && !showingAsLowPriority() - || (mChildrenExpanded && mShowDividersWhenExpanded) - || (mContainingNotification.isGroupExpansionChanging() - && !mHideDividersDuringExpand); + final boolean isExpanding = !showingAsLowPriority() + && (mUserLocked || mContainingNotification.isGroupExpansionChanging()); + final boolean dividersVisible = (mChildrenExpanded && mShowDividersWhenExpanded) + || (isExpanding && !mHideDividersDuringExpand); for (int i = childCount - 1; i >= 0; i--) { ExpandableNotificationRow child = mAttachedChildren.get(i); ExpandableViewState viewState = child.getViewState();