Fix things to pick a "default media player" as soon as we can so that
connected devices have something to send media commands to. This is
also in line with the spec.
Previously we were not detecting when we didn't have a media player
selected and selecting one.
Test: boot with com.android.music and connect to carkit, check logs
Bug:
36016671
Change-Id: I89175a3d513635d7cf8b75f5010967b99d5490aa
(cherry picked from commit
793470cef61d887cc26ce793e21e411733af8b38)
if (playersChanged) {
mHandler.sendEmptyMessage(MSG_AVAILABLE_PLAYERS_CHANGED_RSP);
- if (newControllers.size() > 0 && (mAddressedMediaPlayer == null)) {
+ if (newControllers.size() > 0 && (mMediaController == null)) {
if (DEBUG)
Log.v(TAG,
"No addressed player but active sessions, taking first.");