diff options
3 files changed, 8 insertions, 12 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/shade/CombinedShadeHeadersConstraintManagerImpl.kt b/packages/SystemUI/src/com/android/systemui/shade/CombinedShadeHeadersConstraintManagerImpl.kt index b3d31f2986d1..7e0f50400299 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 49e02e3b2337..a0ab451cb99e 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 94414dd65fbb..1b9b508fc1b3 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; @@ -139,14 +137,6 @@ public abstract class StatusBarViewModule { /** */ @Provides @CentralSurfacesComponent.CentralSurfacesScope - public static CombinedShadeHeadersConstraintManager - provideCombinedShadeHeadersConstraintManager() { - return CombinedShadeHeadersConstraintManagerImpl.INSTANCE; - } - - /** */ - @Provides - @CentralSurfacesComponent.CentralSurfacesScope public static OngoingPrivacyChip getSplitShadeOngoingPrivacyChip( @Named(SHADE_HEADER) MotionLayout header) { return header.findViewById(R.id.privacy_chip); |