From 6a1df8334eb71c29ab629cc8e5197f39d5490571 Mon Sep 17 00:00:00 2001 From: Shawn Lee Date: Mon, 8 May 2023 16:01:01 -0700 Subject: [PATCH] Prevent NPE in NPVC when accessing HeadsUpAppearanceController Bug: 280700007 Test: N/A Change-Id: I6270c96b8585c429f9b63b56af0304cd5e794f6f --- .../systemui/shade/NotificationPanelViewController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java index 926ede99f5a9c..af12bc2ca9f8f 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java @@ -4373,7 +4373,8 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump @Override public boolean shouldHeadsUpBeVisible() { - return mHeadsUpAppearanceController.shouldBeVisible(); + return mHeadsUpAppearanceController != null && + mHeadsUpAppearanceController.shouldBeVisible(); } @Override