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

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

Merge "Only notify bubbles if the notification panel expansion has changed" into main

parents 19321f76 56ca197c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -111,6 +111,7 @@ public class BubblesManager {
    // TODO (b/145659174): allow for multiple callbacks to support the "shadow" new notif pipeline
    private final List<NotifCallback> mCallbacks = new ArrayList<>();
    private final StatusBarWindowCallback mStatusBarWindowCallback;
    private boolean mPanelExpanded;

    /**
     * Creates {@link BubblesManager}, returns {@code null} if Optional {@link Bubbles} not present
@@ -242,8 +243,12 @@ public class BubblesManager {
        // Store callback in a field so it won't get GC'd
        mStatusBarWindowCallback =
                (keyguardShowing, keyguardOccluded, keyguardGoingAway, bouncerShowing, isDozing,
                        panelExpanded, isDreaming) ->
                        panelExpanded, isDreaming) -> {
                    if (panelExpanded != mPanelExpanded) {
                        mPanelExpanded = panelExpanded;
                        mBubbles.onNotificationPanelExpandedChanged(panelExpanded);
                    }
                };
        notificationShadeWindowController.registerCallback(mStatusBarWindowCallback);

        mSysuiProxy = new Bubbles.SysuiProxy() {