diff options
| author | 2018-12-10 15:59:08 +0000 | |
|---|---|---|
| committer | 2018-12-10 15:59:08 +0000 | |
| commit | c9f86d679d36d93d73316ed1e5dbb62a196742c0 (patch) | |
| tree | 5ce2fd01c82a6b8c74e85b7ffbb92f9e5dd9876b | |
| parent | 451db48526e2227fc0044279fb728151e6a27023 (diff) | |
| parent | aeff15f748c85ae340aed3f2ece5d3748ef46945 (diff) | |
Merge "Checks child importance when determining high priority-ness."
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationData.java | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationData.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationData.java index 3f8583c6241b..d9fe98257d4c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationData.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationData.java @@ -815,9 +815,18 @@ public class NotificationData { public boolean isHighPriority(StatusBarNotification statusBarNotification) { if (mRankingMap != null) { getRanking(statusBarNotification.getKey(), mTmpRanking); - return mTmpRanking.getImportance() >= NotificationManager.IMPORTANCE_DEFAULT + if (mTmpRanking.getImportance() >= NotificationManager.IMPORTANCE_DEFAULT || statusBarNotification.getNotification().isForegroundService() - || statusBarNotification.getNotification().hasMediaSession(); + || statusBarNotification.getNotification().hasMediaSession()) { + return true; + } + if (mGroupManager.isSummaryOfGroup(statusBarNotification)) { + for (Entry child : mGroupManager.getLogicalChildren(statusBarNotification)) { + if (isHighPriority(child.notification)) { + return true; + } + } + } } return false; } |