Skip to content

Commit

Permalink
Added large bitmap
Browse files Browse the repository at this point in the history
  • Loading branch information
deepak140596 committed Sep 12, 2019
1 parent d7b2d22 commit 6e7c423
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class LocalPlayer (var weakReferenceService: WeakReference<Service>) : AudioPlay

@Nullable
override fun getCurrentLargeIcon(player: Player, callback: PlayerNotificationManager.BitmapCallback): Bitmap {
return Samples.getBitmap(context, playList[player.currentWindowIndex].bitmapResource)!!
return playList[player.currentWindowIndex].bitmap?: Samples.getBitmap(context, playList[player.currentWindowIndex].bitmapResource)!!
}
}

Expand Down Expand Up @@ -157,7 +157,6 @@ class LocalPlayer (var weakReferenceService: WeakReference<Service>) : AudioPlay
smallIcon?.let {
playerNotificationManager.setSmallIcon(it)
}

}

private fun setupMediaSession(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import ai.rever.goonj.R
import android.content.Context
import androidx.annotation.DrawableRes
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.support.v4.media.MediaDescriptionCompat
import android.support.v4.media.MediaMetadataCompat
import android.os.Bundle
Expand Down Expand Up @@ -75,7 +76,7 @@ object Samples {
var timestamp: Long = 0
var remoteItemId: String? = null
var bitmapResource: Int = R.mipmap.ic_album_art
var bitmap: Bitmap? =null
var bitmap: Bitmap? = null

override fun toString(): String {
return "$title Description: $artist DURATION: $duration INDEX: $index state: $state"
Expand Down

0 comments on commit 6e7c423

Please sign in to comment.