summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Alex Stetson <alexstetson@google.com> 2021-03-17 09:26:13 -0700
committer Alex Stetson <alexstetson@google.com> 2021-03-17 09:26:13 -0700
commit04cdf3a7d4077046d6a9e45d5298ab8b0aeda12c (patch)
tree1ae2d403c051235feded3c35fe0124cfac10c35d
parented260d837f106017a03469f41dc89508fa78f16a (diff)
DO NOT MERGE Inflate NotificationPanel on instantiation
If the NotificationPanel is not inflated, the proper listeners are not setup and certain behavior will be broken until the panel is opened for the first time. Bug: 182531816 Test: manual Change-Id: If55156b963c0a83ff644524dea0106708f1635cc
-rw-r--r--packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java4
1 files changed, 4 insertions, 0 deletions
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 d7d7f53eb46d..3d79b06ca325 100644
--- a/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java
+++ b/packages/CarSystemUI/src/com/android/systemui/car/notification/NotificationPanelViewController.java
@@ -166,6 +166,10 @@ public class NotificationPanelViewController extends OverlayPanelViewController
mEnableHeadsUpNotificationWhenNotificationShadeOpen = mResources.getBoolean(
com.android.car.notification.R.bool
.config_enableHeadsUpNotificationWhenNotificationShadeOpen);
+
+ // Inflate view on instantiation to properly initialize listeners even if panel has
+ // not been opened.
+ getOverlayViewGlobalStateController().inflateView(this);
}
// CommandQueue.Callbacks