Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinatorTest.kt +2 −0 Original line number Diff line number Diff line Loading @@ -782,6 +782,7 @@ class VisualStabilityCoordinatorTest(flags: FlagsParameterization) : SysuiTestCa whenever(nonHeadsUpGroupSummary.key).thenReturn("non_heads_up_group_key") whenever(nonHeadsUpGroupSummary.isSummaryWithChildren).thenReturn(true) val nonHeadsUpGroupEntry: GroupEntry = mock() whenever(nonHeadsUpGroupEntry.asListEntry()).thenReturn(nonHeadsUpGroupEntry) whenever(nonHeadsUpGroupEntry.summary).thenReturn(nonHeadsUpGroupSummary) whenever(nonHeadsUpGroupEntry.representativeEntry).thenReturn(nonHeadsUpGroupSummary) Loading Loading @@ -880,6 +881,7 @@ class VisualStabilityCoordinatorTest(flags: FlagsParameterization) : SysuiTestCa whenever(groupSummary.isSummaryWithChildren).thenReturn(true) val nonHeadsUpGroupEntry: GroupEntry = mock() whenever(nonHeadsUpGroupEntry.asListEntry()).thenReturn(nonHeadsUpGroupEntry) whenever(nonHeadsUpGroupEntry.summary).thenReturn(groupSummary) whenever(nonHeadsUpGroupEntry.representativeEntry).thenReturn(groupSummary) Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/BundleEntry.kt +1 −2 Original line number Diff line number Diff line Loading @@ -51,8 +51,7 @@ class BundleEntry(spec: BundleSpec) : PipelineEntry(spec.key) { _children.clear() } /** @return Null because bundles do not have an associated NotificationEntry. */ override fun getRepresentativeEntry(): NotificationEntry? { override fun asListEntry(): ListEntry? { return null } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/ListDumper.java +5 −2 Original line number Diff line number Diff line Loading @@ -119,12 +119,15 @@ public class ListDumper { .append(index.length() == 1 ? " " : "") .append(logKey(entry)); final ListEntry listEntry = entry.asListEntry(); final NotificationEntry notifEntry = listEntry == null ? null : listEntry.getRepresentativeEntry(); if (includeParent) { sb.append(" (parent=") .append(logKey(entry.getParent())) .append(")"); NotificationEntry notifEntry = entry.getRepresentativeEntry(); if (notifEntry != null) { sb.append(" rank=") .append(notifEntry.getRanking().getRank()); Loading @@ -137,7 +140,7 @@ public class ListDumper { } if (includeRecordKeeping) { NotificationEntry notifEntry = requireNonNull(entry.getRepresentativeEntry()); requireNonNull(notifEntry); StringBuilder rksb = new StringBuilder(); if (!notifEntry.mLifetimeExtenders.isEmpty()) { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/ListEntry.java +5 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,11 @@ public abstract class ListEntry extends PipelineEntry { */ public abstract @Nullable NotificationEntry getRepresentativeEntry(); @Override public final ListEntry asListEntry() { return this; } @Nullable public PipelineEntry getParent() { return mAttachState.getParent(); } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/PipelineEntry.java +2 −5 Original line number Diff line number Diff line Loading @@ -51,12 +51,9 @@ public abstract class PipelineEntry { } /** * @return The representative NotificationEntry: * for NotificationEntry, return itself * for GroupEntry, return the summary NotificationEntry, or null if it does not exist * for BundleEntry, return null * @return This {@link PipelineEntry} as a {@link ListEntry}, or {@code null}. */ public abstract @Nullable NotificationEntry getRepresentativeEntry(); public abstract @Nullable ListEntry asListEntry(); /** * @return NotifSection that ShadeListBuilder assigned to this PipelineEntry. Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/collection/coordinator/VisualStabilityCoordinatorTest.kt +2 −0 Original line number Diff line number Diff line Loading @@ -782,6 +782,7 @@ class VisualStabilityCoordinatorTest(flags: FlagsParameterization) : SysuiTestCa whenever(nonHeadsUpGroupSummary.key).thenReturn("non_heads_up_group_key") whenever(nonHeadsUpGroupSummary.isSummaryWithChildren).thenReturn(true) val nonHeadsUpGroupEntry: GroupEntry = mock() whenever(nonHeadsUpGroupEntry.asListEntry()).thenReturn(nonHeadsUpGroupEntry) whenever(nonHeadsUpGroupEntry.summary).thenReturn(nonHeadsUpGroupSummary) whenever(nonHeadsUpGroupEntry.representativeEntry).thenReturn(nonHeadsUpGroupSummary) Loading Loading @@ -880,6 +881,7 @@ class VisualStabilityCoordinatorTest(flags: FlagsParameterization) : SysuiTestCa whenever(groupSummary.isSummaryWithChildren).thenReturn(true) val nonHeadsUpGroupEntry: GroupEntry = mock() whenever(nonHeadsUpGroupEntry.asListEntry()).thenReturn(nonHeadsUpGroupEntry) whenever(nonHeadsUpGroupEntry.summary).thenReturn(groupSummary) whenever(nonHeadsUpGroupEntry.representativeEntry).thenReturn(groupSummary) Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/BundleEntry.kt +1 −2 Original line number Diff line number Diff line Loading @@ -51,8 +51,7 @@ class BundleEntry(spec: BundleSpec) : PipelineEntry(spec.key) { _children.clear() } /** @return Null because bundles do not have an associated NotificationEntry. */ override fun getRepresentativeEntry(): NotificationEntry? { override fun asListEntry(): ListEntry? { return null } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/ListDumper.java +5 −2 Original line number Diff line number Diff line Loading @@ -119,12 +119,15 @@ public class ListDumper { .append(index.length() == 1 ? " " : "") .append(logKey(entry)); final ListEntry listEntry = entry.asListEntry(); final NotificationEntry notifEntry = listEntry == null ? null : listEntry.getRepresentativeEntry(); if (includeParent) { sb.append(" (parent=") .append(logKey(entry.getParent())) .append(")"); NotificationEntry notifEntry = entry.getRepresentativeEntry(); if (notifEntry != null) { sb.append(" rank=") .append(notifEntry.getRanking().getRank()); Loading @@ -137,7 +140,7 @@ public class ListDumper { } if (includeRecordKeeping) { NotificationEntry notifEntry = requireNonNull(entry.getRepresentativeEntry()); requireNonNull(notifEntry); StringBuilder rksb = new StringBuilder(); if (!notifEntry.mLifetimeExtenders.isEmpty()) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/ListEntry.java +5 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,11 @@ public abstract class ListEntry extends PipelineEntry { */ public abstract @Nullable NotificationEntry getRepresentativeEntry(); @Override public final ListEntry asListEntry() { return this; } @Nullable public PipelineEntry getParent() { return mAttachState.getParent(); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/PipelineEntry.java +2 −5 Original line number Diff line number Diff line Loading @@ -51,12 +51,9 @@ public abstract class PipelineEntry { } /** * @return The representative NotificationEntry: * for NotificationEntry, return itself * for GroupEntry, return the summary NotificationEntry, or null if it does not exist * for BundleEntry, return null * @return This {@link PipelineEntry} as a {@link ListEntry}, or {@code null}. */ public abstract @Nullable NotificationEntry getRepresentativeEntry(); public abstract @Nullable ListEntry asListEntry(); /** * @return NotifSection that ShadeListBuilder assigned to this PipelineEntry. Loading