diff options
| author | 2020-07-22 13:13:29 -0400 | |
|---|---|---|
| committer | 2020-07-24 18:56:31 +0000 | |
| commit | dfd9f17703c9d2eee22ef8634fceb3e0b46d69fc (patch) | |
| tree | 81c892e8880d01c6c36d66ebbf8a1c09eca95d25 /packages/SystemUI/src | |
| parent | e303dd658d24259a8ac25a59f9e2db11e177e99b (diff) | |
Ignore GONE views in shade when processing sections
Fixes: 161606040
Test: atest
Change-Id: I8ab108aea23ea6a139f758abdaf222f5f3641104
Diffstat (limited to 'packages/SystemUI/src')
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt index c87b9986ca55..56238d0a1b82 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationSectionsManager.kt @@ -326,6 +326,7 @@ class NotificationSectionsManager @Inject internal constructor( // shade. for (i in parent.childCount - 1 downTo -1) { val child: View? = parent.getChildAt(i) + child?.let { logShadeChild(i, child) // If this child is a header, update the tracked positions @@ -339,7 +340,8 @@ class NotificationSectionsManager @Inject internal constructor( } } - val row = child as? ExpandableNotificationRow + val row = (child as? ExpandableNotificationRow) + ?.takeUnless { it.visibility == View.GONE } // Is there a section discontinuity? This usually occurs due to HUNs inIncomingSection = inIncomingSection || nextBucket?.let { next -> @@ -386,7 +388,7 @@ class NotificationSectionsManager @Inject internal constructor( // Offset the target to account for the current position of the people header. peopleState?.targetPosition = peopleState?.currentPosition?.let { current -> - peopleState?.targetPosition?.let { target -> + peopleState.targetPosition?.let { target -> if (current < target) target - 1 else target } } |