Resolve deprecation warning in MediaSession.

Remove setting of MediaSession flags that are now mandatory and
assumed set.
This commit is contained in:
Hugh Daschbach 2022-08-14 15:19:04 -07:00 committed by Ryan Harg
parent ef01386f16
commit 72b4aea35a
No known key found for this signature in database
GPG Key ID: 89106F3A84E6958C
1 changed files with 0 additions and 2 deletions

View File

@ -9,7 +9,6 @@ import android.support.v4.media.session.MediaSessionCompat
import android.support.v4.media.session.PlaybackStateCompat
import audio.funkwhale.ffa.utils.Command
import audio.funkwhale.ffa.utils.CommandBus
import com.google.android.exoplayer2.ControlDispatcher
import com.google.android.exoplayer2.Player
import com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector
@ -31,7 +30,6 @@ class MediaSession(private val context: Context) {
val session: MediaSessionCompat by lazy {
MediaSessionCompat(context, context.packageName).apply {
setFlags(MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS or MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS)
setPlaybackState(playbackStateBuilder.build())
isActive = true