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

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

Merge "When convo is set as important, only bubble if it can"

parents fa5c2e7b 8ca8957e
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -642,9 +642,8 @@ public class NotificationConversationInfo extends LinearLayout implements
                                        BUBBLE_PREFERENCE_SELECTED);
                            }
                            if (mBubblesManagerOptional.isPresent()) {
                                post(() -> {
                                    mBubblesManagerOptional.get().onUserChangedImportance(mEntry);
                                });
                                post(() -> mBubblesManagerOptional.get()
                                        .onUserSetImportantConversation(mEntry));
                            }
                        }
                        mChannelToUpdate.setImportance(Math.max(
+8 −4
Original line number Diff line number Diff line
@@ -615,12 +615,16 @@ public class BubblesManager implements Dumpable {
    }

    /**
     * When a notification is marked Priority, expand the stack if needed,
     * then (maybe create and) select the given bubble.
     * When a notification is set as important, make it a bubble and expand the stack if
     * it can bubble.
     *
     * @param entry the notification for the bubble to show
     * @param entry the important notification.
     */
    public void onUserChangedImportance(NotificationEntry entry) {
    public void onUserSetImportantConversation(NotificationEntry entry) {
        if (entry.getBubbleMetadata() == null) {
            // No bubble metadata, nothing to do.
            return;
        }
        try {
            int flags = Notification.BubbleMetadata.FLAG_SUPPRESS_NOTIFICATION;
            flags |= Notification.BubbleMetadata.FLAG_AUTO_EXPAND_BUBBLE;