diff options
6 files changed, 24 insertions, 27 deletions
diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/InternetTileNewImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/InternetTileNewImplTest.kt index 2a4cba8cffe2..41d7e490ddc2 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/InternetTileNewImplTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/tiles/InternetTileNewImplTest.kt @@ -41,7 +41,6 @@ import com.android.systemui.qs.tiles.dialog.InternetDetailsViewModel import com.android.systemui.qs.tiles.dialog.InternetDialogManager import com.android.systemui.qs.tiles.dialog.WifiStateWorker import com.android.systemui.res.R -import com.android.systemui.shade.shared.flag.DualShade import com.android.systemui.statusbar.connectivity.AccessPointController import com.android.systemui.statusbar.notification.shared.NotificationThrottleHun import com.android.systemui.statusbar.pipeline.airplane.data.repository.FakeAirplaneModeRepository @@ -145,7 +144,7 @@ class InternetTileNewImplTest(flags: FlagsParameterization) : SysuiTestCase() { dialogManager, wifiStateWorker, accessPointController, - internetDetailsViewModelFactory + internetDetailsViewModelFactory, ) underTest.initialize() @@ -295,7 +294,6 @@ class InternetTileNewImplTest(flags: FlagsParameterization) : SysuiTestCase() { FLAG_SCENE_CONTAINER, KeyguardWmStateRefactor.FLAG_NAME, NotificationThrottleHun.FLAG_NAME, - DualShade.FLAG_NAME, ] ) fun click_withQsDetailedViewEnabled() { diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacksTest.java b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacksTest.java index f318c74e0584..7bc2bca3df02 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacksTest.java +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/phone/CentralSurfacesCommandQueueCallbacksTest.java @@ -43,6 +43,8 @@ import com.android.keyguard.KeyguardUpdateMonitor; import com.android.systemui.SysuiTestCase; import com.android.systemui.assist.AssistManager; import com.android.systemui.emergency.EmergencyGestureModule.EmergencyGestureIntentFactory; +import com.android.systemui.flags.DisableSceneContainer; +import com.android.systemui.flags.EnableSceneContainer; import com.android.systemui.keyguard.WakefulnessLifecycle; import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor; import com.android.systemui.plugins.ActivityStarter; @@ -55,10 +57,8 @@ import com.android.systemui.shade.CameraLauncher; import com.android.systemui.shade.QuickSettingsController; import com.android.systemui.shade.ShadeController; import com.android.systemui.shade.ShadeHeaderController; -import com.android.systemui.shade.ShadeViewController; import com.android.systemui.shade.domain.interactor.PanelExpansionInteractor; import com.android.systemui.shade.domain.interactor.ShadeInteractor; -import com.android.systemui.shade.shared.flag.DualShade; import com.android.systemui.statusbar.CommandQueue; import com.android.systemui.statusbar.notification.headsup.HeadsUpManager; import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController; @@ -67,6 +67,8 @@ import com.android.systemui.statusbar.policy.KeyguardStateController; import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler; import com.android.systemui.wallet.controller.QuickAccessWalletController; +import dagger.Lazy; + import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; @@ -76,8 +78,6 @@ import org.mockito.stubbing.Answer; import java.util.Optional; -import dagger.Lazy; - @SmallTest @RunWith(AndroidJUnit4.class) public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase { @@ -87,7 +87,6 @@ public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase { @Mock private ShadeController mShadeController; @Mock private CommandQueue mCommandQueue; @Mock private QuickSettingsController mQuickSettingsController; - @Mock private ShadeViewController mShadeViewController; @Mock private PanelExpansionInteractor mPanelExpansionInteractor; @Mock private Lazy<ShadeInteractor> mShadeInteractorLazy; @Mock private ShadeHeaderController mShadeHeaderController; @@ -242,7 +241,8 @@ public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase { } @Test - @DisableFlags(value = {QSComposeFragment.FLAG_NAME, DualShade.FLAG_NAME}) + @DisableSceneContainer + @DisableFlags(QSComposeFragment.FLAG_NAME) public void clickQsTile_flagsDisabled_callsQSPanelController() { ComponentName c = new ComponentName("testpkg", "testcls"); @@ -251,7 +251,7 @@ public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase { } @Test - @DisableFlags(DualShade.FLAG_NAME) + @DisableSceneContainer @EnableFlags(QSComposeFragment.FLAG_NAME) public void clickQsTile_onlyQSComposeFlag_callsQSHost() { ComponentName c = new ComponentName("testpkg", "testcls"); @@ -262,9 +262,9 @@ public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase { } @Test - @EnableFlags(DualShade.FLAG_NAME) + @EnableSceneContainer @DisableFlags(QSComposeFragment.FLAG_NAME) - public void clickQsTile_onlyDualShadeFlag_callsQSHost() { + public void clickQsTile_onlySceneContainerFlag_callsQSHost() { ComponentName c = new ComponentName("testpkg", "testcls"); mSbcqCallbacks.clickTile(c); @@ -273,8 +273,9 @@ public class CentralSurfacesCommandQueueCallbacksTest extends SysuiTestCase { } @Test - @EnableFlags(value = {QSComposeFragment.FLAG_NAME, DualShade.FLAG_NAME}) - public void clickQsTile_qsComposeAndDualShadeFlags_callsQSHost() { + @EnableSceneContainer + @EnableFlags(QSComposeFragment.FLAG_NAME) + public void clickQsTile_qsComposeAndSceneContainerFlags_callsQSHost() { ComponentName c = new ComponentName("testpkg", "testcls"); mSbcqCallbacks.clickTile(c); diff --git a/packages/SystemUI/src/com/android/systemui/qs/flags/QsDetailedView.kt b/packages/SystemUI/src/com/android/systemui/qs/flags/QsDetailedView.kt index c302cb21f77f..3afaef5ea6a1 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/flags/QsDetailedView.kt +++ b/packages/SystemUI/src/com/android/systemui/qs/flags/QsDetailedView.kt @@ -20,7 +20,6 @@ import com.android.systemui.Flags import com.android.systemui.flags.FlagToken import com.android.systemui.flags.RefactorFlagUtils import com.android.systemui.scene.shared.flag.SceneContainerFlag -import com.android.systemui.shade.shared.flag.DualShade /** Helper for reading or using the QS Detailed View flag state. */ @Suppress("NOTHING_TO_INLINE") @@ -37,7 +36,6 @@ object QsDetailedView { inline val isEnabled get() = Flags.qsTileDetailedView() && // mainAconfigFlag - DualShade.isEnabled && SceneContainerFlag.isEnabled // NOTE: Changes should also be made in getSecondaryFlags @@ -47,10 +45,8 @@ object QsDetailedView { /** The set of secondary flags which must be enabled for qs detailed view to work properly */ inline fun getSecondaryFlags(): Sequence<FlagToken> = - sequenceOf( - DualShade.token - // NOTE: Changes should also be made in isEnabled - ) + SceneContainerFlag.getAllRequirements() + // NOTE: Changes should also be made in isEnabled + SceneContainerFlag.getAllRequirements() /** The full set of requirements for QsDetailedView */ inline fun getAllRequirements(): Sequence<FlagToken> { diff --git a/packages/SystemUI/src/com/android/systemui/qs/flags/QsInCompose.kt b/packages/SystemUI/src/com/android/systemui/qs/flags/QsInCompose.kt index 3067ccbb7cea..3140df8d947a 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/flags/QsInCompose.kt +++ b/packages/SystemUI/src/com/android/systemui/qs/flags/QsInCompose.kt @@ -17,11 +17,11 @@ package com.android.systemui.qs.flags import com.android.systemui.flags.RefactorFlagUtils -import com.android.systemui.shade.shared.flag.DualShade +import com.android.systemui.scene.shared.flag.SceneContainerFlag /** * Object to help check if the new QS ui should be used. This is true if either [QSComposeFragment] - * or [DualShade] are enabled. + * or [SceneContainerFlag] are enabled. */ object QsInCompose { @@ -29,11 +29,12 @@ object QsInCompose { * This is not a real flag name, but a representation of the allowed flag names. Should not be * used with test annotations. */ - private val flagName = "${QSComposeFragment.FLAG_NAME}|${DualShade.FLAG_NAME}" + private val flagName = + "${QSComposeFragment.FLAG_NAME}|${SceneContainerFlag.getMainAconfigFlag().name}" @JvmStatic inline val isEnabled: Boolean - get() = QSComposeFragment.isEnabled || DualShade.isEnabled + get() = QSComposeFragment.isEnabled || SceneContainerFlag.isEnabled @JvmStatic fun isUnexpectedlyInLegacyMode() = diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServiceRequestControllerTestComposeOff.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServiceRequestControllerTestComposeOff.kt index 82e247714794..fbc6f84cb8fd 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServiceRequestControllerTestComposeOff.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServiceRequestControllerTestComposeOff.kt @@ -29,10 +29,10 @@ import com.android.internal.logging.InstanceId import com.android.internal.statusbar.IAddTileResultCallback import com.android.systemui.InstanceIdSequenceFake import com.android.systemui.SysuiTestCase +import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.qs.QSHost import com.android.systemui.qs.external.ui.dialog.tileRequestDialogComposeDelegateFactory import com.android.systemui.qs.flags.QSComposeFragment -import com.android.systemui.shade.shared.flag.DualShade import com.android.systemui.statusbar.CommandQueue import com.android.systemui.statusbar.commandline.CommandRegistry import com.android.systemui.testKosmos @@ -57,7 +57,8 @@ import org.mockito.MockitoAnnotations @SmallTest @RunWith(AndroidJUnit4::class) -@DisableFlags(value = [QSComposeFragment.FLAG_NAME, DualShade.FLAG_NAME]) +@DisableFlags(QSComposeFragment.FLAG_NAME) +@DisableSceneContainer class TileServiceRequestControllerTestComposeOff : SysuiTestCase() { companion object { diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDetailsContentManagerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDetailsContentManagerTest.kt index 50b8f37f8d25..c20a801cd5e3 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDetailsContentManagerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/dialog/InternetDetailsContentManagerTest.kt @@ -63,7 +63,7 @@ import org.mockito.kotlin.whenever @RunWith(AndroidJUnit4::class) @RunWithLooper(setAsMainLooper = true) @EnableSceneContainer -@EnableFlags(Flags.FLAG_QS_TILE_DETAILED_VIEW, Flags.FLAG_DUAL_SHADE) +@EnableFlags(Flags.FLAG_QS_TILE_DETAILED_VIEW) @UiThreadTest class InternetDetailsContentManagerTest : SysuiTestCase() { private val kosmos = Kosmos() |