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

Commit 4bb7e68a authored by Mady Mellor's avatar Mady Mellor Committed by Android (Google) Code Review
Browse files

Merge changes I98d775b7,I4f2ee780

* changes:
  Only bubble music / call notifications, not all ongoing
  Require category message when auto-bubbling messages
parents 47c46569 711f9561
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -342,13 +342,16 @@ public class BubbleController {
                }
            }
        }
        boolean isCall = Notification.CATEGORY_CALL.equals(n.getNotification().category)
                && n.isOngoing();
        boolean isMusic = n.getNotification().hasMediaSession();
        boolean isImportantOngoing = isMusic || isCall;

        Class<? extends Notification.Style> style = n.getNotification().getNotificationStyle();
        boolean isMessageType = Notification.MessagingStyle.class.equals(style)
                || Notification.CATEGORY_MESSAGE.equals(n.getNotification().category)
                || hasRemoteInput;
        return (isMessageType && autoBubbleMessages)
                || (n.isOngoing() && autoBubbleOngoing)
        boolean isMessageType = Notification.CATEGORY_MESSAGE.equals(n.getNotification().category);
        boolean isMessageStyle = Notification.MessagingStyle.class.equals(style);
        return (((isMessageType && hasRemoteInput) || isMessageStyle) && autoBubbleMessages)
                || (isImportantOngoing && autoBubbleOngoing)
                || autoBubbleAll;
    }