MediaSession2: Add SessionCallback#onCurrentMediaItemChanged()
Added callback for session to know the currently playing media item has changed. Note that the callback is called in response to the MediaPlayerBase#PlayerEventCallback#onCurrentDataSourceChanged(mpb, dsd is called. Session will translate dsd to the media item and calls onCurrentMediaItemChanged(). Following changes are also included - Removed MediaPlaylistController#getCurrentPlaylistItem(), because currently playing item is managed by the MediaPlayerBase. - Renamed ControllerCallback#onCurrentPlaylistItemChanged() to the ControllerCallback#onCurrentMediaItemChanged(), to make it more obvious that the event is from MediaPlayerBase, not MediaPlaylistController. - Added SessionCallback#onCurrentMediaItemChanged() Bug: 64098437 Test: Run MediaComponents test Change-Id: I78b124a7da0f968b097b2576507b9a73e36081ec
Loading
Please register or sign in to comment