Browse Source

Update media session metadata as soon as track changes.

housekeeping/remove-warnings
Antoine POPINEAU 4 years ago
parent
commit
d2e472d770
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
  1. 3
      app/src/main/java/com/github/apognu/otter/playback/MediaControlsManager.kt

3
app/src/main/java/com/github/apognu/otter/playback/MediaControlsManager.kt

@ -10,6 +10,7 @@ import androidx.core.app.NotificationCompat @@ -10,6 +10,7 @@ import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.media.app.NotificationCompat.MediaStyle
import androidx.media.session.MediaButtonReceiver
import com.github.apognu.otter.Otter
import com.github.apognu.otter.R
import com.github.apognu.otter.activities.MainActivity
import com.github.apognu.otter.utils.AppContext
@ -97,6 +98,8 @@ class MediaControlsManager(val context: Service, private val scope: CoroutineSco @@ -97,6 +98,8 @@ class MediaControlsManager(val context: Service, private val scope: CoroutineSco
NotificationManagerCompat.from(context).notify(AppContext.NOTIFICATION_MEDIA_CONTROL, it)
}
}
Otter.get().mediaSession.connector.invalidateMediaSessionMetadata()
}
}
}

Loading…
Cancel
Save