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

Commit 5ced68ba authored by Christoph Studer's avatar Christoph Studer Committed by Android Git Automerger
Browse files

am cf24e6de: SysUI: Hide grouped notifications

* commit 'cf24e6de68cff14970e57069febd5d6c41c264f4':
  SysUI: Hide grouped notifications
parents 87161a76 c08cd7cc
Loading
Loading
Loading
Loading
+21 −2
Original line number Diff line number Diff line
@@ -311,8 +311,27 @@ public abstract class BaseStatusBar extends SystemUI implements
            mHandler.post(new Runnable() {
                @Override
                public void run() {
                    if (mNotificationData.findByKey(sbn.getKey()) != null ||
                            isHeadsUp(sbn.getKey())) {
                    Notification n = sbn.getNotification();
                    boolean isUpdate = mNotificationData.findByKey(sbn.getKey()) != null
                            || isHeadsUp(sbn.getKey());
                    boolean isGroupedChild = n.getGroup() != null
                            && (n.flags & Notification.FLAG_GROUP_SUMMARY) == 0;
                    if (isGroupedChild) {
                        if (DEBUG) {
                            Log.d(TAG, "Ignoring group child: " + sbn);
                        }
                        // Don't show grouped notifications. If this is an
                        // update, i.e. the notification existed before but
                        // wasn't a group child, remove the old instance.
                        // Otherwise just update the ranking.
                        if (isUpdate) {
                            removeNotificationInternal(sbn.getKey(), rankingMap);
                        } else {
                            updateRankingInternal(rankingMap);
                        }
                        return;
                    }
                    if (isUpdate) {
                        updateNotificationInternal(sbn, rankingMap);
                    } else {
                        addNotificationInternal(sbn, rankingMap);