Package com.tomtom.ivi.platform.systemui.api.common.frontendcoordinator.panelcoordination

Types

Link copied to clipboard
typealias AnyPanelCollection = Collection<AnyPanel>

Convenience alias for a collection of AnyPanels.

Functions

Link copied to clipboard
fun LiveData<out Collection<AnyPanel>>.mapToActiveExpandedProcessPanel(): LiveData<ExpandedProcessPanel?>

Maps a collection containing all AnyPanels of all Frontends to the active ExpandedProcessPanel. If multiple ExpandedProcessPanels are present in the collection, the active one is considered the newest one.

Link copied to clipboard
fun LiveData<out Collection<AnyPanel>>.mapToActiveMainProcessPanel(): LiveData<MainProcessPanel?>

Maps a collection containing all AnyPanels of all Frontends to the active MainProcessPanel. In case multiple MainProcessPanels are present in the collection, the active one is considered the one with the highest MainProcessPanel.priority.

Link copied to clipboard
fun LiveData<out AnyPanelCollection>.mapToActiveModalPanelStackData(): LiveData<ModalPanelStackData>

Maps a collection containing all AnyPanels of all Frontends to an active ModalPanelStackData.

Link copied to clipboard
fun LiveData<out AnyPanelCollection>.mapToActiveTaskPanelStackData(): LiveData<TaskPanelStackData>

Maps a collection containing all AnyPanels of all Frontends to an active TaskPanelStackData.

Link copied to clipboard
fun LiveData<out Collection<AnyPanel>>.mapToNotificationPanelData(notificationSuppressionPolicy: LiveData<NotificationSuppressionPolicy>, showSuppressedNotifications: LiveData<Boolean>): LiveData<NotificationPanelData>

Maps a collection containing all AnyPanels of all Frontends to a NotificationPanelData that indicates which NotificationPanels to show and other relevant information.

Link copied to clipboard
inline fun <P : AnyPanel> LiveData<out Collection<AnyPanel>>.mapToSingle(): LiveData<P?>

Maps a collection containing all AnyPanels of all Frontends to a single Panel of type P. This mapping assumes there cannot be multiple instances of type P and will throw an IllegalStateException if it does encounter multiple ones.

Link copied to clipboard
inline fun <P : AnyPanel> LiveData<out AnyPanelCollection>.mapToSortedList(comparator: Comparator<in P> = compareBy(AnyPanel::id)): LiveData<PanelList<P>>

Maps a collection containing all AnyPanels of all Frontends to a PanelList containing all Panels of type P, sorted by comparator. If no comparator is provided, the Panels will be sorted based on Panel.id from oldest to newest.

Link copied to clipboard
fun LiveData<MainProcessPanel?>.takeIfPriorityIsAtLeast(minimumPriority: MainProcessPanel.Priority): LiveData<MainProcessPanel?>

Takes a MainProcessPanel only if its priority is at least minimumPriority. When the MainProcessPanel.Priority of the given panel is lower than the given minimumPriority, it is considered not relevant and it will be ignored, either until its priority increases, or until a new MainProcessPanel is given.