From 4071ddb47c1ba80dd9f64ba9279866c292be1d91 Mon Sep 17 00:00:00 2001 From: Joel Galenson Date: Thu, 18 Apr 2019 13:30:45 -0700 Subject: [PATCH] Fix crash. Fix a SysUI NullPointerException. Bug: 130821357 Test: atest BubbleControllerTest KeyButtonViewTest Change-Id: I56923480bd2c3441cd9328e52b4b5bd35d676dc2 --- .../src/com/android/systemui/bubbles/BubbleController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java index b755f28864706..9d9c88f2c6ca6 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java @@ -542,6 +542,9 @@ public class BubbleController implements ConfigurationController.ConfigurationLi * status bar, otherwise returns {@link Display#INVALID_DISPLAY}. */ public int getExpandedDisplayId(Context context) { + if (mStackView == null) { + return INVALID_DISPLAY; + } boolean defaultDisplay = context.getDisplay() != null && context.getDisplay().getDisplayId() == DEFAULT_DISPLAY; Bubble b = mStackView.getExpandedBubble();