Merge "Fix potential NPE when removing bubble" into udc-dev am: 8afb4df8dd am: 19f12b00e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23174051 Change-Id: I4849b73f4ab647e9552253a236241e79d51e930b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user