From c1fd03df7403019143f503bbe208d73cabc11243 Mon Sep 17 00:00:00 2001 From: tonihei Date: Thu, 17 Nov 2022 15:53:26 +0000 Subject: [PATCH] Mark broadcast receivers as not exported They are called from the system only and don't need to be exported to be visible to other apps. PiperOrigin-RevId: 489210264 --- .../android/exoplayer2/ui/PlayerNotificationManager.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java index 316343d790..a129954bc4 100644 --- a/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java +++ b/library/ui/src/main/java/com/google/android/exoplayer2/ui/PlayerNotificationManager.java @@ -1162,8 +1162,7 @@ public class PlayerNotificationManager { Notification notification = builder.build(); notificationManager.notify(notificationId, notification); if (!isNotificationStarted) { - // TODO(b/197817693): Explicitly indicate whether the receiver should be exported. - context.registerReceiver(notificationBroadcastReceiver, intentFilter); + Util.registerReceiverNotExported(context, notificationBroadcastReceiver, intentFilter); } if (notificationListener != null) { // Always pass true for ongoing with the first notification to tell a service to go into