MediaSourceViewModel cleanup
- turned PlaybackViewModel MediaSourceViewModel into singletons tied to
the application to provide a single source of truth as
MediaDispatcherActivity was creating its own MediaSourceViewModel !
- made MediaSourceViewModel maintain a consistent state without using
LiveData objects (only using those to broadcast the state).
- turned MediaBrowserConnector into a non LiveData helper that sends
updates through a regular callback. Also protected it against obsolete
MediaBrowserCompat.ConnectionCallback calls.
- MediaSourceViewModel only uses the MediaBrowser token to get the
MediaController, instead of preferring the active sessions from
MediaSessionManager
Bug: 117997227
Test: manual
Change-Id: Ia61ae9dbacbf7296ca7d81a609ecda3a6665db66
13 files changed