Skip to content

Commit

Permalink
Mark broadcast receivers as not exported
Browse files Browse the repository at this point in the history
They are called from the system only and don't need to be exported
to be visible to other apps.

PiperOrigin-RevId: 489210264
  • Loading branch information
tonihei authored and microkatz committed Nov 21, 2022
1 parent 7e82d4e commit c1fd03d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1162,8 +1162,7 @@ private void startOrUpdateNotification(Player player, @Nullable Bitmap bitmap) {
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
Expand Down

0 comments on commit c1fd03d

Please sign in to comment.