public static boolean isGroupSummary(Notification notification) {
        if (Build.VERSION.SDK_INT >= 20) {
            return (notification.flags & Notification.FLAG_GROUP_SUMMARY) != 0;
        } else if (Build.VERSION.SDK_INT >= 19) {
            return notification.extras.getBoolean(NotificationCompatExtras.EXTRA_GROUP_SUMMARY);
        } else if (Build.VERSION.SDK_INT >= 16) {
            return NotificationCompatJellybean.getExtras(notification).getBoolean(
                    NotificationCompatExtras.EXTRA_GROUP_SUMMARY);
        } else {
            return false;
        }
    }
Get whether this notification to be the group summary for a group of notifications.
Grouped notifications may display in a cluster or stack on devices which
support such rendering. Requires a group key also be set using {@link Builder#setGroup}.

@return Whether this notification is a group summary.
android/android_framework/base/src/main/java/github/tornaco/android/thanos/core/compat/NotificationCompat.java