[Central Surfaces] Make NotificationPanelView a singleton.
Bug: 277762009 Test: compiles; shade works Change-Id: I69cadfeb95892105784fcf4718a3ba9b5e13298f
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,14 +134,6 @@ public abstract class StatusBarViewModule {
|
||||
}
|
||||
}
|
||||
|
||||
/** */
|
||||
@Provides
|
||||
@CentralSurfacesComponent.CentralSurfacesScope
|
||||
public static NotificationPanelView getNotificationPanelView(
|
||||
NotificationShadeWindowView notificationShadeWindowView) {
|
||||
return notificationShadeWindowView.getNotificationPanelView();
|
||||
}
|
||||
|
||||
/** */
|
||||
@Binds
|
||||
@CentralSurfacesComponent.CentralSurfacesScope
|
||||
|
||||
Reference in New Issue
Block a user