diff options
| author | 2023-05-12 02:03:59 +0000 | |
|---|---|---|
| committer | 2023-05-12 02:03:59 +0000 | |
| commit | f41a88dfb8a65669920d005de67c31ea182e5afe (patch) | |
| tree | 04f607623149a40d52822da8f3bf685b84b92b32 | |
| parent | 425e5fc31723c2642a36c42a823e65dfc9ddb01c (diff) | |
| parent | 19f12b00e58bfc50a1e8faac71651c3251220508 (diff) | |
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>
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java index a50d357c157e..8e9fc1131e4a 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java @@ -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 }); |