A rule that responds to system UI menu items being clicked by opening or closing TaskPanels. Depending on the state and behavior of available Frontends, this rule behaves in the following manner:

Note that this rule does not close other Frontends' TaskPanels after calling Frontend.openTaskPanels. Enforcing only a single TaskPanel stack can be independently configured, for example through SingleTaskPanelStackFrontendCoordinationRule.



A function that allows the rule to get a Frontend (creating it if it doesn't exist yet) based on the clicked MenuItem.Id. May return null when no Frontend belonging to the MenuItem.Id was present in this system UI's Frontend registry.


constructor(getOrCreateFrontend: (MenuItem.Id) -> Frontend?)


Link copied to clipboard
open override fun activate(lifecycleOwner: LifecycleOwner, iviServiceProvider: IviInstanceBoundIviServiceProvider, frontends: LiveData<out Collection<Frontend>>)

Actives the rule within the scope of the given lifecycleOwner.