Merge "[Central Surfaces] Make NotifQSContainer(&Controller) a singleton." into udc-qpr-dev am: bee9e9de6a am: 05d728341e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23450517

Change-Id: I9c7f24e3d1d0a0b9d09d48f21cbfde0e449b75a6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Caitlin Shkuratov
2023-06-12 16:01:42 +00:00
committed by Automerger Merge Worker
3 changed files with 11 additions and 10 deletions

View File

@@ -27,6 +27,7 @@ import androidx.constraintlayout.widget.ConstraintSet.PARENT_ID
import androidx.constraintlayout.widget.ConstraintSet.START
import androidx.constraintlayout.widget.ConstraintSet.TOP
import com.android.systemui.R
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Main
import com.android.systemui.fragments.FragmentService
import com.android.systemui.navigationbar.NavigationModeController
@@ -45,6 +46,7 @@ import kotlin.reflect.KMutableProperty0
@VisibleForTesting
internal const val INSET_DEBOUNCE_MILLIS = 500L
@SysUISingleton
class NotificationsQSContainerController @Inject constructor(
view: NotificationsQuickSettingsContainer,
private val navigationModeController: NavigationModeController,

View File

@@ -154,6 +154,15 @@ abstract class ShadeModule {
return notificationPanelView.findViewById(R.id.shade_falsing_tap_again)
}
// TODO(b/277762009): Only allow this view's controller to inject the view. See above.
@Provides
@SysUISingleton
fun providesNotificationsQuickSettingsContainer(
notificationShadeWindowView: NotificationShadeWindowView,
): NotificationsQuickSettingsContainer {
return notificationShadeWindowView.findViewById(R.id.notification_container_parent)
}
// TODO(b/277762009): Only allow this view's controller to inject the view. See above.
@Provides
@SysUISingleton

View File

@@ -27,8 +27,6 @@ import com.android.systemui.flags.Flags;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.shade.NotificationPanelView;
import com.android.systemui.shade.NotificationPanelViewController;
import com.android.systemui.shade.NotificationShadeWindowView;
import com.android.systemui.shade.NotificationsQuickSettingsContainer;
import com.android.systemui.shade.ShadeExpansionStateManager;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.statusbar.CommandQueue;
@@ -122,14 +120,6 @@ public abstract class StatusBarViewModule {
abstract ShadeViewController bindsShadeViewController(
NotificationPanelViewController notificationPanelViewController);
/** */
@Provides
@CentralSurfacesComponent.CentralSurfacesScope
public static NotificationsQuickSettingsContainer getNotificationsQuickSettingsContainer(
NotificationShadeWindowView notificationShadeWindowView) {
return notificationShadeWindowView.findViewById(R.id.notification_container_parent);
}
@Binds
@IntoSet
abstract StatusBarBoundsProvider.BoundsChangeListener sysBarAttrsListenerAsBoundsListener(