correct mediaplayer initialization

This commit is contained in:
Domingos Lopes 2016-03-26 12:55:12 -04:00
parent 40fc7b4816
commit 1ca0c1214f
1 changed files with 2 additions and 1 deletions

View File

@ -281,7 +281,7 @@ public class PlaybackService extends Service implements SharedPreferences.OnShar
castMgr.addCastConsumer(castConsumer);
isCasting = castMgr.isConnected();
if (isCasting) {
onCastAppConnected(true);
onCastAppConnected(false);
} else {
mediaPlayer = new LocalPSMP(this, mediaPlayerCallback);
}
@ -1611,6 +1611,7 @@ public class PlaybackService extends Service implements SharedPreferences.OnShar
};
private void onCastAppConnected(boolean wasLaunched) {
//TODO deal with wasLaunched == false
Log.d(TAG, "A cast device application was connected");
isCasting = true;
if (mediaPlayer != null) {