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 Tofunmi Adigun-Hameed
parent 09b474a519
commit 806bca4191

View File

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