diff options
| author | 2023-12-19 10:37:48 -0800 | |
|---|---|---|
| committer | 2023-12-19 10:37:48 -0800 | |
| commit | 1b7f15387a503ac6e8a19c970bdadbbbf0516288 (patch) | |
| tree | 74c89fa593c98a04693ad0cb9415f5136023132e | |
| parent | 2996824c8f59e231b60ecaf8555e74fe8753bdb0 (diff) | |
Protect against potential NPE
Test: treehugger
Bug: 316906000
Change-Id: Icbd14e1dd5f6a9eb6e397acd2fd956e74b41dcf0
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/bubbles/BubbleStackView.java | 5 |
1 files changed, 3 insertions, 2 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 b7f749e8a8b6..06138e4416b2 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 @@ -2323,7 +2323,8 @@ public class BubbleStackView extends FrameLayout updateOverflowVisibility(); updatePointerPosition(false /* forIme */); mExpandedAnimationController.expandFromStack(() -> { - if (mIsExpanded && mExpandedBubble.getExpandedView() != null) { + if (mIsExpanded && mExpandedBubble != null + && mExpandedBubble.getExpandedView() != null) { maybeShowManageEdu(); } updateOverflowDotVisibility(true /* expanding */); @@ -2384,7 +2385,7 @@ public class BubbleStackView extends FrameLayout } mExpandedViewContainer.setAnimationMatrix(mExpandedViewContainerMatrix); - if (mExpandedBubble.getExpandedView() != null) { + if (mExpandedBubble != null && mExpandedBubble.getExpandedView() != null) { mExpandedBubble.getExpandedView().setContentAlpha(0f); mExpandedBubble.getExpandedView().setBackgroundAlpha(0f); |