RouteDisplayState

data class RouteDisplayState(val routes: List<RouteDisplayInfo> = emptyList(), val selectedIndex: Int = 0, val destinationTitle: String = "")

State for route display on Android Auto.

This state is updated by the phone app when routes are computed on the phone (not from Android Auto search). Android Auto observes this state via StateFlow to display route options in the navigation template's route list.

Flow

  1. User initiates route computation on phone (search destination, tap "Go")

  2. Phone computes routes via existing PlanRouteViewModel flow

  3. Phone's onRoutesSet callback fires → updates this state via holder

  4. Android Auto observes StateFlow → updates UI with route list panel

  5. User can see route options on AA (1/3 of screen on left side)

Key Difference from Step 4c

This is for phone-initiated route computation, not AA-initiated. When routes are computed on the phone, they are mirrored to AA for display.

Constructors

Link copied to clipboard
constructor(routes: List<RouteDisplayInfo> = emptyList(), selectedIndex: Int = 0, destinationTitle: String = "")

Properties

Link copied to clipboard

Name of the destination (shown in AA header)

Link copied to clipboard

Returns true if routes are available for display.

Link copied to clipboard

List of route display info (empty when no routes computed)

Link copied to clipboard

Currently selected route index (0-based)