diff --git a/packages/SystemUI/src/com/android/systemui/shade/CombinedShadeHeadersConstraintManagerImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/CombinedShadeHeadersConstraintManagerImpl.kt index b3d31f2986d17..7e0f504002996 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/CombinedShadeHeadersConstraintManagerImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/CombinedShadeHeadersConstraintManagerImpl.kt @@ -19,12 +19,12 @@ package com.android.systemui.shade import android.view.ViewGroup import androidx.constraintlayout.widget.ConstraintSet import com.android.systemui.R -import com.android.systemui.statusbar.phone.dagger.CentralSurfacesComponent +import com.android.systemui.dagger.SysUISingleton /** * Standard implementation of [CombinedShadeHeadersConstraintManager]. */ -@CentralSurfacesComponent.CentralSurfacesScope +@SysUISingleton object CombinedShadeHeadersConstraintManagerImpl : CombinedShadeHeadersConstraintManager { override fun privacyChipVisibilityConstraints(visible: Boolean): ConstraintsChanges { diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt index 49e02e3b23379..a0ab451cb99eb 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt @@ -127,5 +127,11 @@ abstract class ShadeModule { stub.layoutResource = layoutId return stub.inflate() as MotionLayout } + + @Provides + @SysUISingleton + fun providesCombinedShadeHeadersConstraintManager(): CombinedShadeHeadersConstraintManager { + return CombinedShadeHeadersConstraintManagerImpl + } } } 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 94414dd65fbb9..1b9b508fc1b39 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 @@ -35,8 +35,6 @@ import com.android.systemui.flags.Flags; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.privacy.OngoingPrivacyChip; import com.android.systemui.settings.UserTracker; -import com.android.systemui.shade.CombinedShadeHeadersConstraintManager; -import com.android.systemui.shade.CombinedShadeHeadersConstraintManagerImpl; import com.android.systemui.shade.NotificationPanelView; import com.android.systemui.shade.NotificationPanelViewController; import com.android.systemui.shade.NotificationShadeWindowView; @@ -136,14 +134,6 @@ public abstract class StatusBarViewModule { abstract ShadeViewController bindsShadeViewController( NotificationPanelViewController notificationPanelViewController); - /** */ - @Provides - @CentralSurfacesComponent.CentralSurfacesScope - public static CombinedShadeHeadersConstraintManager - provideCombinedShadeHeadersConstraintManager() { - return CombinedShadeHeadersConstraintManagerImpl.INSTANCE; - } - /** */ @Provides @CentralSurfacesComponent.CentralSurfacesScope