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

Commit cf18c3c2 authored by Tony Wickham's avatar Tony Wickham
Browse files

Only check for badge setting on notification on O+

Bug: 33553066
Change-Id: I20b991ae23c92c81510986191c05426ea72d273b
parent 12fec498
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.support.annotation.Nullable;
import android.support.v4.util.Pair;

import com.android.launcher3.LauncherModel;
import com.android.launcher3.Utilities;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.util.PackageUserKey;

@@ -214,10 +215,12 @@ public class NotificationListener extends NotificationListenerService {
    }

    private boolean shouldBeFilteredOut(StatusBarNotification sbn) {
        if (Utilities.isAtLeastO()) {
            getCurrentRanking().getRanking(sbn.getKey(), mTempRanking);
            if (!mTempRanking.canShowBadge()) {
                return true;
            }
        }
        Notification notification = sbn.getNotification();
        boolean isGroupHeader = (notification.flags & Notification.FLAG_GROUP_SUMMARY) != 0;
        return (notification.contentIntent == null || isGroupHeader);