Prevent NPE in NPVC when accessing HeadsUpAppearanceController

Bug: 280700007
Test: N/A
Change-Id: I6270c96b8585c429f9b63b56af0304cd5e794f6f
This commit is contained in:
Shawn Lee
2023-05-08 16:01:01 -07:00
parent eb6d0c3576
commit 6a1df8334e

View File

@@ -4373,7 +4373,8 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
@Override
public boolean shouldHeadsUpBeVisible() {
return mHeadsUpAppearanceController.shouldBeVisible();
return mHeadsUpAppearanceController != null &&
mHeadsUpAppearanceController.shouldBeVisible();
}
@Override