Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
[Android] Fixed a bug where Android Auto would try to autoplay and the
app crashed if there were no current track.
  • Loading branch information
Carlos Perez committed Jul 9, 2022
1 parent d5325fc commit bf31cb6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,9 @@ class MusicService : Service(), IBroadcastObserver, MediaPlayer.EventListener {

@Suppress("BlockingMethodInNonBlockingContext")
private fun play() {
if(currentTrack == null){
return;
}
wasPlaying = false
if (mMediaPlayer!!.media != null) {
mMediaPlayer!!.play()
Expand Down

1 comment on commit bf31cb6

@vercel
Copy link

@vercel vercel bot commented on bf31cb6 Jul 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

soniclair – ./

soniclair-thelinkin3000.vercel.app
soniclair-git-main-thelinkin3000.vercel.app
soniclair.vercel.app

Please sign in to comment.