Loading packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +1 −1 Original line number Diff line number Diff line Loading @@ -1075,7 +1075,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi private void handleSummaryDismissalInterception(NotificationEntry summary) { // current children in the row: final List<NotificationEntry> children = summary.getChildren(); final List<NotificationEntry> children = summary.getAttachedNotifChildren(); if (children != null) { for (int i = 0; i < children.size(); i++) { NotificationEntry child = children.get(i); Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationHeaderUtil.java +1 −1 Original line number Diff line number Diff line Loading @@ -148,7 +148,7 @@ public class NotificationHeaderUtil { } public void updateChildrenHeaderAppearance() { List<ExpandableNotificationRow> notificationChildren = mRow.getNotificationChildren(); List<ExpandableNotificationRow> notificationChildren = mRow.getAttachedChildren(); if (notificationChildren == null) { return; } Loading packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java +12 −9 Original line number Diff line number Diff line Loading @@ -307,17 +307,20 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle } ExpandableNotificationRow parent = (ExpandableNotificationRow) view; List<ExpandableNotificationRow> children = parent.getNotificationChildren(); List<ExpandableNotificationRow> children = parent.getAttachedChildren(); List<NotificationEntry> orderedChildren = mTmpChildOrderMap.get(parent.getEntry()); for (int childIndex = 0; orderedChildren != null && childIndex < orderedChildren.size(); childIndex++) { if (orderedChildren == null) { // Not a group continue; } parent.setUntruncatedChildCount(orderedChildren.size()); for (int childIndex = 0; childIndex < orderedChildren.size(); childIndex++) { ExpandableNotificationRow childView = orderedChildren.get(childIndex).getRow(); if (children == null || !children.contains(childView)) { if (childView.getParent() != null) { Log.wtf(TAG, "trying to add a notification child that already has " + "a parent. class:" + childView.getParent().getClass() + "\n child: " + childView); Log.wtf(TAG, "trying to add a notification child that already has " + "a parent. class:" + childView.getParent().getClass() + "\n child: " + childView); // This shouldn't happen. We can recover by removing it though. ((ViewGroup) childView.getParent()).removeView(childView); } Loading Loading @@ -349,7 +352,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle } ExpandableNotificationRow parent = (ExpandableNotificationRow) view; List<ExpandableNotificationRow> children = parent.getNotificationChildren(); List<ExpandableNotificationRow> children = parent.getAttachedChildren(); List<NotificationEntry> orderedChildren = mTmpChildOrderMap.get(parent.getEntry()); if (children != null) { Loading Loading @@ -454,7 +457,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle } if (row.isSummaryWithChildren()) { List<ExpandableNotificationRow> notificationChildren = row.getNotificationChildren(); row.getAttachedChildren(); int size = notificationChildren.size(); for (int i = size - 1; i >= 0; i--) { stack.push(notificationChildren.get(i)); Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -515,7 +515,7 @@ public class NotificationEntryManager implements // always cancelled. We only remove them if they were dismissed by the user. return; } List<NotificationEntry> childEntries = entry.getChildren(); List<NotificationEntry> childEntries = entry.getAttachedNotifChildren(); if (childEntries == null) { return; } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/GroupEntry.java +20 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import com.android.internal.annotations.VisibleForTesting; import com.android.systemui.statusbar.notification.collection.coordinator.PreparationCoordinator; import java.util.ArrayList; import java.util.Collections; Loading @@ -36,6 +37,7 @@ public class GroupEntry extends ListEntry { private final List<NotificationEntry> mUnmodifiableChildren = Collections.unmodifiableList(mChildren); private int mUntruncatedChildCount; @VisibleForTesting public GroupEntry(String key) { Loading @@ -62,6 +64,24 @@ public class GroupEntry extends ListEntry { mSummary = summary; } /** * @see #getUntruncatedChildCount() */ public void setUntruncatedChildCount(int childCount) { mUntruncatedChildCount = childCount; } /** * Get the untruncated number of children from the data model, including those that will not * have views bound. This includes children that {@link PreparationCoordinator} will filter out * entirely when they are beyond the last visible child. * * TODO: This should move to some shared class between the model and view hierarchy */ public int getUntruncatedChildCount() { return mUntruncatedChildCount; } void clearChildren() { mChildren.clear(); } Loading Loading
packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +1 −1 Original line number Diff line number Diff line Loading @@ -1075,7 +1075,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi private void handleSummaryDismissalInterception(NotificationEntry summary) { // current children in the row: final List<NotificationEntry> children = summary.getChildren(); final List<NotificationEntry> children = summary.getAttachedNotifChildren(); if (children != null) { for (int i = 0; i < children.size(); i++) { NotificationEntry child = children.get(i); Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationHeaderUtil.java +1 −1 Original line number Diff line number Diff line Loading @@ -148,7 +148,7 @@ public class NotificationHeaderUtil { } public void updateChildrenHeaderAppearance() { List<ExpandableNotificationRow> notificationChildren = mRow.getNotificationChildren(); List<ExpandableNotificationRow> notificationChildren = mRow.getAttachedChildren(); if (notificationChildren == null) { return; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java +12 −9 Original line number Diff line number Diff line Loading @@ -307,17 +307,20 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle } ExpandableNotificationRow parent = (ExpandableNotificationRow) view; List<ExpandableNotificationRow> children = parent.getNotificationChildren(); List<ExpandableNotificationRow> children = parent.getAttachedChildren(); List<NotificationEntry> orderedChildren = mTmpChildOrderMap.get(parent.getEntry()); for (int childIndex = 0; orderedChildren != null && childIndex < orderedChildren.size(); childIndex++) { if (orderedChildren == null) { // Not a group continue; } parent.setUntruncatedChildCount(orderedChildren.size()); for (int childIndex = 0; childIndex < orderedChildren.size(); childIndex++) { ExpandableNotificationRow childView = orderedChildren.get(childIndex).getRow(); if (children == null || !children.contains(childView)) { if (childView.getParent() != null) { Log.wtf(TAG, "trying to add a notification child that already has " + "a parent. class:" + childView.getParent().getClass() + "\n child: " + childView); Log.wtf(TAG, "trying to add a notification child that already has " + "a parent. class:" + childView.getParent().getClass() + "\n child: " + childView); // This shouldn't happen. We can recover by removing it though. ((ViewGroup) childView.getParent()).removeView(childView); } Loading Loading @@ -349,7 +352,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle } ExpandableNotificationRow parent = (ExpandableNotificationRow) view; List<ExpandableNotificationRow> children = parent.getNotificationChildren(); List<ExpandableNotificationRow> children = parent.getAttachedChildren(); List<NotificationEntry> orderedChildren = mTmpChildOrderMap.get(parent.getEntry()); if (children != null) { Loading Loading @@ -454,7 +457,7 @@ public class NotificationViewHierarchyManager implements DynamicPrivacyControlle } if (row.isSummaryWithChildren()) { List<ExpandableNotificationRow> notificationChildren = row.getNotificationChildren(); row.getAttachedChildren(); int size = notificationChildren.size(); for (int i = size - 1; i >= 0; i--) { stack.push(notificationChildren.get(i)); Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -515,7 +515,7 @@ public class NotificationEntryManager implements // always cancelled. We only remove them if they were dismissed by the user. return; } List<NotificationEntry> childEntries = entry.getChildren(); List<NotificationEntry> childEntries = entry.getAttachedNotifChildren(); if (childEntries == null) { return; } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/GroupEntry.java +20 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.annotation.NonNull; import android.annotation.Nullable; import com.android.internal.annotations.VisibleForTesting; import com.android.systemui.statusbar.notification.collection.coordinator.PreparationCoordinator; import java.util.ArrayList; import java.util.Collections; Loading @@ -36,6 +37,7 @@ public class GroupEntry extends ListEntry { private final List<NotificationEntry> mUnmodifiableChildren = Collections.unmodifiableList(mChildren); private int mUntruncatedChildCount; @VisibleForTesting public GroupEntry(String key) { Loading @@ -62,6 +64,24 @@ public class GroupEntry extends ListEntry { mSummary = summary; } /** * @see #getUntruncatedChildCount() */ public void setUntruncatedChildCount(int childCount) { mUntruncatedChildCount = childCount; } /** * Get the untruncated number of children from the data model, including those that will not * have views bound. This includes children that {@link PreparationCoordinator} will filter out * entirely when they are beyond the last visible child. * * TODO: This should move to some shared class between the model and view hierarchy */ public int getUntruncatedChildCount() { return mUntruncatedChildCount; } void clearChildren() { mChildren.clear(); } Loading