Reuse a given MediaSessionCompat instead of creating another one
When MediaSessionCompat is set to MediaRouter, previous implementation
tries to extract the framework's MediaSession from it and recreate
another instance of MediaSessionCompat. This approach is not only
redundant but likely to override a previously set callback of
MediaSession. This change will just reuse the given MediaSessionCompat.
Bug: 34251045
Test: Tested with the music app and verified the playback control works.
Change-Id: I0b215c4396e70f5b70124ceb5752dd250cd66de5
2 files changed