From f0c57b71eca299bf520c350b3921b7f0899da7e3 Mon Sep 17 00:00:00 2001 From: Beverly Date: Thu, 10 Sep 2020 10:14:27 -0400 Subject: [PATCH] Update notif ranking on consolidated policy change Test: manual 1. Turn on DND that doesn't suppress vis effects 2. Turn on Bedtime Mode Observe: notifications are hidden from Bedtime mode Fixes: 167011205 Change-Id: I7e383182e14a26830d185d3a233518ee7aecda24 --- .../server/notification/NotificationManagerService.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java index f8d54adbeb5b0..e42dd359dad13 100755 --- a/services/core/java/com/android/server/notification/NotificationManagerService.java +++ b/services/core/java/com/android/server/notification/NotificationManagerService.java @@ -1938,6 +1938,13 @@ public class NotificationManagerService extends SystemService { }); } + @Override + void onConsolidatedPolicyChanged() { + Binder.withCleanCallingIdentity(() -> { + mRankingHandler.requestSort(); + }); + } + @Override void onAutomaticRuleStatusChanged(int userId, String pkg, String id, int status) { Binder.withCleanCallingIdentity(() -> {