diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowView.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowView.java index 2b6327f3eedf3..d75190e7289a3 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowView.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowView.java @@ -84,10 +84,6 @@ public class NotificationShadeWindowView extends FrameLayout { setMotionEventSplittingEnabled(false); } - public NotificationPanelView getNotificationPanelView() { - return findViewById(R.id.notification_panel); - } - @Override public WindowInsets onApplyWindowInsets(WindowInsets windowInsets) { final Insets insets = windowInsets.getInsetsIgnoringVisibility(systemBars()); diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt index efa7d89128431..b0b9ab240988f 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt @@ -50,5 +50,14 @@ abstract class ShadeModule { ): NotificationStackScrollLayout { return notificationShadeWindowView.findViewById(R.id.notification_stack_scroller) } + + // TODO(b/277762009): Only allow this view's controller to inject the view. See above. + @Provides + @SysUISingleton + fun providesNotificationPanelView( + notificationShadeWindowView: NotificationShadeWindowView, + ): NotificationPanelView { + return notificationShadeWindowView.findViewById(R.id.notification_panel) + } } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarViewModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarViewModule.java index b8007a2b1ff65..53c4cf79c4787 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarViewModule.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarViewModule.java @@ -134,14 +134,6 @@ public abstract class StatusBarViewModule { } } - /** */ - @Provides - @CentralSurfacesComponent.CentralSurfacesScope - public static NotificationPanelView getNotificationPanelView( - NotificationShadeWindowView notificationShadeWindowView) { - return notificationShadeWindowView.getNotificationPanelView(); - } - /** */ @Binds @CentralSurfacesComponent.CentralSurfacesScope