diff --git a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java index 6597144a088a5..d7d7f53eb46d3 100644 --- a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java +++ b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java @@ -245,6 +245,9 @@ public class NotificationPanelViewController extends OverlayPanelViewController /** Reinflates the view. */ public void reinflate() { + // Do not reinflate the view if it has not been inflated at all. + if (!isInflated()) return; + ViewGroup container = (ViewGroup) getLayout(); container.removeView(mNotificationView);