packages/SystemUI/docs/media-controls.md
[TOC]
Describe how events flow through the media controls pipeline, and provide a high level overview of what the different components do.
MediaDataManager and ResumeMediaBrowser implement MediaDataManager.Listener and receive onMediaDataLoaded and onMediaDataRemoved eventsFiles under systemui/media/:
dialog/
qs_media_light_source). Should be reusable in other layouts.computePosition() for the seekbar (to avoid continually polling the PlaybackState, which involves binder calls)MediaHostMediaDataManager and MediaDeviceManager, so that downstream listeners will have device infoMediaHost and MediaCarouselController), while they should be added via MediaDataManager.addListener(), will actually be listening to this outputMediaDataPlaybackState and marks controls inactive after the media has been paused/stopped for 10 minutes (value can be adjusted locally with adb shell setprop debug.sysui.media_timeout [ms])MediaBrowserService for the app. If successful, sends the information back to the MediaDataManagerMediaBrowserService components found this way, and queries them for recent media on boot or user changeMediaBrowser to determine whether SystemUI is able to connect and find a recent MediaItemOther useful documents: