Loading packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt +31 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,10 @@ import com.android.systemui.privacy.OngoingPrivacyChip import com.android.systemui.scene.ui.view.WindowRootView import com.android.systemui.settings.UserTracker import com.android.systemui.statusbar.LightRevealScrim import com.android.systemui.statusbar.NotificationShelf import com.android.systemui.statusbar.NotificationShelfController import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfComponent import com.android.systemui.statusbar.notification.shelf.ui.viewbinder.NotificationShelfViewBinderWrapperControllerImpl import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout import com.android.systemui.statusbar.phone.StatusIconContainer import com.android.systemui.statusbar.phone.TapAgainView Loading @@ -49,6 +53,7 @@ import dagger.Provides import dagger.multibindings.ClassKey import dagger.multibindings.IntoMap import javax.inject.Named import javax.inject.Provider /** Module for classes related to the notification shade. */ @Module Loading Loading @@ -102,6 +107,32 @@ abstract class ShadeModule { return notificationShadeWindowView.findViewById(R.id.notification_stack_scroller) } @Provides @SysUISingleton fun providesNotificationShelfController( featureFlags: FeatureFlags, newImpl: Provider<NotificationShelfViewBinderWrapperControllerImpl>, notificationShelfComponentBuilder: NotificationShelfComponent.Builder, layoutInflater: LayoutInflater, notificationStackScrollLayout: NotificationStackScrollLayout, ): NotificationShelfController { return if (featureFlags.isEnabled(Flags.NOTIFICATION_SHELF_REFACTOR)) { newImpl.get() } else { val shelfView = layoutInflater.inflate( R.layout.status_bar_notification_shelf, notificationStackScrollLayout, false ) as NotificationShelf val component = notificationShelfComponentBuilder.notificationShelf(shelfView).build() val notificationShelfController = component.notificationShelfController notificationShelfController.init() notificationShelfController } } // TODO(b/277762009): Only allow this view's controller to inject the view. See above. @Provides @SysUISingleton Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/shelf/domain/interactor/NotificationShelfInteractor.kt +2 −2 Original line number Diff line number Diff line Loading @@ -17,19 +17,19 @@ package com.android.systemui.statusbar.notification.shelf.domain.interactor import android.os.PowerManager import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.data.repository.DeviceEntryFaceAuthRepository import com.android.systemui.keyguard.data.repository.KeyguardRepository import com.android.systemui.statusbar.LockscreenShadeTransitionController import com.android.systemui.statusbar.NotificationShelf import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent import com.android.systemui.util.time.SystemClock import javax.inject.Inject import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine /** Interactor for the [NotificationShelf] */ @CentralSurfacesComponent.CentralSurfacesScope @SysUISingleton class NotificationShelfInteractor @Inject constructor( Loading packages/SystemUI/src/com/android/systemui/statusbar/notification/shelf/ui/viewbinder/NotificationShelfViewBinder.kt +2 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.statusbar.notification.shelf.ui.viewbinder import android.view.View import androidx.lifecycle.Lifecycle import androidx.lifecycle.repeatOnLifecycle import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.lifecycle.repeatWhenAttached Loading @@ -32,7 +33,6 @@ import com.android.systemui.statusbar.notification.stack.AmbientState import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController import com.android.systemui.statusbar.phone.NotificationIconAreaController import com.android.systemui.statusbar.phone.NotificationIconContainer import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent.CentralSurfacesScope import javax.inject.Inject import kotlinx.coroutines.awaitCancellation import kotlinx.coroutines.launch Loading @@ -43,7 +43,7 @@ import kotlinx.coroutines.launch * [NotificationShelfController] interface. Once the [LegacyNotificationShelfControllerImpl] is * removed, this class can go away and the ViewBinder can be used directly. */ @CentralSurfacesScope @SysUISingleton class NotificationShelfViewBinderWrapperControllerImpl @Inject constructor() : NotificationShelfController { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +3 −2 Original line number Diff line number Diff line Loading @@ -746,6 +746,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { Lazy<AssistManager> assistManagerLazy, ConfigurationController configurationController, NotificationShadeWindowController notificationShadeWindowController, NotificationShelfController notificationShelfController, DozeParameters dozeParameters, ScrimController scrimController, Lazy<LockscreenWallpaper> lockscreenWallpaperLazy, Loading Loading @@ -842,6 +843,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mAssistManagerLazy = assistManagerLazy; mConfigurationController = configurationController; mNotificationShadeWindowController = notificationShadeWindowController; mNotificationShelfController = notificationShelfController; mDozeServiceHost = dozeServiceHost; mPowerManager = powerManager; mDozeParameters = dozeParameters; Loading Loading @@ -1652,7 +1654,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mNotifListContainer = mCentralSurfacesComponent.getNotificationListContainer(); mPresenter = mCentralSurfacesComponent.getNotificationPresenter(); mNotificationActivityStarter = mCentralSurfacesComponent.getNotificationActivityStarter(); mNotificationShelfController = mCentralSurfacesComponent.getNotificationShelfController(); mHeadsUpManager.addListener(mCentralSurfacesComponent.getStatusBarHeadsUpChangeListener()); Loading Loading @@ -3410,7 +3411,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { protected Display mDisplay; private int mDisplayId; protected NotificationShelfController mNotificationShelfController; private final NotificationShelfController mNotificationShelfController; private final Lazy<AssistManager> mAssistManagerLazy; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesComponent.java +0 −4 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import com.android.systemui.shade.NotificationShadeWindowViewController; import com.android.systemui.shade.QuickSettingsController; import com.android.systemui.shade.ShadeHeaderController; import com.android.systemui.statusbar.NotificationPresenter; import com.android.systemui.statusbar.NotificationShelfController; import com.android.systemui.statusbar.notification.NotificationActivityStarter; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; Loading Loading @@ -88,9 +87,6 @@ public interface CentralSurfacesComponent { */ NotificationShadeWindowView getNotificationShadeWindowView(); /** */ NotificationShelfController getNotificationShelfController(); /** */ NotificationStackScrollLayoutController getNotificationStackScrollLayoutController(); Loading Loading
packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt +31 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,10 @@ import com.android.systemui.privacy.OngoingPrivacyChip import com.android.systemui.scene.ui.view.WindowRootView import com.android.systemui.settings.UserTracker import com.android.systemui.statusbar.LightRevealScrim import com.android.systemui.statusbar.NotificationShelf import com.android.systemui.statusbar.NotificationShelfController import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfComponent import com.android.systemui.statusbar.notification.shelf.ui.viewbinder.NotificationShelfViewBinderWrapperControllerImpl import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout import com.android.systemui.statusbar.phone.StatusIconContainer import com.android.systemui.statusbar.phone.TapAgainView Loading @@ -49,6 +53,7 @@ import dagger.Provides import dagger.multibindings.ClassKey import dagger.multibindings.IntoMap import javax.inject.Named import javax.inject.Provider /** Module for classes related to the notification shade. */ @Module Loading Loading @@ -102,6 +107,32 @@ abstract class ShadeModule { return notificationShadeWindowView.findViewById(R.id.notification_stack_scroller) } @Provides @SysUISingleton fun providesNotificationShelfController( featureFlags: FeatureFlags, newImpl: Provider<NotificationShelfViewBinderWrapperControllerImpl>, notificationShelfComponentBuilder: NotificationShelfComponent.Builder, layoutInflater: LayoutInflater, notificationStackScrollLayout: NotificationStackScrollLayout, ): NotificationShelfController { return if (featureFlags.isEnabled(Flags.NOTIFICATION_SHELF_REFACTOR)) { newImpl.get() } else { val shelfView = layoutInflater.inflate( R.layout.status_bar_notification_shelf, notificationStackScrollLayout, false ) as NotificationShelf val component = notificationShelfComponentBuilder.notificationShelf(shelfView).build() val notificationShelfController = component.notificationShelfController notificationShelfController.init() notificationShelfController } } // TODO(b/277762009): Only allow this view's controller to inject the view. See above. @Provides @SysUISingleton Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/shelf/domain/interactor/NotificationShelfInteractor.kt +2 −2 Original line number Diff line number Diff line Loading @@ -17,19 +17,19 @@ package com.android.systemui.statusbar.notification.shelf.domain.interactor import android.os.PowerManager import com.android.systemui.dagger.SysUISingleton import com.android.systemui.keyguard.data.repository.DeviceEntryFaceAuthRepository import com.android.systemui.keyguard.data.repository.KeyguardRepository import com.android.systemui.statusbar.LockscreenShadeTransitionController import com.android.systemui.statusbar.NotificationShelf import com.android.systemui.statusbar.phone.CentralSurfaces import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent import com.android.systemui.util.time.SystemClock import javax.inject.Inject import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine /** Interactor for the [NotificationShelf] */ @CentralSurfacesComponent.CentralSurfacesScope @SysUISingleton class NotificationShelfInteractor @Inject constructor( Loading
packages/SystemUI/src/com/android/systemui/statusbar/notification/shelf/ui/viewbinder/NotificationShelfViewBinder.kt +2 −2 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.systemui.statusbar.notification.shelf.ui.viewbinder import android.view.View import androidx.lifecycle.Lifecycle import androidx.lifecycle.repeatOnLifecycle import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.lifecycle.repeatWhenAttached Loading @@ -32,7 +33,6 @@ import com.android.systemui.statusbar.notification.stack.AmbientState import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController import com.android.systemui.statusbar.phone.NotificationIconAreaController import com.android.systemui.statusbar.phone.NotificationIconContainer import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent.CentralSurfacesScope import javax.inject.Inject import kotlinx.coroutines.awaitCancellation import kotlinx.coroutines.launch Loading @@ -43,7 +43,7 @@ import kotlinx.coroutines.launch * [NotificationShelfController] interface. Once the [LegacyNotificationShelfControllerImpl] is * removed, this class can go away and the ViewBinder can be used directly. */ @CentralSurfacesScope @SysUISingleton class NotificationShelfViewBinderWrapperControllerImpl @Inject constructor() : NotificationShelfController { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +3 −2 Original line number Diff line number Diff line Loading @@ -746,6 +746,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { Lazy<AssistManager> assistManagerLazy, ConfigurationController configurationController, NotificationShadeWindowController notificationShadeWindowController, NotificationShelfController notificationShelfController, DozeParameters dozeParameters, ScrimController scrimController, Lazy<LockscreenWallpaper> lockscreenWallpaperLazy, Loading Loading @@ -842,6 +843,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mAssistManagerLazy = assistManagerLazy; mConfigurationController = configurationController; mNotificationShadeWindowController = notificationShadeWindowController; mNotificationShelfController = notificationShelfController; mDozeServiceHost = dozeServiceHost; mPowerManager = powerManager; mDozeParameters = dozeParameters; Loading Loading @@ -1652,7 +1654,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mNotifListContainer = mCentralSurfacesComponent.getNotificationListContainer(); mPresenter = mCentralSurfacesComponent.getNotificationPresenter(); mNotificationActivityStarter = mCentralSurfacesComponent.getNotificationActivityStarter(); mNotificationShelfController = mCentralSurfacesComponent.getNotificationShelfController(); mHeadsUpManager.addListener(mCentralSurfacesComponent.getStatusBarHeadsUpChangeListener()); Loading Loading @@ -3410,7 +3411,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { protected Display mDisplay; private int mDisplayId; protected NotificationShelfController mNotificationShelfController; private final NotificationShelfController mNotificationShelfController; private final Lazy<AssistManager> mAssistManagerLazy; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/CentralSurfacesComponent.java +0 −4 Original line number Diff line number Diff line Loading @@ -27,7 +27,6 @@ import com.android.systemui.shade.NotificationShadeWindowViewController; import com.android.systemui.shade.QuickSettingsController; import com.android.systemui.shade.ShadeHeaderController; import com.android.systemui.statusbar.NotificationPresenter; import com.android.systemui.statusbar.NotificationShelfController; import com.android.systemui.statusbar.notification.NotificationActivityStarter; import com.android.systemui.statusbar.notification.stack.NotificationListContainer; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; Loading Loading @@ -88,9 +87,6 @@ public interface CentralSurfacesComponent { */ NotificationShadeWindowView getNotificationShadeWindowView(); /** */ NotificationShelfController getNotificationShelfController(); /** */ NotificationStackScrollLayoutController getNotificationStackScrollLayoutController(); Loading