Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java +0 −7 Original line number Diff line number Diff line Loading @@ -676,9 +676,6 @@ public final class NotificationEntry extends ListEntry { return row != null && row.areChildrenExpanded(); } public boolean keepInParent() { return row != null && row.keepInParent(); } //TODO: probably less confusing to say "is group fully visible" public boolean isGroupNotFullyVisible() { Loading @@ -698,10 +695,6 @@ public final class NotificationEntry extends ListEntry { return row != null && row.isSummaryWithChildren(); } public void setKeepInParent(boolean keep) { if (row != null) row.setKeepInParent(keep); } public void onDensityOrFontScaleChanged() { if (row != null) row.onDensityOrFontScaleChanged(); } Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/MediaContainerController.kt +4 −0 Original line number Diff line number Diff line Loading @@ -55,4 +55,8 @@ class MediaContainerController @Inject constructor( override val view: View get() = mediaContainerView!! override fun offerToKeepInParentForAnimation(): Boolean = false override fun removeFromParentIfKeptForAnimation(): Boolean = false override fun resetKeepInParentForAnimation() {} } No newline at end of file packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/NodeController.kt +23 −1 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import java.lang.StringBuilder * below. */ interface NodeController { /** A string that uniquely(ish) represents the node in the tree. Used for debugging. */ val nodeLabel: String Loading Loading @@ -64,6 +65,27 @@ interface NodeController { /** Called when this view has been removed */ fun onViewRemoved() {} /** * Called before removing a node from its parent * * If returned true, the ShadeViewDiffer won't detach this row and the view system is * responsible for ensuring the row is in eventually removed from the parent. * * @return false to opt out from this feature */ fun offerToKeepInParentForAnimation(): Boolean /** * Called before a node is reattached. Removes the view from its parent * if it was flagged to be kept before. * * @return whether it did a removal */ fun removeFromParentIfKeptForAnimation(): Boolean /** Called when a node is being reattached */ fun resetKeepInParentForAnimation() } /** Loading @@ -90,7 +112,7 @@ fun treeSpecToStr(tree: NodeSpec): String { } private fun treeSpecToStrHelper(tree: NodeSpec, sb: StringBuilder, indent: String) { sb.append("${indent}{${tree.controller.nodeLabel}}\n") sb.append("$indent{${tree.controller.nodeLabel}}\n") if (tree.children.isNotEmpty()) { val childIndent = "$indent " for (child in tree.children) { Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/RootNodeController.kt +3 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,9 @@ class RootNodeController( override val view: View ) : NodeController, PipelineDumpable { override val nodeLabel: String = "<root>" override fun offerToKeepInParentForAnimation(): Boolean = false override fun removeFromParentIfKeptForAnimation(): Boolean = false override fun resetKeepInParentForAnimation() {} override fun getChildAt(index: Int): View? { return listContainer.getContainerChildAt(index) Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/SectionHeaderController.kt +3 −0 Original line number Diff line number Diff line Loading @@ -100,4 +100,7 @@ internal class SectionHeaderNodeControllerImpl @Inject constructor( override val view: View get() = _view!! override fun offerToKeepInParentForAnimation(): Boolean = false override fun removeFromParentIfKeptForAnimation(): Boolean = false override fun resetKeepInParentForAnimation() {} } No newline at end of file Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/NotificationEntry.java +0 −7 Original line number Diff line number Diff line Loading @@ -676,9 +676,6 @@ public final class NotificationEntry extends ListEntry { return row != null && row.areChildrenExpanded(); } public boolean keepInParent() { return row != null && row.keepInParent(); } //TODO: probably less confusing to say "is group fully visible" public boolean isGroupNotFullyVisible() { Loading @@ -698,10 +695,6 @@ public final class NotificationEntry extends ListEntry { return row != null && row.isSummaryWithChildren(); } public void setKeepInParent(boolean keep) { if (row != null) row.setKeepInParent(keep); } public void onDensityOrFontScaleChanged() { if (row != null) row.onDensityOrFontScaleChanged(); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/MediaContainerController.kt +4 −0 Original line number Diff line number Diff line Loading @@ -55,4 +55,8 @@ class MediaContainerController @Inject constructor( override val view: View get() = mediaContainerView!! override fun offerToKeepInParentForAnimation(): Boolean = false override fun removeFromParentIfKeptForAnimation(): Boolean = false override fun resetKeepInParentForAnimation() {} } No newline at end of file
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/NodeController.kt +23 −1 Original line number Diff line number Diff line Loading @@ -30,6 +30,7 @@ import java.lang.StringBuilder * below. */ interface NodeController { /** A string that uniquely(ish) represents the node in the tree. Used for debugging. */ val nodeLabel: String Loading Loading @@ -64,6 +65,27 @@ interface NodeController { /** Called when this view has been removed */ fun onViewRemoved() {} /** * Called before removing a node from its parent * * If returned true, the ShadeViewDiffer won't detach this row and the view system is * responsible for ensuring the row is in eventually removed from the parent. * * @return false to opt out from this feature */ fun offerToKeepInParentForAnimation(): Boolean /** * Called before a node is reattached. Removes the view from its parent * if it was flagged to be kept before. * * @return whether it did a removal */ fun removeFromParentIfKeptForAnimation(): Boolean /** Called when a node is being reattached */ fun resetKeepInParentForAnimation() } /** Loading @@ -90,7 +112,7 @@ fun treeSpecToStr(tree: NodeSpec): String { } private fun treeSpecToStrHelper(tree: NodeSpec, sb: StringBuilder, indent: String) { sb.append("${indent}{${tree.controller.nodeLabel}}\n") sb.append("$indent{${tree.controller.nodeLabel}}\n") if (tree.children.isNotEmpty()) { val childIndent = "$indent " for (child in tree.children) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/RootNodeController.kt +3 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,9 @@ class RootNodeController( override val view: View ) : NodeController, PipelineDumpable { override val nodeLabel: String = "<root>" override fun offerToKeepInParentForAnimation(): Boolean = false override fun removeFromParentIfKeptForAnimation(): Boolean = false override fun resetKeepInParentForAnimation() {} override fun getChildAt(index: Int): View? { return listContainer.getContainerChildAt(index) Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/SectionHeaderController.kt +3 −0 Original line number Diff line number Diff line Loading @@ -100,4 +100,7 @@ internal class SectionHeaderNodeControllerImpl @Inject constructor( override val view: View get() = _view!! override fun offerToKeepInParentForAnimation(): Boolean = false override fun removeFromParentIfKeptForAnimation(): Boolean = false override fun resetKeepInParentForAnimation() {} } No newline at end of file