Merge "[Central Surfaces] Make NotifQSContainer(&Controller) a singleton." into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
bee9e9de6a
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user