Scalable UI for minimized media controls

As part of the Scalable UI multitasking enhancements, Android 17 QPR2 introduces minimized media controls between the system bars. This feature lets original equipment manufacturers configure a modular, space-saving playback widget dedicated to active background media players.

You can control media playback, such as play, pause, and skip, and view track metadata, such as album art and title, directly from the system navigation bar while another application fills the central panel.

Resources

This feature uses a modular architecture within the Scalable UI framework, decoupling core controller logic from display geometry:

  • Core pod library in packages/apps/Car/SystemUI/pods/minimized-controls/: This library contains reusable controller logic and baseline view declarations.
  • Integration library in packages/apps/Car/SystemUI/samples/: Located under MinimizedControlsDynamic/, this library provides custom window layouts, XML panel bounds, and default runtime resource overlay (RRO) configurations.

Implementation

To integrate minimized media controls with XML configurations without adding new system APIs, configure your product layout:

  1. In res/xml/minimized_media_controls_controller.xml, map your minimized media controller ID to the core controller class:

    <!-- res/xml/minimized_media_controls_controller.xml -->
    <Controller id="minimized_media_controls_controller">
        <ControllerName>
            com.android.systemui.car.minimizedcontrols.MinimizedMediaControlsPanelController
        </ControllerName>
        <View>
            com.android.systemui.car.minimizedcontrols.MinimizedMediaControlsView
        </View>
    </Controller>
    
  2. In your release configuration, such as res/xml/minimized_media_controls_panel.xml, configure the window bounds using the <DecorPanel> schema:

    <!-- res/xml/minimized_media_controls_panel.xml -->
    <DecorPanel id="minimized_media_controls_panel"
                defaultVariant="@id/closed"
                displayId="0"
                controller="@xml/minimized_media_controls_controller">
    
        <Variant id="@id/base">
            <Layer layer="101"/>
        </Variant>
    
        <!-- Open View Variant -->
        <Variant id="@id/open" parent="@id/base">
            <Visibility isVisible="true"/>
            <Bounds left="@dimen/minimized_controls_left"
                    width="@dimen/minimized_controls_width"
                    bottom="100%"
                    height="@dimen/navigation_bar_height"/>
        </Variant>
    
        <!-- Closed View Variant -->
        <Variant id="@id/closed" parent="@id/base">
            <Visibility isVisible="false"/>
            <Bounds left="@dimen/minimized_controls_left"
                    top="100%"
                    width="@dimen/minimized_controls_width"
                    height="@dimen/navigation_bar_height"/>
        </Variant>
    
    </DecorPanel>
    
  3. In your samples directory, packages/apps/Car/SystemUI/samples/MinimizedControlsDynamic/res/, build an RRO to override layout dimensions and position anchors to match your custom display geometry.

Requirements and validation

This feature doesn't introduce CDD, GMS, or VSR requirements. You can verify the implementation through automated integration tests and manual tasks.

To automatically verify the feature, run these integration test suites:

  • atest CarSystemUITests:MinimizedMediaControlsPanelControllerTest
  • atest CarSystemUITests:MinimizedMediaControlsViewModelTest

To manually verify the feature on a target automotive device, perform these tasks:

  • Confirm that the minimized panel hides on _System_OnHomeEvent and appears when opening background applications, such as navigation.
  • Confirm that tapping the play, pause, and skip controls triggers playback actions on the active media session.
  • Confirm that album art, title, and artist labels automatically refresh when switching source tracks.