Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9f86d67 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Checks child importance when determining high priority-ness."

parents 451db485 aeff15f7
Loading
Loading
Loading
Loading
+11 −2
Original line number Original line Diff line number Diff line
@@ -815,9 +815,18 @@ public class NotificationData {
    public boolean isHighPriority(StatusBarNotification statusBarNotification) {
    public boolean isHighPriority(StatusBarNotification statusBarNotification) {
        if (mRankingMap != null) {
        if (mRankingMap != null) {
            getRanking(statusBarNotification.getKey(), mTmpRanking);
            getRanking(statusBarNotification.getKey(), mTmpRanking);
            return mTmpRanking.getImportance() >= NotificationManager.IMPORTANCE_DEFAULT
            if (mTmpRanking.getImportance() >= NotificationManager.IMPORTANCE_DEFAULT
                    || statusBarNotification.getNotification().isForegroundService()
                    || 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;
        return false;
    }
    }