Loading services/core/java/com/android/server/notification/NotificationManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3610,7 +3610,7 @@ public class NotificationManagerService extends SystemService { NotificationRecord r = mNotificationsByKey.get(adjustment.getKey()); if (r != null && mAssistants.isSameUser(token, r.getUserId())) { applyAdjustment(r, adjustment); r.applyAdjustments(); r.applyImportanceFromAdjustments(); if (r.getImportance() == IMPORTANCE_NONE) { cancelNotificationsFromListener(token, new String[]{r.getKey()}); } else { Loading services/core/java/com/android/server/notification/NotificationRecord.java +12 −0 Original line number Diff line number Diff line Loading @@ -664,6 +664,18 @@ public final class NotificationRecord { .addTaggedData(MetricsEvent.ADJUSTMENT_KEY_SMART_REPLIES, getSmartReplies().size())); } } applyImportanceFromAdjustments(); } } /** * Update importance from the adjustment. */ public void applyImportanceFromAdjustments() { synchronized (mAdjustments) { for (Adjustment adjustment : mAdjustments) { Bundle signals = adjustment.getSignals(); if (signals.containsKey(Adjustment.KEY_IMPORTANCE)) { int importance = signals.getInt(Adjustment.KEY_IMPORTANCE); importance = Math.max(IMPORTANCE_UNSPECIFIED, importance); Loading Loading
services/core/java/com/android/server/notification/NotificationManagerService.java +1 −1 Original line number Diff line number Diff line Loading @@ -3610,7 +3610,7 @@ public class NotificationManagerService extends SystemService { NotificationRecord r = mNotificationsByKey.get(adjustment.getKey()); if (r != null && mAssistants.isSameUser(token, r.getUserId())) { applyAdjustment(r, adjustment); r.applyAdjustments(); r.applyImportanceFromAdjustments(); if (r.getImportance() == IMPORTANCE_NONE) { cancelNotificationsFromListener(token, new String[]{r.getKey()}); } else { Loading
services/core/java/com/android/server/notification/NotificationRecord.java +12 −0 Original line number Diff line number Diff line Loading @@ -664,6 +664,18 @@ public final class NotificationRecord { .addTaggedData(MetricsEvent.ADJUSTMENT_KEY_SMART_REPLIES, getSmartReplies().size())); } } applyImportanceFromAdjustments(); } } /** * Update importance from the adjustment. */ public void applyImportanceFromAdjustments() { synchronized (mAdjustments) { for (Adjustment adjustment : mAdjustments) { Bundle signals = adjustment.getSignals(); if (signals.containsKey(Adjustment.KEY_IMPORTANCE)) { int importance = signals.getInt(Adjustment.KEY_IMPORTANCE); importance = Math.max(IMPORTANCE_UNSPECIFIED, importance); Loading