From b7910857a9d7421497017306900951f03ea01cfb Mon Sep 17 00:00:00 2001 From: Jacqueline Bronger Date: Fri, 10 Jun 2022 14:59:12 +0200 Subject: [PATCH] Only show TV PiP Notification once The user will no longer see a new notification pop up when the notification content is changed (e.g. when expanding/collapsing the PiP), but the NotificationListenerService will still receive the updated content. Bug: 235474366 Test: manual - toggling expanded PiP does not show a new notification + NotificationHandler still receives an onNotificationPosted call Change-Id: I5cf7e467c695499bb5b5dfc6cecddc10694b8e02 --- .../com/android/wm/shell/pip/tv/TvPipNotificationController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipNotificationController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipNotificationController.java index 61a609d9755e5..e3308f0763a04 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipNotificationController.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/tv/TvPipNotificationController.java @@ -114,6 +114,7 @@ public class TvPipNotificationController { .setOngoing(true) .setCategory(Notification.CATEGORY_SYSTEM) .setShowWhen(true) + .setOnlyAlertOnce(true) .setSmallIcon(R.drawable.pip_icon) .setAllowSystemGeneratedContextualActions(false) .setContentIntent(createPendingIntent(context, ACTION_FULLSCREEN))