Loading packages/SystemUI/src/com/android/systemui/dagger/ReferenceSystemUIModule.java +10 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,9 @@ import com.android.systemui.actioncorner.ActionCornerModule; import com.android.systemui.battery.BatterySaverModule; import com.android.systemui.clipboardoverlay.dagger.ClipboardOverlayOverrideModule; import com.android.systemui.communal.posturing.dagger.NoopPosturingModule; import com.android.systemui.display.dagger.SystemUIDisplaySubcomponent; import com.android.systemui.display.dagger.SystemUIPhoneDisplaySubcomponent; import com.android.systemui.display.data.repository.DisplayPhoneModule; import com.android.systemui.display.ui.viewmodel.ConnectingDisplayViewModel; import com.android.systemui.dock.DockManager; import com.android.systemui.dock.DockManagerImpl; Loading Loading @@ -143,6 +146,7 @@ import javax.inject.Provider; ConnectingDisplayViewModel.StartableModule.class, DefaultBlueprintModule.class, DeviceStateAutoRotateModule.class, DisplayPhoneModule.class, EmergencyGestureModule.class, GestureModule.class, HeadsUpModule.class, Loading Loading @@ -184,9 +188,15 @@ import javax.inject.Provider; ShortcutHelperModule.class, ContextualEducationModule.class, ActionCornerModule.class, }, subcomponents = { SystemUIPhoneDisplaySubcomponent.class }) public abstract class ReferenceSystemUIModule { @Binds abstract SystemUIDisplaySubcomponent.Factory systemUIDisplaySubcomponentFactory( SystemUIPhoneDisplaySubcomponent.Factory factory); @SysUISingleton @Provides @Named(LEAK_REPORT_EMAIL_NAME) Loading packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +0 −2 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ import com.android.systemui.demomode.dagger.DemoModeModule; import com.android.systemui.desktop.dagger.DesktopModule; import com.android.systemui.deviceentry.DeviceEntryModule; import com.android.systemui.display.DisplayModule; import com.android.systemui.display.dagger.SystemUIDisplaySubcomponent; import com.android.systemui.doze.dagger.DozeComponent; import com.android.systemui.dreams.dagger.DreamModule; import com.android.systemui.flags.FeatureFlags; Loading Loading @@ -314,7 +313,6 @@ import javax.inject.Named; NavigationBarComponent.class, NotificationRowComponent.class, WindowRootViewComponent.class, SystemUIDisplaySubcomponent.class, BundleRowComponent.class, }) public abstract class SystemUIModule { Loading packages/SystemUI/src/com/android/systemui/display/dagger/PerDisplayCommonModule.kt +2 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import com.android.systemui.display.data.repository.DisplayStateRepository import com.android.systemui.display.data.repository.DisplayStateRepositoryImpl import com.android.systemui.display.domain.interactor.DisplayStateInteractor import com.android.systemui.display.domain.interactor.DisplayStateInteractorImpl import com.android.systemui.statusbar.dagger.StatusBarPerDisplayModule import dagger.Binds import dagger.Module import dagger.Provides Loading @@ -37,7 +38,7 @@ import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope /** Module providing common dependencies for per-display singletons. */ @Module @Module(includes = [StatusBarPerDisplayModule::class]) interface PerDisplayCommonModule { @Multibinds Loading packages/SystemUI/src/com/android/systemui/display/dagger/PerDisplayPhoneModule.kt 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 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.display.dagger import com.android.systemui.display.dagger.SystemUIDisplaySubcomponent.DisplayAware import com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment import com.android.systemui.statusbar.phone.fragment.dagger.HomeStatusBarComponent import dagger.Binds import dagger.Module /** * "Phone" specific module for SysUI classes that should be instantiated once per display. * * If the classes are common to all SysUI flavors, they should be added to * [PerDisplayCommonModule] instead. */ @Module(subcomponents = [HomeStatusBarComponent::class]) interface PerDisplayPhoneModule { @Binds @DisplayAware fun homeStatusBarComponentFactory( factory: HomeStatusBarComponent.Factory ): HomeStatusBarComponent.Factory @Binds @DisplayAware fun statusBarFragmentProvider(fragment: CollapsedStatusBarFragment): CollapsedStatusBarFragment } packages/SystemUI/src/com/android/systemui/display/dagger/SystemUIDisplaySubcomponent.kt +1 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.systemui.display.dagger import com.android.systemui.display.dagger.SystemUIDisplaySubcomponent.PerDisplaySingleton import com.android.systemui.display.data.repository.DisplayStateRepository import com.android.systemui.display.domain.interactor.DisplayStateInteractor import com.android.systemui.statusbar.dagger.StatusBarPerDisplayModule import com.android.systemui.statusbar.domain.interactor.StatusBarIconRefreshInteractor import dagger.BindsInstance import dagger.Subcomponent Loading @@ -37,7 +36,7 @@ import kotlinx.coroutines.CoroutineScope * thread is not feasible as it would cause jank. */ @PerDisplaySingleton @Subcomponent(modules = [PerDisplayCommonModule::class, StatusBarPerDisplayModule::class]) @Subcomponent(modules = [PerDisplayCommonModule::class]) interface SystemUIDisplaySubcomponent { @get:DisplayAware val displayCoroutineScope: CoroutineScope Loading Loading
packages/SystemUI/src/com/android/systemui/dagger/ReferenceSystemUIModule.java +10 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,9 @@ import com.android.systemui.actioncorner.ActionCornerModule; import com.android.systemui.battery.BatterySaverModule; import com.android.systemui.clipboardoverlay.dagger.ClipboardOverlayOverrideModule; import com.android.systemui.communal.posturing.dagger.NoopPosturingModule; import com.android.systemui.display.dagger.SystemUIDisplaySubcomponent; import com.android.systemui.display.dagger.SystemUIPhoneDisplaySubcomponent; import com.android.systemui.display.data.repository.DisplayPhoneModule; import com.android.systemui.display.ui.viewmodel.ConnectingDisplayViewModel; import com.android.systemui.dock.DockManager; import com.android.systemui.dock.DockManagerImpl; Loading Loading @@ -143,6 +146,7 @@ import javax.inject.Provider; ConnectingDisplayViewModel.StartableModule.class, DefaultBlueprintModule.class, DeviceStateAutoRotateModule.class, DisplayPhoneModule.class, EmergencyGestureModule.class, GestureModule.class, HeadsUpModule.class, Loading Loading @@ -184,9 +188,15 @@ import javax.inject.Provider; ShortcutHelperModule.class, ContextualEducationModule.class, ActionCornerModule.class, }, subcomponents = { SystemUIPhoneDisplaySubcomponent.class }) public abstract class ReferenceSystemUIModule { @Binds abstract SystemUIDisplaySubcomponent.Factory systemUIDisplaySubcomponentFactory( SystemUIPhoneDisplaySubcomponent.Factory factory); @SysUISingleton @Provides @Named(LEAK_REPORT_EMAIL_NAME) Loading
packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java +0 −2 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ import com.android.systemui.demomode.dagger.DemoModeModule; import com.android.systemui.desktop.dagger.DesktopModule; import com.android.systemui.deviceentry.DeviceEntryModule; import com.android.systemui.display.DisplayModule; import com.android.systemui.display.dagger.SystemUIDisplaySubcomponent; import com.android.systemui.doze.dagger.DozeComponent; import com.android.systemui.dreams.dagger.DreamModule; import com.android.systemui.flags.FeatureFlags; Loading Loading @@ -314,7 +313,6 @@ import javax.inject.Named; NavigationBarComponent.class, NotificationRowComponent.class, WindowRootViewComponent.class, SystemUIDisplaySubcomponent.class, BundleRowComponent.class, }) public abstract class SystemUIModule { Loading
packages/SystemUI/src/com/android/systemui/display/dagger/PerDisplayCommonModule.kt +2 −1 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import com.android.systemui.display.data.repository.DisplayStateRepository import com.android.systemui.display.data.repository.DisplayStateRepositoryImpl import com.android.systemui.display.domain.interactor.DisplayStateInteractor import com.android.systemui.display.domain.interactor.DisplayStateInteractorImpl import com.android.systemui.statusbar.dagger.StatusBarPerDisplayModule import dagger.Binds import dagger.Module import dagger.Provides Loading @@ -37,7 +38,7 @@ import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.CoroutineScope /** Module providing common dependencies for per-display singletons. */ @Module @Module(includes = [StatusBarPerDisplayModule::class]) interface PerDisplayCommonModule { @Multibinds Loading
packages/SystemUI/src/com/android/systemui/display/dagger/PerDisplayPhoneModule.kt 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 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.display.dagger import com.android.systemui.display.dagger.SystemUIDisplaySubcomponent.DisplayAware import com.android.systemui.statusbar.phone.fragment.CollapsedStatusBarFragment import com.android.systemui.statusbar.phone.fragment.dagger.HomeStatusBarComponent import dagger.Binds import dagger.Module /** * "Phone" specific module for SysUI classes that should be instantiated once per display. * * If the classes are common to all SysUI flavors, they should be added to * [PerDisplayCommonModule] instead. */ @Module(subcomponents = [HomeStatusBarComponent::class]) interface PerDisplayPhoneModule { @Binds @DisplayAware fun homeStatusBarComponentFactory( factory: HomeStatusBarComponent.Factory ): HomeStatusBarComponent.Factory @Binds @DisplayAware fun statusBarFragmentProvider(fragment: CollapsedStatusBarFragment): CollapsedStatusBarFragment }
packages/SystemUI/src/com/android/systemui/display/dagger/SystemUIDisplaySubcomponent.kt +1 −2 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ package com.android.systemui.display.dagger import com.android.systemui.display.dagger.SystemUIDisplaySubcomponent.PerDisplaySingleton import com.android.systemui.display.data.repository.DisplayStateRepository import com.android.systemui.display.domain.interactor.DisplayStateInteractor import com.android.systemui.statusbar.dagger.StatusBarPerDisplayModule import com.android.systemui.statusbar.domain.interactor.StatusBarIconRefreshInteractor import dagger.BindsInstance import dagger.Subcomponent Loading @@ -37,7 +36,7 @@ import kotlinx.coroutines.CoroutineScope * thread is not feasible as it would cause jank. */ @PerDisplaySingleton @Subcomponent(modules = [PerDisplayCommonModule::class, StatusBarPerDisplayModule::class]) @Subcomponent(modules = [PerDisplayCommonModule::class]) interface SystemUIDisplaySubcomponent { @get:DisplayAware val displayCoroutineScope: CoroutineScope Loading