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

Commit 5186b131 authored by Mady Mellor's avatar Mady Mellor
Browse files

No need to use getExpandedBubble for singleTaskDisplayDrawn/Empty callbacks

getExpandedBubble checks if the shade is expanded or not and returns
null if the shade is expanded, we don't care about that for the display
drawn callbacks.

Test: manual, have a bubble notification on lockscreen, tap it, note
      that the bubble is expanded & visible after going through lockscreen
Bug: 138461119
Change-Id: I00dff7cd3301db6a2613a947015ac0408b545202
parent fd485887
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -926,7 +926,9 @@ public class BubbleController implements ConfigurationController.ConfigurationLi

        @Override
        public void onSingleTaskDisplayDrawn(int displayId) {
            final Bubble expandedBubble = getExpandedBubble(mContext);
            final Bubble expandedBubble = mStackView != null
                    ? mStackView.getExpandedBubble()
                    : null;
            if (expandedBubble != null && expandedBubble.getDisplayId() == displayId) {
                expandedBubble.setContentVisibility(true);
            }
@@ -934,7 +936,9 @@ public class BubbleController implements ConfigurationController.ConfigurationLi

        @Override
        public void onSingleTaskDisplayEmpty(int displayId) {
            final Bubble expandedBubble = getExpandedBubble(mContext);
            final Bubble expandedBubble = mStackView != null
                    ? mStackView.getExpandedBubble()
                    : null;
            if (expandedBubble == null) {
                return;
            }