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

Commit c8ac6cca authored by Mady Mellor's avatar Mady Mellor Committed by Automerger Merge Worker
Browse files

Merge "Fix potential NPE when removing bubble" into udc-dev am: 8afb4df8 am:...

Merge "Fix potential NPE when removing bubble" into udc-dev am: 8afb4df8 am: c75cf295 am: 52b3c398

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23174051



Change-Id: Id8de71bcb0a99c1f547cc5af2047b21b180cbc29
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 619d0493 52b3c398
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1784,10 +1784,13 @@ public class BubbleStackView extends FrameLayout
            // We're expanded while the last bubble is being removed. Let the scrim animate away
            // and then remove our views (removing the icon view triggers the removal of the
            // bubble window so do that at the end of the animation so we see the scrim animate).
            BadgedImageView iconView = bubble.getIconView();
            showScrim(false, () -> {
                mRemovingLastBubbleWhileExpanded = false;
                bubble.cleanupExpandedView();
                mBubbleContainer.removeView(bubble.getIconView());
                if (iconView != null) {
                    mBubbleContainer.removeView(iconView);
                }
                bubble.cleanupViews(); // cleans up the icon view
                updateExpandedView(); // resets state for no expanded bubble
            });