From 3e1addffe07418a897a2b33bcca2f3c8afef1fb3 Mon Sep 17 00:00:00 2001 From: Mady Mellor Date: Tue, 31 Mar 2020 16:08:16 -0700 Subject: [PATCH] Fix potential NPE Test: treehugger Bug: 152712039 Change-Id: I22b17976a4c1e68f3bf076b7e40f84186e664e7b --- .../src/com/android/systemui/bubbles/BubbleStackView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java index 6fd6b8d9f738e..bc3458462658a 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleStackView.java @@ -1440,7 +1440,7 @@ public class BubbleStackView extends FrameLayout { /** Expands the clicked bubble. */ public void expandBubble(Bubble bubble) { - if (bubble.equals(mBubbleData.getSelectedBubble())) { + if (bubble != null && bubble.equals(mBubbleData.getSelectedBubble())) { // If the bubble we're supposed to expand is the selected bubble, that means the // overflow bubble is currently expanded. Don't tell BubbleData to set this bubble as // selected, since it already is. Just call the stack's setSelectedBubble to expand it.