From 9410a384a4354162dd406cbc898e58a665c8b05d Mon Sep 17 00:00:00 2001 From: Steve Elliott Date: Wed, 31 Aug 2022 13:39:24 -0400 Subject: [PATCH] Remove NSSL#isChildInInvisibleGroup This method has been made irrelevant with the new pipeline; Notification that would return "true" here are now pruned from the NSSL entirely by the ShadeListBuilder, so this method will always return false. Bug: 145659174 Test: atest SystemUITests Change-Id: I65d67bf90084e704b41774404c83e40200b0331a --- .../stack/NotificationStackScrollLayout.java | 25 ++----------------- 1 file changed, 2 insertions(+), 23 deletions(-) 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 1fb265fea0b11..8b322fcdb8782 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 @@ -2794,10 +2794,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable if (mDebugRemoveAnimation) { Log.d(TAG, "generateRemove " + key + "\nmIsExpanded " + mIsExpanded - + "\nmAnimationsEnabled " + mAnimationsEnabled - + "\n!invisible group " + !isChildInInvisibleGroup(child)); + + "\nmAnimationsEnabled " + mAnimationsEnabled); } - if (mIsExpanded && mAnimationsEnabled && !isChildInInvisibleGroup(child)) { + if (mIsExpanded && mAnimationsEnabled) { if (!mChildrenToAddAnimated.contains(child)) { if (mDebugRemoveAnimation) { Log.d(TAG, "needsAnimation = true " + key); @@ -2845,26 +2844,6 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable return hasAddEvent && mAddedHeadsUpChildren.contains(child); } - // TODO (b/162832756): remove since this won't happen in new pipeline (we prune groups in - // ShadeListBuilder) - /** - * @param child the child to query - * @return whether a view is not a top level child but a child notification and that group is - * not expanded - */ - @ShadeViewRefactor(RefactorComponent.ADAPTER) - private boolean isChildInInvisibleGroup(View child) { - if (child instanceof ExpandableNotificationRow) { - ExpandableNotificationRow row = (ExpandableNotificationRow) child; - NotificationEntry groupSummary = - mGroupMembershipManager.getGroupSummary(row.getEntry()); - if (groupSummary != null && groupSummary.getRow() != row) { - return row.getVisibility() == View.INVISIBLE; - } - } - return false; - } - /** * Updates the scroll position when a child was removed *