From 19776df905d0150216002d162d4b63721ea8f6c5 Mon Sep 17 00:00:00 2001 From: Fabian Kozynski Date: Tue, 8 Jun 2021 10:05:29 -0400 Subject: [PATCH] Add null check on NPVC QS may be null at some points (when the fragment is being recreated). Use a null check to prevent NPE. Test: no test Fixes: 189701093 Change-Id: I393b63aedc2fd58c079523a05778411c178caa22 --- .../statusbar/phone/NotificationPanelViewController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index f545710ac5425..67c8d58e40596 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -2519,7 +2519,9 @@ public class NotificationPanelViewController extends PanelViewController { break; case FLING_HIDE: default: - mQs.closeDetail(); + if (mQs != null) { + mQs.closeDetail(); + } target = 0; } if (target == mQsExpansionHeight) {