Temporarily suppress missing permission lint in session demo

#minor-release

PiperOrigin-RevId: 529370535
(cherry picked from commit 0f398d511dda9e89db64c841329a3938ea38bb62)
This commit is contained in:
ibaker 2023-05-04 11:27:54 +00:00 committed by Ian Baker
parent 375cdb2e22
commit 7a1d7bf5ea

View File

@ -15,6 +15,7 @@
*/
package androidx.media3.demo.session
import android.annotation.SuppressLint
import android.app.NotificationChannel
import android.app.NotificationManager
import android.app.PendingIntent.*
@ -277,6 +278,7 @@ class PlaybackService : MediaLibraryService() {
* by a media controller to resume playback when the {@link MediaSessionService} is in the
* background.
*/
@SuppressLint("MissingPermission") // TODO: b/280766358 - Request this permission at runtime.
override fun onForegroundServiceStartNotAllowedException() {
val notificationManagerCompat = NotificationManagerCompat.from(this@PlaybackService)
ensureNotificationChannel(notificationManagerCompat)