Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/NodeController.kt +12 −0 Original line number Diff line number Diff line Loading @@ -41,17 +41,29 @@ interface NodeController { fun getChildCount(): Int = 0 /** Called to add a child to this view */ fun addChildAt(child: NodeController, index: Int) { throw RuntimeException("Not supported") } /** Called to move one of this view's current children to a new position */ fun moveChildTo(child: NodeController, index: Int) { throw RuntimeException("Not supported") } /** Called to remove one of this view's current children */ fun removeChild(child: NodeController, isTransfer: Boolean) { throw RuntimeException("Not supported") } /** Called when this view has been added */ fun onViewAdded() {} /** Called when this view has been moved */ fun onViewMoved() {} /** Called when this view has been removed */ fun onViewRemoved() {} } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/SectionHeaderController.kt +4 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,10 @@ internal class SectionHeaderNodeControllerImpl @Inject constructor( _view?.setOnClearAllClickListener(listener) } override fun onViewAdded() { headerView?.isContentVisible = true } override val view: View get() = _view!! } No newline at end of file packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/ShadeViewDiffer.kt +3 −0 Original line number Diff line number Diff line Loading @@ -215,13 +215,16 @@ private class ShadeNode( fun addChildAt(child: ShadeNode, index: Int) { controller.addChildAt(child.controller, index) child.controller.onViewAdded() } fun moveChildTo(child: ShadeNode, index: Int) { controller.moveChildTo(child.controller, index) child.controller.onViewMoved() } fun removeChild(child: ShadeNode, isTransfer: Boolean) { controller.removeChild(child.controller, isTransfer) child.controller.onViewRemoved() } } packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java +12 −0 Original line number Diff line number Diff line Loading @@ -267,6 +267,18 @@ public class ExpandableNotificationRowController implements NotifViewController } } @Override public void onViewAdded() { } @Override public void onViewMoved() { } @Override public void onViewRemoved() { } @Override public int getChildCount() { final List<ExpandableNotificationRow> mChildren = mView.getAttachedChildren(); Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/render/ShadeViewDifferTest.java +12 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,18 @@ public class ShadeViewDifferTest extends SysuiTestCase { public void removeChild(@NonNull NodeController child, boolean isTransfer) { view.removeView(child.getView()); } @Override public void onViewAdded() { } @Override public void onViewMoved() { } @Override public void onViewRemoved() { } } private static class SpecBuilder { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/NodeController.kt +12 −0 Original line number Diff line number Diff line Loading @@ -41,17 +41,29 @@ interface NodeController { fun getChildCount(): Int = 0 /** Called to add a child to this view */ fun addChildAt(child: NodeController, index: Int) { throw RuntimeException("Not supported") } /** Called to move one of this view's current children to a new position */ fun moveChildTo(child: NodeController, index: Int) { throw RuntimeException("Not supported") } /** Called to remove one of this view's current children */ fun removeChild(child: NodeController, isTransfer: Boolean) { throw RuntimeException("Not supported") } /** Called when this view has been added */ fun onViewAdded() {} /** Called when this view has been moved */ fun onViewMoved() {} /** Called when this view has been removed */ fun onViewRemoved() {} } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/SectionHeaderController.kt +4 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,10 @@ internal class SectionHeaderNodeControllerImpl @Inject constructor( _view?.setOnClearAllClickListener(listener) } override fun onViewAdded() { headerView?.isContentVisible = true } override val view: View get() = _view!! } No newline at end of file
packages/SystemUI/src/com/android/systemui/statusbar/notification/collection/render/ShadeViewDiffer.kt +3 −0 Original line number Diff line number Diff line Loading @@ -215,13 +215,16 @@ private class ShadeNode( fun addChildAt(child: ShadeNode, index: Int) { controller.addChildAt(child.controller, index) child.controller.onViewAdded() } fun moveChildTo(child: ShadeNode, index: Int) { controller.moveChildTo(child.controller, index) child.controller.onViewMoved() } fun removeChild(child: ShadeNode, isTransfer: Boolean) { controller.removeChild(child.controller, isTransfer) child.controller.onViewRemoved() } }
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java +12 −0 Original line number Diff line number Diff line Loading @@ -267,6 +267,18 @@ public class ExpandableNotificationRowController implements NotifViewController } } @Override public void onViewAdded() { } @Override public void onViewMoved() { } @Override public void onViewRemoved() { } @Override public int getChildCount() { final List<ExpandableNotificationRow> mChildren = mView.getAttachedChildren(); Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/collection/render/ShadeViewDifferTest.java +12 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,18 @@ public class ShadeViewDifferTest extends SysuiTestCase { public void removeChild(@NonNull NodeController child, boolean isTransfer) { view.removeView(child.getView()); } @Override public void onViewAdded() { } @Override public void onViewMoved() { } @Override public void onViewRemoved() { } } private static class SpecBuilder { Loading