Loading packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +2 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ import com.android.systemui.screenshot.dagger.ScreenshotModule; import com.android.systemui.security.data.repository.SecurityRepositoryModule; import com.android.systemui.settings.DisplayTracker; import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeModule; import com.android.systemui.shade.transition.LargeScreenShadeInterpolator; import com.android.systemui.shade.transition.LargeScreenShadeInterpolatorImpl; import com.android.systemui.smartspace.dagger.SmartspaceModule; Loading Loading @@ -174,6 +175,7 @@ import javax.inject.Named; SecurityRepositoryModule.class, ScreenRecordModule.class, SettingsUtilModule.class, ShadeModule.class, SmartRepliesInflationModule.class, SmartspaceModule.class, StatusBarPipelineModule.class, Loading packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt 0 → 100644 +44 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.shade import android.view.LayoutInflater import com.android.systemui.R import com.android.systemui.dagger.SysUISingleton import dagger.Module import dagger.Provides /** Module for classes related to the notification shade. */ @Module abstract class ShadeModule { companion object { @Provides @SysUISingleton // TODO(b/277762009): Do something similar to // {@link StatusBarWindowModule.InternalWindowView} so that only // {@link NotificationShadeWindowViewController} can inject this view. fun providesNotificationShadeWindowView( layoutInflater: LayoutInflater, ): NotificationShadeWindowView { return layoutInflater.inflate(R.layout.super_notification_shade, /* root= */ null) as NotificationShadeWindowView? ?: throw IllegalStateException( "R.layout.super_notification_shade could not be properly inflated" ) } } } packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -1637,6 +1637,8 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mNotificationShadeWindowView = mCentralSurfacesComponent.getNotificationShadeWindowView(); mNotificationShadeWindowViewController = mCentralSurfacesComponent .getNotificationShadeWindowViewController(); // TODO(b/277762009): Inject [NotificationShadeWindowView] directly into the controller. // (Right now, there's a circular dependency.) mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowViewController.setupExpandedStatusBar(); NotificationPanelViewController npvc = Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarViewModule.java +0 −15 Original line number Diff line number Diff line Loading @@ -95,21 +95,6 @@ public abstract class StatusBarViewModule { public static final String SHADE_HEADER = "large_screen_shade_header"; public static final String STATUS_BAR_FRAGMENT = "status_bar_fragment"; /** */ @Provides @CentralSurfacesComponent.CentralSurfacesScope public static NotificationShadeWindowView providesNotificationShadeWindowView( LayoutInflater layoutInflater) { NotificationShadeWindowView notificationShadeWindowView = (NotificationShadeWindowView) layoutInflater.inflate(R.layout.super_notification_shade, /* root= */ null); if (notificationShadeWindowView == null) { throw new IllegalStateException( "R.layout.super_notification_shade could not be properly inflated"); } return notificationShadeWindowView; } /** */ @Provides @CentralSurfacesComponent.CentralSurfacesScope Loading Loading
packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +2 −0 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ import com.android.systemui.screenshot.dagger.ScreenshotModule; import com.android.systemui.security.data.repository.SecurityRepositoryModule; import com.android.systemui.settings.DisplayTracker; import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeModule; import com.android.systemui.shade.transition.LargeScreenShadeInterpolator; import com.android.systemui.shade.transition.LargeScreenShadeInterpolatorImpl; import com.android.systemui.smartspace.dagger.SmartspaceModule; Loading Loading @@ -174,6 +175,7 @@ import javax.inject.Named; SecurityRepositoryModule.class, ScreenRecordModule.class, SettingsUtilModule.class, ShadeModule.class, SmartRepliesInflationModule.class, SmartspaceModule.class, StatusBarPipelineModule.class, Loading
packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt 0 → 100644 +44 −0 Original line number Diff line number Diff line /* * Copyright (C) 2023 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.shade import android.view.LayoutInflater import com.android.systemui.R import com.android.systemui.dagger.SysUISingleton import dagger.Module import dagger.Provides /** Module for classes related to the notification shade. */ @Module abstract class ShadeModule { companion object { @Provides @SysUISingleton // TODO(b/277762009): Do something similar to // {@link StatusBarWindowModule.InternalWindowView} so that only // {@link NotificationShadeWindowViewController} can inject this view. fun providesNotificationShadeWindowView( layoutInflater: LayoutInflater, ): NotificationShadeWindowView { return layoutInflater.inflate(R.layout.super_notification_shade, /* root= */ null) as NotificationShadeWindowView? ?: throw IllegalStateException( "R.layout.super_notification_shade could not be properly inflated" ) } } }
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +2 −0 Original line number Diff line number Diff line Loading @@ -1637,6 +1637,8 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mNotificationShadeWindowView = mCentralSurfacesComponent.getNotificationShadeWindowView(); mNotificationShadeWindowViewController = mCentralSurfacesComponent .getNotificationShadeWindowViewController(); // TODO(b/277762009): Inject [NotificationShadeWindowView] directly into the controller. // (Right now, there's a circular dependency.) mNotificationShadeWindowController.setNotificationShadeView(mNotificationShadeWindowView); mNotificationShadeWindowViewController.setupExpandedStatusBar(); NotificationPanelViewController npvc = Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarViewModule.java +0 −15 Original line number Diff line number Diff line Loading @@ -95,21 +95,6 @@ public abstract class StatusBarViewModule { public static final String SHADE_HEADER = "large_screen_shade_header"; public static final String STATUS_BAR_FRAGMENT = "status_bar_fragment"; /** */ @Provides @CentralSurfacesComponent.CentralSurfacesScope public static NotificationShadeWindowView providesNotificationShadeWindowView( LayoutInflater layoutInflater) { NotificationShadeWindowView notificationShadeWindowView = (NotificationShadeWindowView) layoutInflater.inflate(R.layout.super_notification_shade, /* root= */ null); if (notificationShadeWindowView == null) { throw new IllegalStateException( "R.layout.super_notification_shade could not be properly inflated"); } return notificationShadeWindowView; } /** */ @Provides @CentralSurfacesComponent.CentralSurfacesScope Loading