try getting the default song cover if it got recycled before usage

This commit is contained in:
tibbi 2018-03-09 23:32:17 +01:00
parent 5c9e3dc1f1
commit cb2d7382d8

View file

@ -331,6 +331,10 @@ class MusicService : Service(), MediaPlayer.OnPreparedListener, MediaPlayer.OnEr
}
}
if (mCurrSongCover?.isRecycled == true) {
mCurrSongCover = resources.getColoredBitmap(R.drawable.ic_headset, config.textColor)
}
val notification = NotificationCompat.Builder(this)
.setStyle(android.support.v4.media.app.NotificationCompat.MediaStyle().setShowActionsInCompactView(playPauseButtonPosition, nextButtonPosition))
.setContentTitle(title)