diff options
90 files changed, 239 insertions, 488 deletions
diff --git a/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt b/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt index 2d4b63ef2c27..ae9794a3dbda 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/keyguard/KeyguardSecurityContainerControllerTest.kt @@ -50,6 +50,7 @@ import com.android.systemui.classifier.FalsingCollector import com.android.systemui.deviceentry.domain.interactor.DeviceEntryFaceAuthInteractor import com.android.systemui.deviceentry.domain.interactor.DeviceEntryInteractor import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.flags.FakeFeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.keyboard.data.repository.FakeKeyboardRepository @@ -65,8 +66,6 @@ import com.android.systemui.plugins.FalsingManager import com.android.systemui.res.R import com.android.systemui.scene.domain.interactor.SceneInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.scene.shared.model.FakeSceneDataSource import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.scene.shared.model.fakeSceneDataSource @@ -87,7 +86,6 @@ import com.android.systemui.util.mockito.mock import com.android.systemui.util.mockito.whenever import com.android.systemui.util.settings.GlobalSettings import com.google.common.truth.Truth -import dagger.Lazy import java.util.Optional import junit.framework.Assert import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -171,7 +169,7 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { private lateinit var sceneInteractor: SceneInteractor private lateinit var keyguardTransitionInteractor: KeyguardTransitionInteractor private lateinit var deviceEntryInteractor: DeviceEntryInteractor - @Mock private lateinit var primaryBouncerInteractor: Lazy<PrimaryBouncerInteractor> + @Mock private lateinit var primaryBouncerInteractor: PrimaryBouncerInteractor private lateinit var sceneTransitionStateFlow: MutableStateFlow<ObservableTransitionState> private lateinit var fakeSceneDataSource: FakeSceneDataSource @@ -217,9 +215,13 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { ) mSetFlagsRule.disableFlags( FLAG_SIDEFPS_CONTROLLER_REFACTOR, - AConfigFlags.FLAG_KEYGUARD_WM_STATE_REFACTOR, - AConfigFlags.FLAG_REFACTOR_KEYGUARD_DISMISS_INTENT, ) + if (!com.android.systemui.Flags.sceneContainer()) { + mSetFlagsRule.disableFlags( + AConfigFlags.FLAG_KEYGUARD_WM_STATE_REFACTOR, + AConfigFlags.FLAG_REFACTOR_KEYGUARD_DISMISS_INTENT, + ) + } keyguardPasswordViewController = KeyguardPasswordViewController( @@ -268,7 +270,6 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { falsingManager, userSwitcherController, featureFlags, - kosmos.sceneContainerFlags, globalSettings, sessionTracker, Optional.of(sideFpsController), @@ -283,7 +284,7 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { deviceProvisionedController, faceAuthAccessibilityDelegate, keyguardTransitionInteractor, - primaryBouncerInteractor, + { primaryBouncerInteractor }, ) { deviceEntryInteractor } @@ -804,17 +805,17 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { } @Test + @EnableSceneContainer fun dismissesKeyguard_whenSceneChangesToGone() = kosmos.testScope.runTest { - kosmos.fakeSceneContainerFlags.enabled = true // Upon init, we have never dismisses the keyguard. underTest.onInit() runCurrent() - verify(viewMediatorCallback, never()).keyguardDone(anyInt()) + verify(primaryBouncerInteractor, never()) + .notifyKeyguardAuthenticatedPrimaryAuth(anyInt()) // Once the view is attached, we start listening but simply going to the bouncer scene - // is - // not enough to trigger a dismissal of the keyguard. + // is not enough to trigger a dismissal of the keyguard. underTest.onViewAttached() fakeSceneDataSource.pause() sceneInteractor.changeScene(Scenes.Bouncer, "reason") @@ -830,7 +831,8 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { fakeSceneDataSource.unpause(expectedScene = Scenes.Bouncer) sceneTransitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Bouncer) runCurrent() - verify(viewMediatorCallback, never()).keyguardDone(anyInt()) + verify(primaryBouncerInteractor, never()) + .notifyKeyguardAuthenticatedPrimaryAuth(anyInt()) // While listening, going from the bouncer scene to the gone scene, does dismiss the // keyguard. @@ -852,11 +854,11 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { fakeSceneDataSource.unpause(expectedScene = Scenes.Gone) sceneTransitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Gone) runCurrent() - verify(viewMediatorCallback).keyguardDone(anyInt()) + verify(primaryBouncerInteractor).notifyKeyguardAuthenticatedPrimaryAuth(anyInt()) // While listening, moving back to the bouncer scene does not dismiss the keyguard // again. - clearInvocations(viewMediatorCallback) + clearInvocations(primaryBouncerInteractor) fakeSceneDataSource.pause() sceneInteractor.changeScene(Scenes.Bouncer, "reason") sceneTransitionStateFlow.value = @@ -871,7 +873,8 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { fakeSceneDataSource.unpause(expectedScene = Scenes.Bouncer) sceneTransitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Bouncer) runCurrent() - verify(viewMediatorCallback, never()).keyguardDone(anyInt()) + verify(primaryBouncerInteractor, never()) + .notifyKeyguardAuthenticatedPrimaryAuth(anyInt()) // Detaching the view stops listening, so moving from the bouncer scene to the gone // scene @@ -891,7 +894,8 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { fakeSceneDataSource.unpause(expectedScene = Scenes.Gone) sceneTransitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Gone) runCurrent() - verify(viewMediatorCallback, never()).keyguardDone(anyInt()) + verify(primaryBouncerInteractor, never()) + .notifyKeyguardAuthenticatedPrimaryAuth(anyInt()) // While not listening, moving to the lockscreen does not dismiss the keyguard. fakeSceneDataSource.pause() @@ -908,7 +912,8 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { fakeSceneDataSource.unpause(expectedScene = Scenes.Lockscreen) sceneTransitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Lockscreen) runCurrent() - verify(viewMediatorCallback, never()).keyguardDone(anyInt()) + verify(primaryBouncerInteractor, never()) + .notifyKeyguardAuthenticatedPrimaryAuth(anyInt()) // Reattaching the view starts listening again so moving from the bouncer scene to the // gone scene now does dismiss the keyguard again, this time from lockscreen. @@ -927,7 +932,7 @@ class KeyguardSecurityContainerControllerTest : SysuiTestCase() { fakeSceneDataSource.unpause(expectedScene = Scenes.Gone) sceneTransitionStateFlow.value = ObservableTransitionState.Idle(Scenes.Gone) runCurrent() - verify(viewMediatorCallback).keyguardDone(anyInt()) + verify(primaryBouncerInteractor).notifyKeyguardAuthenticatedPrimaryAuth(anyInt()) } @Test diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/authentication/data/repository/AuthenticationRepositoryTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/authentication/data/repository/AuthenticationRepositoryTest.kt index caf92199737c..1cd9d76a189e 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/authentication/data/repository/AuthenticationRepositoryTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/authentication/data/repository/AuthenticationRepositoryTest.kt @@ -32,7 +32,6 @@ import com.android.systemui.coroutines.collectValues import com.android.systemui.kosmos.testDispatcher import com.android.systemui.kosmos.testScope import com.android.systemui.log.table.TableLogBuffer -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeMobileConnectionsRepository import com.android.systemui.statusbar.pipeline.mobile.util.FakeMobileMappingsProxy import com.android.systemui.testKosmos @@ -86,7 +85,6 @@ class AuthenticationRepositoryTest : SysuiTestCase() { AuthenticationRepositoryImpl( applicationScope = testScope.backgroundScope, backgroundDispatcher = kosmos.testDispatcher, - flags = kosmos.sceneContainerFlags, clock = clock, getSecurityMode = getSecurityMode, userRepository = userRepository, diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/BouncerActionButtonInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/BouncerActionButtonInteractorTest.kt index 741cde82354a..d850f17cd89a 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/BouncerActionButtonInteractorTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/BouncerActionButtonInteractorTest.kt @@ -29,10 +29,10 @@ import com.android.systemui.authentication.data.repository.fakeAuthenticationRep import com.android.systemui.authentication.shared.model.AuthenticationMethodModel import com.android.systemui.common.ui.data.repository.fakeConfigurationRepository import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.flags.Flags.REFACTOR_GETCURRENTUSER import com.android.systemui.flags.fakeFeatureFlagsClassic import com.android.systemui.kosmos.testScope -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.statusbar.pipeline.mobile.data.repository.FakeMobileConnectionsRepository import com.android.systemui.statusbar.pipeline.mobile.data.repository.fakeMobileConnectionsRepository import com.android.systemui.telephony.data.repository.fakeTelephonyRepository @@ -56,6 +56,7 @@ import org.mockito.MockitoAnnotations @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @RunWith(AndroidJUnit4::class) +@EnableSceneContainer class BouncerActionButtonInteractorTest : SysuiTestCase() { @Mock private lateinit var selectedUserInteractor: SelectedUserInteractor @@ -75,7 +76,6 @@ class BouncerActionButtonInteractorTest : SysuiTestCase() { @Before fun setUp() { MockitoAnnotations.initMocks(this) - kosmos.fakeSceneContainerFlags.enabled = true mobileConnectionsRepository = kosmos.fakeMobileConnectionsRepository diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt index cbdb71bf9040..361b078ebd30 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/BouncerInteractorTest.kt @@ -30,11 +30,11 @@ import com.android.systemui.bouncer.shared.logging.BouncerUiEvent import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectValues import com.android.systemui.deviceentry.domain.interactor.deviceEntryFaceAuthInteractor +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.keyguard.data.repository.fakeDeviceEntryFaceAuthRepository import com.android.systemui.kosmos.testScope import com.android.systemui.power.data.repository.fakePowerRepository import com.android.systemui.res.R -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.testKosmos import com.google.common.truth.Truth.assertThat import kotlin.time.Duration.Companion.seconds @@ -50,9 +50,10 @@ import org.mockito.MockitoAnnotations @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @RunWith(AndroidJUnit4::class) +@EnableSceneContainer class BouncerInteractorTest : SysuiTestCase() { - private val kosmos = testKosmos().apply { fakeSceneContainerFlags.enabled = true } + private val kosmos = testKosmos() private val testScope = kosmos.testScope private val authenticationInteractor = kosmos.authenticationInteractor private val uiEventLoggerFake = kosmos.uiEventLoggerFake diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/BouncerViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/BouncerViewModelTest.kt index 0db0e0767767..b83c0ce702a7 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/BouncerViewModelTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/BouncerViewModelTest.kt @@ -34,10 +34,10 @@ import com.android.systemui.authentication.shared.model.AuthenticationMethodMode import com.android.systemui.authentication.shared.model.AuthenticationMethodModel.Sim import com.android.systemui.bouncer.domain.interactor.bouncerInteractor import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.flags.Flags import com.android.systemui.flags.fakeFeatureFlagsClassic import com.android.systemui.kosmos.testScope -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.scene.shared.model.fakeSceneDataSource import com.android.systemui.testKosmos @@ -60,6 +60,7 @@ import org.junit.runner.RunWith @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @RunWith(AndroidJUnit4::class) +@EnableSceneContainer class BouncerViewModelTest : SysuiTestCase() { private val kosmos = testKosmos() @@ -70,7 +71,6 @@ class BouncerViewModelTest : SysuiTestCase() { @Before fun setUp() { - kosmos.fakeSceneContainerFlags.enabled = true underTest = kosmos.bouncerViewModel } diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt index f21e9697c91f..497180b60151 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/communal/domain/interactor/CommunalInteractorTest.kt @@ -52,6 +52,7 @@ import com.android.systemui.communal.shared.model.CommunalScenes import com.android.systemui.communal.shared.model.CommunalWidgetContentModel import com.android.systemui.communal.widgets.EditWidgetsActivityStarter import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.flags.Flags import com.android.systemui.flags.fakeFeatureFlagsClassic import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository @@ -61,7 +62,6 @@ import com.android.systemui.plugins.ActivityStarter import com.android.systemui.plugins.activityStarter import com.android.systemui.scene.domain.interactor.SceneInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.settings.FakeUserTracker import com.android.systemui.settings.fakeUserTracker @@ -698,10 +698,9 @@ class CommunalInteractorTest : SysuiTestCase() { } @Test + @EnableSceneContainer fun isCommunalShowing_whenSceneContainerEnabled() = testScope.runTest { - kosmos.fakeSceneContainerFlags.enabled = true - // Verify default is false val isCommunalShowing by collectLastValue(underTest.isCommunalShowing) runCurrent() diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt index 5caf35ba90d4..37a6ac6adac7 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryInteractorTest.kt @@ -38,6 +38,7 @@ import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReaso import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason.TrustAgentDisabled import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason.UnattendedUpdate import com.android.systemui.deviceentry.shared.model.DeviceEntryRestrictionReason.UserLockdown +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.flags.fakeSystemPropertiesHelper import com.android.systemui.keyguard.data.repository.fakeBiometricSettingsRepository import com.android.systemui.keyguard.data.repository.fakeDeviceEntryFaceAuthRepository @@ -47,7 +48,6 @@ import com.android.systemui.keyguard.shared.model.AuthenticationFlags import com.android.systemui.keyguard.shared.model.SuccessFingerprintAuthenticationStatus import com.android.systemui.kosmos.testScope import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.testKosmos import com.google.common.truth.Truth.assertThat @@ -62,6 +62,7 @@ import org.junit.runner.RunWith @OptIn(ExperimentalCoroutinesApi::class) @SmallTest @RunWith(AndroidJUnit4::class) +@EnableSceneContainer class DeviceEntryInteractorTest : SysuiTestCase() { private val kosmos = testKosmos() @@ -74,7 +75,6 @@ class DeviceEntryInteractorTest : SysuiTestCase() { @Before fun setUp() { - kosmos.fakeSceneContainerFlags.enabled = true underTest = kosmos.deviceEntryInteractor } diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorTest.kt index 1dd5d073bef3..12f891835d0e 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorTest.kt @@ -28,6 +28,7 @@ import com.android.systemui.bouncer.data.repository.FakeKeyguardBouncerRepositor import com.android.systemui.common.ui.data.repository.FakeConfigurationRepository import com.android.systemui.common.ui.domain.interactor.ConfigurationInteractor import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.keyguard.data.repository.FakeCommandQueue import com.android.systemui.keyguard.data.repository.fakeKeyguardRepository import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository @@ -37,8 +38,6 @@ import com.android.systemui.keyguard.shared.model.StatusBarState import com.android.systemui.kosmos.testScope import com.android.systemui.power.domain.interactor.PowerInteractorFactory import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.shade.data.repository.FakeShadeRepository import com.android.systemui.statusbar.notification.stack.domain.interactor.sharedNotificationContainerInteractor @@ -76,7 +75,6 @@ class KeyguardInteractorTest : SysuiTestCase() { repository = repository, commandQueue = commandQueue, powerInteractor = PowerInteractorFactory.create().powerInteractor, - sceneContainerFlags = kosmos.sceneContainerFlags, bouncerRepository = bouncerRepository, configurationInteractor = ConfigurationInteractor(FakeConfigurationRepository()), shadeRepository = shadeRepository, @@ -249,9 +247,9 @@ class KeyguardInteractorTest : SysuiTestCase() { } @Test + @EnableSceneContainer fun animationDozingTransitions() = testScope.runTest { - kosmos.fakeSceneContainerFlags.enabled = true val isAnimate by collectLastValue(underTest.animateDozingTransitions) underTest.setAnimateDozingTransitions(true) diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt index a277fe03daba..470d342402e1 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt @@ -51,6 +51,7 @@ import com.android.systemui.deviceentry.data.repository.fakeDeviceEntryRepositor import com.android.systemui.deviceentry.domain.interactor.deviceEntryFaceAuthInteractor import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor import com.android.systemui.deviceentry.domain.interactor.deviceUnlockedInteractor +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.flags.Flags import com.android.systemui.flags.fakeFeatureFlagsClassic import com.android.systemui.keyguard.domain.interactor.keyguardInteractor @@ -69,7 +70,6 @@ import com.android.systemui.qs.ui.adapter.FakeQSSceneAdapter import com.android.systemui.scene.domain.interactor.sceneContainerOcclusionInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor import com.android.systemui.scene.domain.startable.SceneContainerStartable -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.scene.shared.model.fakeSceneDataSource import com.android.systemui.scene.ui.viewmodel.SceneContainerViewModel @@ -128,9 +128,10 @@ import org.mockito.MockitoAnnotations @SmallTest @RunWith(AndroidJUnit4::class) @RunWithLooper +@EnableSceneContainer class SceneFrameworkIntegrationTest : SysuiTestCase() { - private val kosmos = testKosmos().apply { fakeSceneContainerFlags.enabled = true } + private val kosmos = testKosmos() private val testScope = kosmos.testScope private val sceneContainerConfig by lazy { kosmos.sceneContainerConfig } private val sceneInteractor by lazy { kosmos.sceneInteractor } @@ -236,15 +237,15 @@ class SceneFrameworkIntegrationTest : SysuiTestCase() { applicationScope = testScope.backgroundScope, sceneInteractor = sceneInteractor, deviceEntryInteractor = deviceEntryInteractor, + deviceUnlockedInteractor = kosmos.deviceUnlockedInteractor, + bouncerInteractor = bouncerInteractor, keyguardInteractor = keyguardInteractor, - flags = kosmos.fakeSceneContainerFlags, sysUiState = sysUiState, displayId = displayTracker.defaultDisplayId, sceneLogger = mock(), falsingCollector = kosmos.falsingCollector, falsingManager = kosmos.falsingManager, powerInteractor = powerInteractor, - bouncerInteractor = bouncerInteractor, simBouncerInteractor = dagger.Lazy { kosmos.simBouncerInteractor }, authenticationInteractor = dagger.Lazy { kosmos.authenticationInteractor }, windowController = mock(), @@ -253,7 +254,6 @@ class SceneFrameworkIntegrationTest : SysuiTestCase() { headsUpInteractor = kosmos.headsUpNotificationInteractor, occlusionInteractor = kosmos.sceneContainerOcclusionInteractor, faceUnlockInteractor = kosmos.deviceEntryFaceAuthInteractor, - deviceUnlockedInteractor = kosmos.deviceUnlockedInteractor, shadeInteractor = kosmos.shadeInteractor, ) startable.start() diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt index 7f7c24e6efa4..8e2eea178708 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/data/repository/SceneContainerRepositoryTest.kt @@ -23,10 +23,10 @@ import androidx.test.filters.SmallTest import com.android.compose.animation.scene.ObservableTransitionState import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.kosmos.testScope import com.android.systemui.scene.sceneContainerConfig import com.android.systemui.scene.sceneKeys -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.testKosmos import com.google.common.truth.Truth.assertThat @@ -39,9 +39,10 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) +@EnableSceneContainer class SceneContainerRepositoryTest : SysuiTestCase() { - private val kosmos = testKosmos().apply { fakeSceneContainerFlags.enabled = true } + private val kosmos = testKosmos() private val testScope = kosmos.testScope @Test diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt index b179c30e60b9..63f481695232 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/SceneInteractorTest.kt @@ -23,13 +23,13 @@ import androidx.test.filters.SmallTest import com.android.compose.animation.scene.ObservableTransitionState import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.keyguard.data.repository.fakeDeviceEntryFingerprintAuthRepository import com.android.systemui.keyguard.shared.model.SuccessFingerprintAuthenticationStatus import com.android.systemui.kosmos.testScope import com.android.systemui.scene.data.repository.sceneContainerRepository import com.android.systemui.scene.sceneContainerConfig import com.android.systemui.scene.sceneKeys -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.scene.shared.model.fakeSceneDataSource import com.android.systemui.testKosmos @@ -45,6 +45,7 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) +@EnableSceneContainer class SceneInteractorTest : SysuiTestCase() { private val kosmos = testKosmos() @@ -55,7 +56,6 @@ class SceneInteractorTest : SysuiTestCase() { @Before fun setUp() { - kosmos.fakeSceneContainerFlags.enabled = true underTest = kosmos.sceneInteractor } diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractorTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractorTest.kt index d5e43f44426b..bfe5ef7acbce 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractorTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractorTest.kt @@ -31,7 +31,6 @@ import com.android.systemui.power.domain.interactor.PowerInteractor.Companion.se import com.android.systemui.power.domain.interactor.PowerInteractor.Companion.setAwakeForTest import com.android.systemui.power.domain.interactor.PowerInteractorFactory import com.android.systemui.scene.data.repository.WindowRootViewVisibilityRepository -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationListRepository import com.android.systemui.statusbar.notification.data.repository.setActiveNotifs @@ -82,7 +81,6 @@ class WindowRootViewVisibilityInteractorTest : SysuiTestCase() { headsUpManager, powerInteractor, activeNotificationsInteractor, - kosmos.sceneContainerFlags, kosmos::sceneInteractor, ) .apply { setUp(notificationPresenter, notificationsController) } diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt index 61adcd2e2c25..1472a4d0a620 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/domain/startable/SceneContainerStartableTest.kt @@ -54,7 +54,6 @@ import com.android.systemui.power.domain.interactor.PowerInteractorFactory import com.android.systemui.power.shared.model.WakefulnessState import com.android.systemui.scene.domain.interactor.sceneContainerOcclusionInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.scene.shared.model.fakeSceneDataSource import com.android.systemui.shade.domain.interactor.shadeInteractor @@ -102,7 +101,6 @@ class SceneContainerStartableTest : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope private val sceneInteractor by lazy { kosmos.sceneInteractor } - private val sceneContainerFlags by lazy { kosmos.fakeSceneContainerFlags } private val authenticationInteractor by lazy { kosmos.authenticationInteractor } private val bouncerInteractor by lazy { kosmos.bouncerInteractor } private val faceAuthRepository by lazy { kosmos.fakeDeviceEntryFaceAuthRepository } @@ -124,15 +122,15 @@ class SceneContainerStartableTest : SysuiTestCase() { applicationScope = testScope.backgroundScope, sceneInteractor = sceneInteractor, deviceEntryInteractor = deviceEntryInteractor, + deviceUnlockedInteractor = kosmos.deviceUnlockedInteractor, + bouncerInteractor = bouncerInteractor, keyguardInteractor = keyguardInteractor, - flags = sceneContainerFlags, sysUiState = sysUiState, displayId = Display.DEFAULT_DISPLAY, sceneLogger = mock(), falsingCollector = falsingCollector, falsingManager = kosmos.falsingManager, powerInteractor = powerInteractor, - bouncerInteractor = bouncerInteractor, simBouncerInteractor = { kosmos.simBouncerInteractor }, authenticationInteractor = { authenticationInteractor }, windowController = windowController, @@ -141,7 +139,6 @@ class SceneContainerStartableTest : SysuiTestCase() { headsUpInteractor = kosmos.headsUpNotificationInteractor, occlusionInteractor = kosmos.sceneContainerOcclusionInteractor, faceUnlockInteractor = kosmos.deviceEntryFaceAuthInteractor, - deviceUnlockedInteractor = kosmos.deviceUnlockedInteractor, shadeInteractor = kosmos.shadeInteractor, ) } @@ -1245,7 +1242,6 @@ class SceneContainerStartableTest : SysuiTestCase() { "Cannot start on the Gone scene and have the device be locked at the same time." } - sceneContainerFlags.enabled = true kosmos.fakeDeviceEntryRepository.setBypassEnabled(isBypassEnabled) authenticationMethod?.let { kosmos.fakeAuthenticationRepository.setAuthenticationMethod(authenticationMethod) diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/shared/flag/SceneContainerFlagsTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/shared/flag/SceneContainerFlagsTest.kt index 2938acf293b3..ae5bf073a9f8 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/shared/flag/SceneContainerFlagsTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/shared/flag/SceneContainerFlagsTest.kt @@ -21,7 +21,6 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.flags.EnableSceneContainer -import com.android.systemui.kosmos.Kosmos import com.google.common.truth.Truth import org.junit.Test import org.junit.runner.RunWith @@ -34,15 +33,11 @@ internal class SceneContainerFlagsTest : SysuiTestCase() { @DisableSceneContainer fun isNotEnabled_withoutAconfigFlags() { Truth.assertThat(SceneContainerFlag.isEnabled).isEqualTo(false) - Truth.assertThat(SceneContainerFlagsImpl().isEnabled()).isEqualTo(false) - Truth.assertThat(Kosmos().sceneContainerFlags.isEnabled()).isEqualTo(false) } @Test @EnableSceneContainer fun isEnabled_withAconfigFlags() { Truth.assertThat(SceneContainerFlag.isEnabled).isEqualTo(true) - Truth.assertThat(SceneContainerFlagsImpl().isEnabled()).isEqualTo(true) - Truth.assertThat(Kosmos().sceneContainerFlags.isEnabled()).isEqualTo(true) } } diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt index 7b0127e94fb7..427b66bcff8a 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/scene/ui/viewmodel/SceneContainerViewModelTest.kt @@ -23,13 +23,13 @@ import com.android.systemui.SysuiTestCase import com.android.systemui.classifier.domain.interactor.falsingInteractor import com.android.systemui.classifier.fakeFalsingManager import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.kosmos.testScope import com.android.systemui.power.data.repository.fakePowerRepository import com.android.systemui.power.domain.interactor.powerInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor import com.android.systemui.scene.sceneContainerConfig import com.android.systemui.scene.sceneKeys -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.scene.shared.model.fakeSceneDataSource import com.android.systemui.testKosmos @@ -45,6 +45,7 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) +@EnableSceneContainer class SceneContainerViewModelTest : SysuiTestCase() { private val kosmos = testKosmos() @@ -58,7 +59,6 @@ class SceneContainerViewModelTest : SysuiTestCase() { @Before fun setUp() { - kosmos.fakeSceneContainerFlags.enabled = true underTest = SceneContainerViewModel( sceneInteractor = sceneInteractor, diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ShadeControllerSceneImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ShadeControllerSceneImplTest.kt index cbbcce96873b..420418b60d07 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ShadeControllerSceneImplTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/ShadeControllerSceneImplTest.kt @@ -22,6 +22,7 @@ import com.android.compose.animation.scene.ObservableTransitionState import com.android.compose.animation.scene.SceneKey import com.android.systemui.SysuiTestCase import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.flags.Flags import com.android.systemui.flags.fakeFeatureFlagsClassic import com.android.systemui.keyguard.data.repository.fakeDeviceEntryFingerprintAuthRepository @@ -30,7 +31,6 @@ import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.testCase import com.android.systemui.kosmos.testScope import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.shade.domain.interactor.ShadeInteractor import com.android.systemui.shade.domain.interactor.shadeInteractor @@ -52,6 +52,7 @@ import org.mockito.Mockito.verify @ExperimentalCoroutinesApi @SmallTest @RunWith(AndroidJUnit4::class) +@EnableSceneContainer class ShadeControllerSceneImplTest : SysuiTestCase() { private val kosmos = Kosmos() private val testScope = kosmos.testScope @@ -64,7 +65,6 @@ class ShadeControllerSceneImplTest : SysuiTestCase() { @Before fun setup() { kosmos.testCase = this - kosmos.fakeSceneContainerFlags.enabled = true kosmos.fakeFeatureFlagsClassic.apply { set(Flags.FULL_SCREEN_USER_SWITCHER, false) set(Flags.NSSL_DEBUG_LINES, false) diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeBackActionInteractorImplTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeBackActionInteractorImplTest.kt index e759b504d5c3..26f342aa05ce 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeBackActionInteractorImplTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/shade/domain/interactor/ShadeBackActionInteractorImplTest.kt @@ -22,9 +22,9 @@ import androidx.test.filters.SmallTest import com.android.compose.animation.scene.ObservableTransitionState import com.android.compose.animation.scene.SceneKey import com.android.systemui.SysuiTestCase +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.kosmos.testScope import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.shared.recents.utilities.Utilities import com.android.systemui.testKosmos @@ -43,8 +43,9 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) @Ignore("b/328827631") +@EnableSceneContainer class ShadeBackActionInteractorImplTest : SysuiTestCase() { - val kosmos = testKosmos().apply { fakeSceneContainerFlags.enabled = true } + val kosmos = testKosmos() val testScope = kosmos.testScope val sceneInteractor = kosmos.sceneInteractor val underTest = kosmos.shadeBackActionInteractor diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationStackAppearanceIntegrationTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationStackAppearanceIntegrationTest.kt index a3cf92986bd6..01e1aa59912f 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationStackAppearanceIntegrationTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/NotificationStackAppearanceIntegrationTest.kt @@ -23,11 +23,11 @@ import androidx.test.filters.SmallTest import com.android.compose.animation.scene.ObservableTransitionState import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.flags.Flags import com.android.systemui.flags.fakeFeatureFlagsClassic import com.android.systemui.kosmos.testScope import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.scene.shared.model.fakeSceneDataSource import com.android.systemui.statusbar.notification.stack.shared.model.ShadeScrimBounds @@ -46,11 +46,11 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) +@EnableSceneContainer class NotificationStackAppearanceIntegrationTest : SysuiTestCase() { private val kosmos = testKosmos().apply { - fakeSceneContainerFlags.enabled = true fakeFeatureFlagsClassic.apply { set(Flags.FULL_SCREEN_USER_SWITCHER, false) set(Flags.NSSL_DEBUG_LINES, false) diff --git a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt index 8f7a56de0040..a023033e3aa3 100644 --- a/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt +++ b/packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/SharedNotificationContainerViewModelTest.kt @@ -52,7 +52,6 @@ import com.android.systemui.keyguard.ui.viewmodel.keyguardRootViewModel import com.android.systemui.kosmos.testScope import com.android.systemui.res.R import com.android.systemui.scene.shared.flag.SceneContainerFlag -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.shade.data.repository.shadeRepository import com.android.systemui.shade.mockLargeScreenHeaderHelper import com.android.systemui.statusbar.notification.stack.domain.interactor.sharedNotificationContainerInteractor @@ -128,7 +127,7 @@ class SharedNotificationContainerViewModelTest(flags: FlagsParameterization?) : @Before fun setUp() { - assertThat(kosmos.sceneContainerFlags.isEnabled()).isEqualTo(SceneContainerFlag.isEnabled) + assertThat(SceneContainerFlag.isEnabled).isEqualTo(SceneContainerFlag.isEnabled) overrideResource(R.bool.config_use_split_notification_shade, false) movementFlow = MutableStateFlow(BurnInModel()) whenever(aodBurnInViewModel.movement(any())).thenReturn(movementFlow) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java index c509356c4e63..e8e1cab4b932 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java @@ -90,7 +90,7 @@ import com.android.systemui.log.SessionTracker; import com.android.systemui.plugins.ActivityStarter; import com.android.systemui.plugins.FalsingManager; import com.android.systemui.res.R; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; +import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.shared.system.SysUiStatsLog; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.DeviceProvisionedController; @@ -134,7 +134,6 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard private final UserSwitcherController mUserSwitcherController; private final GlobalSettings mGlobalSettings; private final FeatureFlags mFeatureFlags; - private final SceneContainerFlags mSceneContainerFlags; private final SessionTracker mSessionTracker; private final Optional<SideFpsController> mSideFpsController; private final FalsingA11yDelegate mFalsingA11yDelegate; @@ -456,7 +455,6 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard FalsingManager falsingManager, UserSwitcherController userSwitcherController, FeatureFlags featureFlags, - SceneContainerFlags sceneContainerFlags, GlobalSettings globalSettings, SessionTracker sessionTracker, Optional<SideFpsController> sideFpsController, @@ -491,7 +489,6 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard mFalsingManager = falsingManager; mUserSwitcherController = userSwitcherController; mFeatureFlags = featureFlags; - mSceneContainerFlags = sceneContainerFlags; mGlobalSettings = globalSettings; mSessionTracker = sessionTracker; if (SideFpsControllerRefactor.isEnabled()) { @@ -534,7 +531,7 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard showPrimarySecurityScreen(false); - if (mSceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled()) { // When the scene framework says that the lockscreen has been dismissed, dismiss the // keyguard here, revealing the underlying app or launcher: mSceneTransitionCollectionJob = mJavaAdapter.get().alwaysCollectFlow( diff --git a/packages/SystemUI/src/com/android/keyguard/LegacyLockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LegacyLockIconViewController.java index 4e5df3543451..cf2675b46418 100644 --- a/packages/SystemUI/src/com/android/keyguard/LegacyLockIconViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/LegacyLockIconViewController.java @@ -74,7 +74,7 @@ import com.android.systemui.keyguard.shared.model.TransitionStep; import com.android.systemui.plugins.FalsingManager; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.res.R; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; +import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.statusbar.StatusBarState; import com.android.systemui.statusbar.VibratorHelper; import com.android.systemui.statusbar.policy.ConfigurationController; @@ -131,7 +131,6 @@ public class LegacyLockIconViewController implements Dumpable, LockIconViewContr @NonNull private final KeyguardInteractor mKeyguardInteractor; @NonNull private final View.AccessibilityDelegate mAccessibilityDelegate; @NonNull private final Lazy<DeviceEntryInteractor> mDeviceEntryInteractor; - @NonNull private final SceneContainerFlags mSceneContainerFlags; // Tracks the velocity of a touch to help filter out the touches that move too fast. private VelocityTracker mVelocityTracker; @@ -208,8 +207,7 @@ public class LegacyLockIconViewController implements Dumpable, LockIconViewContr @NonNull FeatureFlags featureFlags, PrimaryBouncerInteractor primaryBouncerInteractor, Context context, - Lazy<DeviceEntryInteractor> deviceEntryInteractor, - SceneContainerFlags sceneContainerFlags + Lazy<DeviceEntryInteractor> deviceEntryInteractor ) { mStatusBarStateController = statusBarStateController; mKeyguardUpdateMonitor = keyguardUpdateMonitor; @@ -236,7 +234,6 @@ public class LegacyLockIconViewController implements Dumpable, LockIconViewContr mResources = resources; mContext = context; mDeviceEntryInteractor = deviceEntryInteractor; - mSceneContainerFlags = sceneContainerFlags; mAccessibilityDelegate = new View.AccessibilityDelegate() { private final AccessibilityNodeInfo.AccessibilityAction mAccessibilityAuthenticateHint = @@ -746,7 +743,7 @@ public class LegacyLockIconViewController implements Dumpable, LockIconViewContr // play device entry haptic (consistent with UDFPS controller longpress) vibrateOnLongPress(); - if (mSceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled()) { mDeviceEntryInteractor.get().attemptDeviceEntry(); } else { mKeyguardViewController.showPrimaryBouncer(/* scrim */ true); diff --git a/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt b/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt index 454ed27161a2..a9f985f0955b 100644 --- a/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt +++ b/packages/SystemUI/src/com/android/systemui/authentication/data/repository/AuthenticationRepository.kt @@ -36,7 +36,7 @@ import com.android.systemui.broadcast.BroadcastDispatcher import com.android.systemui.dagger.SysUISingleton import com.android.systemui.dagger.qualifiers.Application import com.android.systemui.dagger.qualifiers.Background -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.statusbar.pipeline.mobile.data.repository.MobileConnectionsRepository import com.android.systemui.user.data.repository.UserRepository import com.android.systemui.util.kotlin.onSubscriberAdded @@ -186,7 +186,6 @@ class AuthenticationRepositoryImpl constructor( @Application private val applicationScope: CoroutineScope, @Background private val backgroundDispatcher: CoroutineDispatcher, - flags: SceneContainerFlags, private val clock: SystemClock, private val getSecurityMode: Function<Int, KeyguardSecurityModel.SecurityMode>, private val userRepository: UserRepository, @@ -255,7 +254,7 @@ constructor( override val hasLockoutOccurred: StateFlow<Boolean> = _hasLockoutOccurred.asStateFlow() init { - if (flags.isEnabled()) { + if (SceneContainerFlag.isEnabled) { // Hydrate failedAuthenticationAttempts initially and whenever the selected user // changes. applicationScope.launch { diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/shared/flag/ComposeBouncerFlags.kt b/packages/SystemUI/src/com/android/systemui/bouncer/shared/flag/ComposeBouncerFlags.kt index e789475b7877..62ef365345b7 100644 --- a/packages/SystemUI/src/com/android/systemui/bouncer/shared/flag/ComposeBouncerFlags.kt +++ b/packages/SystemUI/src/com/android/systemui/bouncer/shared/flag/ComposeBouncerFlags.kt @@ -18,7 +18,7 @@ package com.android.systemui.bouncer.shared.flag import com.android.systemui.Flags import com.android.systemui.dagger.SysUISingleton -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import dagger.Module import dagger.Provides @@ -42,11 +42,10 @@ interface ComposeBouncerFlags { fun isOnlyComposeBouncerEnabled(): Boolean } -class ComposeBouncerFlagsImpl(private val sceneContainerFlags: SceneContainerFlags) : - ComposeBouncerFlags { +class ComposeBouncerFlagsImpl() : ComposeBouncerFlags { override fun isComposeBouncerOrSceneContainerEnabled(): Boolean { - return sceneContainerFlags.isEnabled() || Flags.composeBouncer() + return SceneContainerFlag.isEnabled || Flags.composeBouncer() } @Deprecated( @@ -55,7 +54,7 @@ class ComposeBouncerFlagsImpl(private val sceneContainerFlags: SceneContainerFla replaceWith = ReplaceWith("isComposeBouncerOrSceneContainerEnabled()") ) override fun isOnlyComposeBouncerEnabled(): Boolean { - return !sceneContainerFlags.isEnabled() && Flags.composeBouncer() + return !SceneContainerFlag.isEnabled && Flags.composeBouncer() } } @@ -63,7 +62,7 @@ class ComposeBouncerFlagsImpl(private val sceneContainerFlags: SceneContainerFla object ComposeBouncerFlagsModule { @Provides @SysUISingleton - fun impl(sceneContainerFlags: SceneContainerFlags): ComposeBouncerFlags { - return ComposeBouncerFlagsImpl(sceneContainerFlags) + fun impl(): ComposeBouncerFlags { + return ComposeBouncerFlagsImpl() } } diff --git a/packages/SystemUI/src/com/android/systemui/classifier/FalsingModule.java b/packages/SystemUI/src/com/android/systemui/classifier/FalsingModule.java index af467ef1319b..613280c3ba5d 100644 --- a/packages/SystemUI/src/com/android/systemui/classifier/FalsingModule.java +++ b/packages/SystemUI/src/com/android/systemui/classifier/FalsingModule.java @@ -22,7 +22,7 @@ import android.view.ViewConfiguration; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.dagger.qualifiers.Main; import com.android.systemui.res.R; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; +import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.statusbar.phone.NotificationTapHelper; import dagger.Binds; @@ -51,9 +51,8 @@ public interface FalsingModule { @SysUISingleton static FalsingCollector providesFalsingCollectorLegacy( FalsingCollectorImpl impl, - FalsingCollectorNoOp noOp, - SceneContainerFlags flags) { - return flags.isEnabled() ? noOp : impl; + FalsingCollectorNoOp noOp) { + return SceneContainerFlag.isEnabled() ? noOp : impl; } /** Provides the actual {@link FalsingCollector}. */ diff --git a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt index 373e1c9daa7b..619e0525acd8 100644 --- a/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/communal/domain/interactor/CommunalInteractor.kt @@ -55,7 +55,7 @@ import com.android.systemui.log.table.TableLogBuffer import com.android.systemui.log.table.logDiffsForTable import com.android.systemui.plugins.ActivityStarter import com.android.systemui.scene.domain.interactor.SceneInteractor -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.settings.UserTracker import com.android.systemui.smartspace.data.repository.SmartspaceRepository @@ -107,7 +107,6 @@ constructor( private val userManager: UserManager, private val dockManager: DockManager, sceneInteractor: SceneInteractor, - sceneContainerFlags: SceneContainerFlags, @CommunalLog logBuffer: LogBuffer, @CommunalTableLog tableLogBuffer: TableLogBuffer, ) { @@ -216,7 +215,7 @@ constructor( */ // TODO(b/323215860): rename to something more appropriate after cleaning up usages val isCommunalShowing: Flow<Boolean> = - flow { emit(sceneContainerFlags.isEnabled()) } + flow { emit(SceneContainerFlag.isEnabled) } .flatMapLatest { sceneContainerEnabled -> if (sceneContainerEnabled) { sceneInteractor.currentScene.map { it == Scenes.Communal } diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/DeviceEntrySideFpsOverlayInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/DeviceEntrySideFpsOverlayInteractor.kt index bf1f07479f34..eef4b97ae34d 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/DeviceEntrySideFpsOverlayInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/DeviceEntrySideFpsOverlayInteractor.kt @@ -27,7 +27,7 @@ import com.android.systemui.keyguard.data.repository.BiometricType import com.android.systemui.keyguard.data.repository.DeviceEntryFingerprintAuthRepository import com.android.systemui.res.R import com.android.systemui.scene.domain.interactor.SceneInteractor -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.shared.model.Scenes import javax.inject.Inject import kotlinx.coroutines.CoroutineScope @@ -52,7 +52,6 @@ constructor( @Application private val applicationScope: CoroutineScope, @Application private val context: Context, deviceEntryFingerprintAuthRepository: DeviceEntryFingerprintAuthRepository, - private val sceneContainerFlags: SceneContainerFlags, private val sceneInteractor: SceneInteractor, private val primaryBouncerInteractor: PrimaryBouncerInteractor, alternateBouncerInteractor: AlternateBouncerInteractor, @@ -75,7 +74,7 @@ constructor( get() = context.resources.getBoolean(R.bool.config_show_sidefps_hint_on_bouncer) private val isBouncerSceneActive: Flow<Boolean> = - if (sceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled) { sceneInteractor.currentScene.map { it == Scenes.Bouncer }.distinctUntilChanged() } else { flowOf(false) @@ -115,7 +114,7 @@ constructor( .distinctUntilChanged() private fun isBouncerActive(): Boolean { - if (sceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled) { return sceneInteractor.currentScene.value == Scenes.Bouncer } return primaryBouncerInteractor.isBouncerShowing() && diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt index c4769488646d..7224536cfe70 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractor.kt @@ -44,7 +44,7 @@ import com.android.systemui.keyguard.shared.model.StatusBarState import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.res.R import com.android.systemui.scene.domain.interactor.SceneInteractor -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.shade.data.repository.ShadeRepository import com.android.systemui.statusbar.CommandQueue @@ -84,7 +84,6 @@ constructor( private val repository: KeyguardRepository, private val commandQueue: CommandQueue, powerInteractor: PowerInteractor, - sceneContainerFlags: SceneContainerFlags, bouncerRepository: KeyguardBouncerRepository, configurationInteractor: ConfigurationInteractor, shadeRepository: ShadeRepository, @@ -331,7 +330,7 @@ constructor( /** Whether to animate the next doze mode transition. */ val animateDozingTransitions: Flow<Boolean> by lazy { - if (sceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled) { sceneInteractorProvider .get() .transitioningTo diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryIconViewModel.kt b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryIconViewModel.kt index 49fffdd9ce9b..45dca99b7acc 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryIconViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryIconViewModel.kt @@ -30,7 +30,7 @@ import com.android.systemui.keyguard.domain.interactor.KeyguardTransitionInterac import com.android.systemui.keyguard.shared.model.KeyguardState import com.android.systemui.keyguard.ui.transitions.DeviceEntryIconTransition import com.android.systemui.keyguard.ui.view.DeviceEntryIconView -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.shade.domain.interactor.ShadeInteractor import com.android.systemui.util.kotlin.sample import dagger.Lazy @@ -64,7 +64,6 @@ constructor( transitionInteractor: KeyguardTransitionInteractor, val keyguardInteractor: KeyguardInteractor, val viewModel: AodToLockscreenTransitionViewModel, - private val sceneContainerFlags: SceneContainerFlags, private val keyguardViewController: Lazy<KeyguardViewController>, private val deviceEntryInteractor: DeviceEntryInteractor, private val deviceEntrySourceInteractor: DeviceEntrySourceInteractor, @@ -242,7 +241,7 @@ constructor( } suspend fun onLongPress() { - if (sceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled) { deviceEntryInteractor.attemptDeviceEntry() } else { keyguardViewController.get().showPrimaryBouncer(/* scrim */ true) diff --git a/packages/SystemUI/src/com/android/systemui/media/controls/util/MediaFlags.kt b/packages/SystemUI/src/com/android/systemui/media/controls/util/MediaFlags.kt index d4bd6daedfab..4e77d13b3303 100644 --- a/packages/SystemUI/src/com/android/systemui/media/controls/util/MediaFlags.kt +++ b/packages/SystemUI/src/com/android/systemui/media/controls/util/MediaFlags.kt @@ -21,16 +21,11 @@ import android.os.UserHandle import com.android.systemui.dagger.SysUISingleton import com.android.systemui.flags.FeatureFlagsClassic import com.android.systemui.flags.Flags -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import javax.inject.Inject @SysUISingleton -class MediaFlags -@Inject -constructor( - private val featureFlags: FeatureFlagsClassic, - private val sceneContainerFlags: SceneContainerFlags -) { +class MediaFlags @Inject constructor(private val featureFlags: FeatureFlagsClassic) { /** * Check whether media control actions should be based on PlaybackState instead of notification */ @@ -57,7 +52,7 @@ constructor( /** Check whether to use scene framework */ fun isSceneContainerEnabled() = - sceneContainerFlags.isEnabled() && MediaInSceneContainerFlag.isEnabled + SceneContainerFlag.isEnabled && MediaInSceneContainerFlag.isEnabled /** Check whether to use media refactor code */ fun isMediaControlsRefactorEnabled() = MediaControlsRefactorFlag.isEnabled diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImplController.java b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImplController.java index ffbc56098e26..7ccdf0ac301a 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSContainerImplController.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSContainerImplController.java @@ -24,7 +24,7 @@ import android.view.View; import com.android.systemui.plugins.FalsingManager; import com.android.systemui.qs.dagger.QSScope; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; +import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.util.ViewController; @@ -66,15 +66,14 @@ public class QSContainerImplController extends ViewController<QSContainerImpl> { QSPanelController qsPanelController, QuickStatusBarHeaderController quickStatusBarHeaderController, ConfigurationController configurationController, - FalsingManager falsingManager, - SceneContainerFlags sceneContainerFlags) { + FalsingManager falsingManager) { super(view); mQsPanelController = qsPanelController; mQuickStatusBarHeaderController = quickStatusBarHeaderController; mConfigurationController = configurationController; mFalsingManager = falsingManager; mQSPanelContainer = mView.getQSPanelContainer(); - mSceneContainerEnabled = sceneContainerFlags.isEnabled(); + mSceneContainerEnabled = SceneContainerFlag.isEnabled(); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSImpl.java b/packages/SystemUI/src/com/android/systemui/qs/QSImpl.java index a0607e9f859a..1f4838e85e79 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSImpl.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSImpl.java @@ -60,7 +60,7 @@ import com.android.systemui.qs.footer.ui.binder.FooterActionsViewBinder; import com.android.systemui.qs.footer.ui.viewmodel.FooterActionsViewModel; import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.res.R; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; +import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.settings.brightness.MirrorController; import com.android.systemui.shade.transition.LargeScreenShadeInterpolator; import com.android.systemui.statusbar.CommandQueue; @@ -174,8 +174,6 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl @Nullable private View mFooterActionsView; - private final SceneContainerFlags mSceneContainerFlags; - @Inject public QSImpl(RemoteInputQuickSettingsDisabler remoteInputQsDisabler, SysuiStatusBarStateController statusBarStateController, CommandQueue commandQueue, @@ -188,8 +186,7 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl FooterActionsViewModel.Factory footerActionsViewModelFactory, FooterActionsViewBinder footerActionsViewBinder, LargeScreenShadeInterpolator largeScreenShadeInterpolator, - FeatureFlags featureFlags, - SceneContainerFlags sceneContainerFlags) { + FeatureFlags featureFlags) { mRemoteInputQuickSettingsDisabler = remoteInputQsDisabler; mQsMediaHost = qsMediaHost; mQqsMediaHost = qqsMediaHost; @@ -205,8 +202,7 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl mFooterActionsViewModelFactory = footerActionsViewModelFactory; mFooterActionsViewBinder = footerActionsViewBinder; mListeningAndVisibilityLifecycleOwner = new ListeningAndVisibilityLifecycleOwner(); - mSceneContainerFlags = sceneContainerFlags; - if (mSceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled()) { mStatusBarState = StatusBarState.SHADE; } } @@ -224,7 +220,7 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl mQSPanelController.init(); mQuickQSPanelController.init(); - if (!mSceneContainerFlags.isEnabled()) { + if (!SceneContainerFlag.isEnabled()) { mQSFooterActionsViewModel = mFooterActionsViewModelFactory .create(mListeningAndVisibilityLifecycleOwner); bindFooterActionsView(mRootView); @@ -249,7 +245,7 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl mScrollListener.onQsPanelScrollChanged(scrollY); } }); - mQSPanelScrollView.setScrollingEnabled(!mSceneContainerFlags.isEnabled()); + mQSPanelScrollView.setScrollingEnabled(!SceneContainerFlag.isEnabled()); mHeader = mRootView.findViewById(R.id.header); mFooter = qsComponent.getQSFooter(); @@ -509,7 +505,7 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl @VisibleForTesting boolean isKeyguardState() { - if (mSceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled()) { return false; } else { // We want the freshest state here since otherwise we'll have some weirdness if earlier @@ -573,7 +569,7 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl } private void setKeyguardShowing(boolean keyguardShowing) { - if (!mSceneContainerFlags.isEnabled()) { + if (!SceneContainerFlag.isEnabled()) { if (DEBUG) Log.d(TAG, "setKeyguardShowing " + keyguardShowing); mLastQSExpansion = -1; @@ -651,7 +647,7 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl @Override public int getHeightDiff() { - if (mSceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled()) { return mQSPanelController.getViewBottom() - mHeader.getBottom() + mHeader.getPaddingBottom(); } else { @@ -720,7 +716,7 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl mQSPanelController.getTileLayout().setExpansion(expansion, proposedTranslation); mQuickQSPanelController.getTileLayout().setExpansion(expansion, proposedTranslation); - if (!mSceneContainerFlags.isEnabled()) { + if (!SceneContainerFlag.isEnabled()) { float qsScrollViewTranslation = onKeyguard && !mShowCollapsedOnKeyguard ? panelTranslationY : 0; mQSPanelScrollView.setTranslationY(qsScrollViewTranslation); @@ -824,7 +820,7 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl mQsBounds.set(-sideMargin, 0, mQSPanelScrollView.getWidth() + sideMargin, mQSPanelScrollView.getHeight()); } - if (!mSceneContainerFlags.isEnabled()) { + if (!SceneContainerFlag.isEnabled()) { mQSPanelScrollView.setClipBounds(mQsBounds); mQSPanelScrollView.getLocationOnScreen(mLocationTemp); @@ -907,7 +903,7 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl // The customize state changed, so our height changed. mContainer.updateExpansion(); boolean customizing = isCustomizing(); - if (mSceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled()) { mQSPanelController.setVisibility(!customizing ? View.VISIBLE : View.INVISIBLE); } else { mQSPanelScrollView.setVisibility(!customizing ? View.VISIBLE : View.INVISIBLE); @@ -984,7 +980,7 @@ public class QSImpl implements QS, CommandQueue.Callbacks, StatusBarStateControl @Override public void onStateChanged(int newState) { - if (mSceneContainerFlags.isEnabled() || newState == mStatusBarState) { + if (SceneContainerFlag.isEnabled() || newState == mStatusBarState) { return; } mStatusBarState = newState; diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java index b8c3c1a2af5f..e24caf19a14b 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanelController.java @@ -37,7 +37,7 @@ import com.android.systemui.plugins.FalsingManager; import com.android.systemui.qs.customize.QSCustomizerController; import com.android.systemui.qs.dagger.QSScope; import com.android.systemui.qs.logging.QSLogger; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; +import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.settings.brightness.BrightnessController; import com.android.systemui.settings.brightness.BrightnessMirrorHandler; import com.android.systemui.settings.brightness.BrightnessSliderController; @@ -94,7 +94,6 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> { FalsingManager falsingManager, StatusBarKeyguardViewManager statusBarKeyguardViewManager, SplitShadeStateController splitShadeStateController, - SceneContainerFlags sceneContainerFlags, Provider<QSLongPressEffect> longPRessEffectProvider) { super(view, qsHost, qsCustomizerController, usingMediaPlayer, mediaHost, metricsLogger, uiEventLogger, qsLogger, dumpManager, splitShadeStateController, @@ -113,7 +112,7 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> { mBrightnessMirrorHandler = new BrightnessMirrorHandler(mBrightnessController); mStatusBarKeyguardViewManager = statusBarKeyguardViewManager; mLastDensity = view.getResources().getConfiguration().densityDpi; - mSceneContainerEnabled = sceneContainerFlags.isEnabled(); + mSceneContainerEnabled = SceneContainerFlag.isEnabled(); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java index 1d92d782be69..bb40d3e69dc1 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeaderController.java @@ -17,7 +17,7 @@ package com.android.systemui.qs; import com.android.systemui.qs.dagger.QSScope; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; +import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.util.ViewController; import javax.inject.Inject; @@ -34,12 +34,11 @@ class QuickStatusBarHeaderController extends ViewController<QuickStatusBarHeader @Inject QuickStatusBarHeaderController(QuickStatusBarHeader view, - QuickQSPanelController quickQSPanelController, - SceneContainerFlags sceneContainerFlags + QuickQSPanelController quickQSPanelController ) { super(view); mQuickQSPanelController = quickQSPanelController; - mSceneContainerEnabled = sceneContainerFlags.isEnabled(); + mSceneContainerEnabled = SceneContainerFlag.isEnabled(); } @Override protected void onViewAttached() { diff --git a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizerController.java b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizerController.java index 34b1b2d0657a..a222b3cbd08c 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizerController.java +++ b/packages/SystemUI/src/com/android/systemui/qs/customize/QSCustomizerController.java @@ -42,7 +42,7 @@ import com.android.systemui.qs.QSEditEvent; import com.android.systemui.qs.QSHost; import com.android.systemui.qs.dagger.QSScope; import com.android.systemui.res.R; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; +import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.statusbar.phone.LightBarController; import com.android.systemui.statusbar.policy.ConfigurationController; import com.android.systemui.statusbar.policy.ConfigurationController.ConfigurationListener; @@ -107,8 +107,7 @@ public class QSCustomizerController extends ViewController<QSCustomizer> { protected QSCustomizerController(QSCustomizer view, TileQueryHelper tileQueryHelper, QSHost qsHost, TileAdapter tileAdapter, ScreenLifecycle screenLifecycle, KeyguardStateController keyguardStateController, LightBarController lightBarController, - ConfigurationController configurationController, UiEventLogger uiEventLogger, - SceneContainerFlags sceneContainerFlags) { + ConfigurationController configurationController, UiEventLogger uiEventLogger) { super(view); mTileQueryHelper = tileQueryHelper; mQsHost = qsHost; @@ -118,7 +117,7 @@ public class QSCustomizerController extends ViewController<QSCustomizer> { mLightBarController = lightBarController; mConfigurationController = configurationController; mUiEventLogger = uiEventLogger; - view.setSceneContainerEnabled(sceneContainerFlags.isEnabled()); + view.setSceneContainerEnabled(SceneContainerFlag.isEnabled()); mToolbar = mView.findViewById(com.android.internal.R.id.action_bar); } diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java index 4ece7b6c8990..1ddc0946905c 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java +++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java @@ -98,7 +98,7 @@ import com.android.systemui.navigationbar.NavigationModeController; import com.android.systemui.navigationbar.buttons.KeyButtonView; import com.android.systemui.recents.OverviewProxyService.OverviewProxyListener; import com.android.systemui.scene.domain.interactor.SceneInteractor; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; +import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.scene.shared.model.Scenes; import com.android.systemui.settings.DisplayTracker; import com.android.systemui.settings.UserTracker; @@ -146,7 +146,6 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis private static final long MAX_BACKOFF_MILLIS = 10 * 60 * 1000; private final Context mContext; - private final SceneContainerFlags mSceneContainerFlags; private final Executor mMainExecutor; private final ShellInterface mShellInterface; private final Lazy<ShadeViewController> mShadeViewControllerLazy; @@ -208,7 +207,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis @Override public void onStatusBarTouchEvent(MotionEvent event) { verifyCallerAndClearCallingIdentity("onStatusBarTouchEvent", () -> { - if (mSceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled()) { //TODO(b/329863123) implement latency tracking for shade scene Log.i(TAG_OPS, "Scene container enabled. Latency tracking not started."); } else if (event.getActionMasked() == ACTION_DOWN) { @@ -223,7 +222,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis // If scene framework is enabled, set the scene container window to // visible and let the touch "slip" into that window. - if (mSceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled()) { mSceneInteractor.get().onRemoteUserInteractionStarted("launcher swipe"); } else { mShadeViewControllerLazy.get().startInputFocusTransfer(); @@ -232,7 +231,7 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis if (action == ACTION_UP || action == ACTION_CANCEL) { mInputFocusTransferStarted = false; - if (!mSceneContainerFlags.isEnabled()) { + if (!SceneContainerFlag.isEnabled()) { float velocity = (event.getY() - mInputFocusTransferStartY) / (event.getEventTime() - mInputFocusTransferStartMillis); if (action == ACTION_CANCEL) { @@ -612,7 +611,6 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis KeyguardUnlockAnimationController sysuiUnlockAnimationController, InWindowLauncherUnlockAnimationManager inWindowLauncherUnlockAnimationManager, AssistUtils assistUtils, - SceneContainerFlags sceneContainerFlags, DumpManager dumpManager, Optional<UnfoldTransitionProgressForwarder> unfoldTransitionProgressForwarder, BroadcastDispatcher broadcastDispatcher @@ -624,7 +622,6 @@ public class OverviewProxyService implements CallbackController<OverviewProxyLis } mContext = context; - mSceneContainerFlags = sceneContainerFlags; mMainExecutor = mainExecutor; mShellInterface = shellInterface; mShadeViewControllerLazy = shadeViewControllerLazy; diff --git a/packages/SystemUI/src/com/android/systemui/scene/KeyguardlessSceneContainerFrameworkModule.kt b/packages/SystemUI/src/com/android/systemui/scene/KeyguardlessSceneContainerFrameworkModule.kt index afd0746f4696..8277c73025d8 100644 --- a/packages/SystemUI/src/com/android/systemui/scene/KeyguardlessSceneContainerFrameworkModule.kt +++ b/packages/SystemUI/src/com/android/systemui/scene/KeyguardlessSceneContainerFrameworkModule.kt @@ -16,7 +16,6 @@ package com.android.systemui.scene -import com.android.systemui.scene.shared.flag.SceneContainerFlagsModule import com.android.systemui.scene.shared.model.SceneContainerConfig import com.android.systemui.scene.shared.model.Scenes import dagger.Module @@ -29,7 +28,6 @@ import dagger.Provides EmptySceneModule::class, GoneSceneModule::class, QuickSettingsSceneModule::class, - SceneContainerFlagsModule::class, ShadeSceneModule::class, ], ) diff --git a/packages/SystemUI/src/com/android/systemui/scene/SceneContainerFrameworkModule.kt b/packages/SystemUI/src/com/android/systemui/scene/SceneContainerFrameworkModule.kt index 62b0914fab79..69f9443b334b 100644 --- a/packages/SystemUI/src/com/android/systemui/scene/SceneContainerFrameworkModule.kt +++ b/packages/SystemUI/src/com/android/systemui/scene/SceneContainerFrameworkModule.kt @@ -20,7 +20,6 @@ import com.android.systemui.CoreStartable import com.android.systemui.bouncer.shared.flag.ComposeBouncerFlagsModule import com.android.systemui.scene.domain.interactor.WindowRootViewVisibilityInteractor import com.android.systemui.scene.domain.startable.SceneContainerStartable -import com.android.systemui.scene.shared.flag.SceneContainerFlagsModule import com.android.systemui.scene.shared.model.SceneContainerConfig import com.android.systemui.scene.shared.model.Scenes import dagger.Binds @@ -40,7 +39,6 @@ import dagger.multibindings.IntoMap GoneSceneModule::class, LockscreenSceneModule::class, QuickSettingsSceneModule::class, - SceneContainerFlagsModule::class, ShadeSceneModule::class, ], ) diff --git a/packages/SystemUI/src/com/android/systemui/scene/ShadelessSceneContainerFrameworkModule.kt b/packages/SystemUI/src/com/android/systemui/scene/ShadelessSceneContainerFrameworkModule.kt index 0665c9e1b802..d202c24ae152 100644 --- a/packages/SystemUI/src/com/android/systemui/scene/ShadelessSceneContainerFrameworkModule.kt +++ b/packages/SystemUI/src/com/android/systemui/scene/ShadelessSceneContainerFrameworkModule.kt @@ -16,7 +16,6 @@ package com.android.systemui.scene -import com.android.systemui.scene.shared.flag.SceneContainerFlagsModule import com.android.systemui.scene.shared.model.SceneContainerConfig import com.android.systemui.scene.shared.model.Scenes import dagger.Module @@ -30,7 +29,6 @@ import dagger.Provides EmptySceneModule::class, GoneSceneModule::class, LockscreenSceneModule::class, - SceneContainerFlagsModule::class, ], ) object ShadelessSceneContainerFrameworkModule { diff --git a/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractor.kt b/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractor.kt index c736707ecd2d..1cf1c18749cb 100644 --- a/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/scene/domain/interactor/WindowRootViewVisibilityInteractor.kt @@ -24,7 +24,7 @@ import com.android.systemui.keyguard.data.repository.KeyguardRepository import com.android.systemui.keyguard.shared.model.StatusBarState import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.scene.data.repository.WindowRootViewVisibilityRepository -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.statusbar.NotificationPresenter import com.android.systemui.statusbar.notification.domain.interactor.ActiveNotificationsInteractor @@ -53,7 +53,6 @@ constructor( private val headsUpManager: HeadsUpManager, private val powerInteractor: PowerInteractor, private val activeNotificationsInteractor: ActiveNotificationsInteractor, - sceneContainerFlags: SceneContainerFlags, sceneInteractorProvider: Provider<SceneInteractor>, ) : CoreStartable { @@ -68,7 +67,7 @@ constructor( * false if the bouncer is visible. */ val isLockscreenOrShadeVisible: StateFlow<Boolean> = - if (!sceneContainerFlags.isEnabled()) { + if (!SceneContainerFlag.isEnabled) { windowRootViewVisibilityRepository.isLockscreenOrShadeVisible } else { sceneInteractorProvider diff --git a/packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt b/packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt index 0e66c28d4b8d..4774eb32a445 100644 --- a/packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt +++ b/packages/SystemUI/src/com/android/systemui/scene/domain/startable/SceneContainerStartable.kt @@ -44,7 +44,7 @@ import com.android.systemui.plugins.FalsingManager.FalsingBeliefListener import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.scene.domain.interactor.SceneContainerOcclusionInteractor import com.android.systemui.scene.domain.interactor.SceneInteractor -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.shared.logger.SceneLogger import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.shade.domain.interactor.ShadeInteractor @@ -92,7 +92,6 @@ constructor( private val deviceUnlockedInteractor: DeviceUnlockedInteractor, private val bouncerInteractor: BouncerInteractor, private val keyguardInteractor: KeyguardInteractor, - private val flags: SceneContainerFlags, private val sysUiState: SysUiState, @DisplayId private val displayId: Int, private val sceneLogger: SceneLogger, @@ -111,7 +110,7 @@ constructor( ) : CoreStartable { override fun start() { - if (flags.isEnabled()) { + if (SceneContainerFlag.isEnabled) { sceneLogger.logFrameworkEnabled(isEnabled = true) hydrateVisibility() automaticallySwitchScenes() @@ -124,16 +123,18 @@ constructor( } else { sceneLogger.logFrameworkEnabled( isEnabled = false, - reason = flags.requirementDescription(), + reason = SceneContainerFlag.requirementDescription(), ) } } override fun dump(pw: PrintWriter, args: Array<out String>) = pw.asIndenting().run { - printSection("SceneContainerFlags") { - println("isEnabled", flags.isEnabled()) - printSection("requirementDescription") { println(flags.requirementDescription()) } + printSection("SceneContainerFlag") { + println("isEnabled", SceneContainerFlag.isEnabled) + printSection("requirementDescription") { + println(SceneContainerFlag.requirementDescription()) + } } } @@ -288,7 +289,8 @@ constructor( Scenes.Gone to "device was unlocked in Bouncer scene" } else { val prevScene = previousScene.value - (prevScene ?: Scenes.Gone) to + (prevScene + ?: Scenes.Gone) to "device was unlocked in Bouncer scene, from sceneKey=$prevScene" } isOnLockscreen -> diff --git a/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt b/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlag.kt index cff11a753fe2..234eda8c0988 100644 --- a/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlags.kt +++ b/packages/SystemUI/src/com/android/systemui/scene/shared/flag/SceneContainerFlag.kt @@ -20,7 +20,6 @@ package com.android.systemui.scene.shared.flag import com.android.systemui.Flags.FLAG_SCENE_CONTAINER import com.android.systemui.Flags.sceneContainer -import com.android.systemui.dagger.SysUISingleton import com.android.systemui.deviceentry.shared.DeviceEntryUdfpsRefactor import com.android.systemui.flags.FlagToken import com.android.systemui.flags.RefactorFlagUtils @@ -32,8 +31,6 @@ import com.android.systemui.keyguard.shared.RefactorKeyguardDismissIntent import com.android.systemui.media.controls.util.MediaInSceneContainerFlag import com.android.systemui.statusbar.notification.shared.NotificationsHeadsUpRefactor import com.android.systemui.statusbar.phone.PredictiveBackSysUiFlag -import dagger.Module -import dagger.Provides /** Helper for reading or using the scene container flag state. */ object SceneContainerFlag { @@ -99,30 +96,12 @@ object SceneContainerFlag { */ @JvmStatic inline fun assertInLegacyMode() = RefactorFlagUtils.assertInLegacyMode(isEnabled, DESCRIPTION) -} - -/** - * Defines interface for classes that can check whether the scene container framework feature is - * enabled. - */ -interface SceneContainerFlags { - - /** Returns `true` if the Scene Container Framework is enabled; `false` otherwise. */ - fun isEnabled(): Boolean /** Returns a developer-readable string that describes the current requirement list. */ - fun requirementDescription(): String -} - -class SceneContainerFlagsImpl : SceneContainerFlags { - - override fun isEnabled(): Boolean { - return SceneContainerFlag.isEnabled - } - - override fun requirementDescription(): String { + @JvmStatic + fun requirementDescription(): String { return buildString { - SceneContainerFlag.getAllRequirements().forEach { requirement -> + getAllRequirements().forEach { requirement -> append('\n') append(if (requirement.isEnabled) " [MET]" else "[NOT MET]") append(" ${requirement.name}") @@ -130,9 +109,3 @@ class SceneContainerFlagsImpl : SceneContainerFlags { } } } - -@Module -object SceneContainerFlagsModule { - - @Provides @SysUISingleton fun impl(): SceneContainerFlags = SceneContainerFlagsImpl() -} diff --git a/packages/SystemUI/src/com/android/systemui/scene/ui/view/SceneWindowRootView.kt b/packages/SystemUI/src/com/android/systemui/scene/ui/view/SceneWindowRootView.kt index 67dc0cc6e03b..259a8bfef175 100644 --- a/packages/SystemUI/src/com/android/systemui/scene/ui/view/SceneWindowRootView.kt +++ b/packages/SystemUI/src/com/android/systemui/scene/ui/view/SceneWindowRootView.kt @@ -4,7 +4,6 @@ import android.content.Context import android.util.AttributeSet import android.view.View import android.view.WindowInsets -import com.android.systemui.scene.shared.flag.SceneContainerFlags import com.android.systemui.scene.shared.model.Scene import com.android.systemui.scene.shared.model.SceneContainerConfig import com.android.systemui.scene.shared.model.SceneDataSourceDelegator @@ -31,7 +30,6 @@ class SceneWindowRootView( viewModel: SceneContainerViewModel, containerConfig: SceneContainerConfig, sharedNotificationContainer: SharedNotificationContainer, - flags: SceneContainerFlags, scenes: Set<Scene>, layoutInsetController: LayoutInsetsController, sceneDataSourceDelegator: SceneDataSourceDelegator, @@ -44,7 +42,6 @@ class SceneWindowRootView( windowInsets = windowInsets, containerConfig = containerConfig, sharedNotificationContainer = sharedNotificationContainer, - flags = flags, scenes = scenes, onVisibilityChangedInternal = { isVisible -> super.setVisibility(if (isVisible) View.VISIBLE else View.INVISIBLE) diff --git a/packages/SystemUI/src/com/android/systemui/scene/ui/view/SceneWindowRootViewBinder.kt b/packages/SystemUI/src/com/android/systemui/scene/ui/view/SceneWindowRootViewBinder.kt index 809ac2ea9f82..2ef9b731502f 100644 --- a/packages/SystemUI/src/com/android/systemui/scene/ui/view/SceneWindowRootViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/scene/ui/view/SceneWindowRootViewBinder.kt @@ -39,7 +39,7 @@ import com.android.systemui.common.ui.compose.windowinsets.DisplayCutout import com.android.systemui.common.ui.compose.windowinsets.ScreenDecorProvider import com.android.systemui.lifecycle.repeatWhenAttached import com.android.systemui.res.R -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.shared.model.Scene import com.android.systemui.scene.shared.model.SceneContainerConfig import com.android.systemui.scene.shared.model.SceneDataSourceDelegator @@ -63,7 +63,6 @@ object SceneWindowRootViewBinder { windowInsets: StateFlow<WindowInsets?>, containerConfig: SceneContainerConfig, sharedNotificationContainer: SharedNotificationContainer, - flags: SceneContainerFlags, scenes: Set<Scene>, onVisibilityChangedInternal: (isVisible: Boolean) -> Unit, dataSourceDelegator: SceneDataSourceDelegator, @@ -115,7 +114,7 @@ object SceneWindowRootViewBinder { // the SceneContainerView. This SharedNotificationContainer should contain NSSL // due to the NotificationStackScrollLayoutSection (legacy) or // NotificationSection (scene container) moving it there. - if (flags.isEnabled()) { + if (SceneContainerFlag.isEnabled) { (sharedNotificationContainer.parent as? ViewGroup)?.removeView( sharedNotificationContainer ) diff --git a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java index fb32b9fce909..adcb14a67983 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/shade/NotificationShadeWindowControllerImpl.java @@ -59,7 +59,7 @@ import com.android.systemui.keyguard.KeyguardViewMediator; import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener; import com.android.systemui.res.R; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; +import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.scene.ui.view.WindowRootViewComponent; import com.android.systemui.settings.UserTracker; import com.android.systemui.shade.domain.interactor.ShadeInteractor; @@ -117,7 +117,6 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW private final AuthController mAuthController; private final Lazy<SelectedUserInteractor> mUserInteractor; private final Lazy<ShadeInteractor> mShadeInteractorLazy; - private final SceneContainerFlags mSceneContainerFlags; private final Lazy<CommunalInteractor> mCommunalInteractor; private ViewGroup mWindowRootView; private LayoutParams mLp; @@ -166,7 +165,6 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW ShadeWindowLogger logger, Lazy<SelectedUserInteractor> userInteractor, UserTracker userTracker, - SceneContainerFlags sceneContainerFlags, Lazy<CommunalInteractor> communalInteractor) { mContext = context; mWindowRootViewComponentFactory = windowRootViewComponentFactory; @@ -186,7 +184,6 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW dumpManager.registerCriticalDumpable("{slow}NotificationShadeWindowControllerImpl", this); mAuthController = authController; mUserInteractor = userInteractor; - mSceneContainerFlags = sceneContainerFlags; mCommunalInteractor = communalInteractor; mLastKeyguardRotationAllowed = mKeyguardStateController.isKeyguardScreenRotationAllowed(); mLockScreenDisplayTimeout = context.getResources() @@ -289,7 +286,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW mLp.layoutInDisplayCutoutMode = LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS; mLp.privateFlags |= PRIVATE_FLAG_OPTIMIZE_MEASURE; - if (mSceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled()) { // This prevents the appearance and disappearance of the software keyboard (also known // as the "IME") from scrolling/panning the window to make room for the keyboard. // diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt index 648d4b55370e..a0c939107fdb 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeModule.kt @@ -19,7 +19,7 @@ package com.android.systemui.shade import com.android.systemui.dagger.SysUISingleton import com.android.systemui.plugins.qs.QSContainerController import com.android.systemui.qs.ui.adapter.QSSceneAdapterImpl -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.shade.data.repository.PrivacyChipRepository import com.android.systemui.shade.data.repository.PrivacyChipRepositoryImpl import com.android.systemui.shade.data.repository.ShadeRepository @@ -50,11 +50,10 @@ abstract class ShadeModule { @Provides @SysUISingleton fun provideBaseShadeInteractor( - sceneContainerFlags: SceneContainerFlags, sceneContainerOn: Provider<ShadeInteractorSceneContainerImpl>, sceneContainerOff: Provider<ShadeInteractorLegacyImpl> ): BaseShadeInteractor { - return if (sceneContainerFlags.isEnabled()) { + return if (SceneContainerFlag.isEnabled) { sceneContainerOn.get() } else { sceneContainerOff.get() @@ -64,11 +63,10 @@ abstract class ShadeModule { @Provides @SysUISingleton fun provideShadeController( - sceneContainerFlags: SceneContainerFlags, sceneContainerOn: Provider<ShadeControllerSceneImpl>, sceneContainerOff: Provider<ShadeControllerImpl> ): ShadeController { - return if (sceneContainerFlags.isEnabled()) { + return if (SceneContainerFlag.isEnabled) { sceneContainerOn.get() } else { sceneContainerOff.get() @@ -78,11 +76,10 @@ abstract class ShadeModule { @Provides @SysUISingleton fun provideShadeAnimationInteractor( - sceneContainerFlags: SceneContainerFlags, sceneContainerOn: Provider<ShadeAnimationInteractorSceneContainerImpl>, sceneContainerOff: Provider<ShadeAnimationInteractorLegacyImpl> ): ShadeAnimationInteractor { - return if (sceneContainerFlags.isEnabled()) { + return if (SceneContainerFlag.isEnabled) { sceneContainerOn.get() } else { sceneContainerOff.get() @@ -92,11 +89,10 @@ abstract class ShadeModule { @Provides @SysUISingleton fun provideShadeBackActionInteractor( - sceneContainerFlags: SceneContainerFlags, sceneContainerOn: Provider<ShadeBackActionInteractorImpl>, sceneContainerOff: Provider<NotificationPanelViewController> ): ShadeBackActionInteractor { - return if (sceneContainerFlags.isEnabled()) { + return if (SceneContainerFlag.isEnabled) { sceneContainerOn.get() } else { sceneContainerOff.get() @@ -106,11 +102,10 @@ abstract class ShadeModule { @Provides @SysUISingleton fun provideShadeLockscreenInteractor( - sceneContainerFlags: SceneContainerFlags, sceneContainerOn: Provider<ShadeLockscreenInteractorImpl>, sceneContainerOff: Provider<NotificationPanelViewController> ): ShadeLockscreenInteractor { - return if (sceneContainerFlags.isEnabled()) { + return if (SceneContainerFlag.isEnabled) { sceneContainerOn.get() } else { sceneContainerOff.get() @@ -120,11 +115,10 @@ abstract class ShadeModule { @Provides @SysUISingleton fun providePanelExpansionInteractor( - sceneContainerFlags: SceneContainerFlags, sceneContainerOn: Provider<PanelExpansionInteractorImpl>, sceneContainerOff: Provider<NotificationPanelViewController> ): PanelExpansionInteractor { - return if (sceneContainerFlags.isEnabled()) { + return if (SceneContainerFlag.isEnabled) { sceneContainerOn.get() } else { sceneContainerOff.get() @@ -134,11 +128,10 @@ abstract class ShadeModule { @Provides @SysUISingleton fun provideQuickSettingsController( - sceneContainerFlags: SceneContainerFlags, sceneContainerOn: Provider<QuickSettingsControllerSceneImpl>, sceneContainerOff: Provider<QuickSettingsControllerImpl>, ): QuickSettingsController { - return if (sceneContainerFlags.isEnabled()) { + return if (SceneContainerFlag.isEnabled) { sceneContainerOn.get() } else { sceneContainerOff.get() diff --git a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt index f5dd5e465505..bc2377895101 100644 --- a/packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt +++ b/packages/SystemUI/src/com/android/systemui/shade/ShadeViewProviderModule.kt @@ -33,7 +33,7 @@ import com.android.systemui.flags.FeatureFlags import com.android.systemui.keyguard.ui.view.KeyguardRootView import com.android.systemui.privacy.OngoingPrivacyChip import com.android.systemui.res.R -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.shared.model.Scene import com.android.systemui.scene.shared.model.SceneContainerConfig import com.android.systemui.scene.shared.model.SceneDataSourceDelegator @@ -78,15 +78,13 @@ abstract class ShadeViewProviderModule { @SysUISingleton fun providesWindowRootView( layoutInflater: LayoutInflater, - sceneContainerFlags: SceneContainerFlags, viewModelProvider: Provider<SceneContainerViewModel>, containerConfigProvider: Provider<SceneContainerConfig>, - flagsProvider: Provider<SceneContainerFlags>, scenesProvider: Provider<Set<@JvmSuppressWildcards Scene>>, layoutInsetController: NotificationInsetsController, sceneDataSourceDelegator: Provider<SceneDataSourceDelegator>, ): WindowRootView { - return if (sceneContainerFlags.isEnabled()) { + return if (SceneContainerFlag.isEnabled) { checkNoSceneDuplicates(scenesProvider.get()) val sceneWindowRootView = layoutInflater.inflate(R.layout.scene_window_root, null) as SceneWindowRootView @@ -95,7 +93,6 @@ abstract class ShadeViewProviderModule { containerConfig = containerConfigProvider.get(), sharedNotificationContainer = sceneWindowRootView.requireViewById(R.id.shared_notification_container), - flags = flagsProvider.get(), scenes = scenesProvider.get(), layoutInsetController = layoutInsetController, sceneDataSourceDelegator = sceneDataSourceDelegator.get(), @@ -115,9 +112,8 @@ abstract class ShadeViewProviderModule { @SysUISingleton fun providesNotificationShadeWindowView( root: WindowRootView, - sceneContainerFlags: SceneContainerFlags, ): NotificationShadeWindowView { - if (sceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled) { return root.requireViewById(R.id.legacy_window_root) } return root as NotificationShadeWindowView? diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/dagger/CentralSurfacesDependenciesModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/CentralSurfacesDependenciesModule.java index e5b64970c5b0..594c1913fd33 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/dagger/CentralSurfacesDependenciesModule.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/CentralSurfacesDependenciesModule.java @@ -35,7 +35,7 @@ import com.android.systemui.dump.DumpHandler; import com.android.systemui.dump.DumpManager; import com.android.systemui.media.controls.domain.pipeline.MediaDataManager; import com.android.systemui.power.domain.interactor.PowerInteractor; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; +import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.settings.DisplayTracker; import com.android.systemui.shade.NotificationPanelViewController; import com.android.systemui.shade.ShadeSurface; @@ -61,8 +61,6 @@ import com.android.systemui.statusbar.phone.StatusBarIconList; import com.android.systemui.statusbar.phone.StatusBarRemoteInputCallback; import com.android.systemui.statusbar.policy.KeyguardStateController; -import javax.inject.Provider; - import dagger.Binds; import dagger.Lazy; import dagger.Module; @@ -70,6 +68,8 @@ import dagger.Provides; import dagger.multibindings.ClassKey; import dagger.multibindings.IntoMap; +import javax.inject.Provider; + /** * This module provides instances needed to construct {@link CentralSurfacesImpl}. These are moved to * this separate from {@link CentralSurfacesModule} module so that components that wish to build @@ -185,10 +185,9 @@ public interface CentralSurfacesDependenciesModule { @Provides @SysUISingleton static ShadeSurface provideShadeSurface( - SceneContainerFlags sceneContainerFlags, Provider<ShadeSurfaceImpl> sceneContainerOn, Provider<NotificationPanelViewController> sceneContainerOff) { - if (sceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled()) { return sceneContainerOn.get(); } else { return sceneContainerOff.get(); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/SharedNotificationContainerBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/SharedNotificationContainerBinder.kt index 741102bcd574..cf5366b92cda 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/SharedNotificationContainerBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/SharedNotificationContainerBinder.kt @@ -29,7 +29,6 @@ import com.android.systemui.keyguard.ui.viewmodel.BurnInParameters import com.android.systemui.keyguard.ui.viewmodel.ViewStateAccessor import com.android.systemui.lifecycle.repeatWhenAttached import com.android.systemui.scene.shared.flag.SceneContainerFlag -import com.android.systemui.scene.shared.flag.SceneContainerFlags import com.android.systemui.statusbar.notification.footer.shared.FooterViewRefactor import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayoutController import com.android.systemui.statusbar.notification.stack.NotificationStackSizeCalculator @@ -49,7 +48,6 @@ import kotlinx.coroutines.launch class SharedNotificationContainerBinder @Inject constructor( - private val sceneContainerFlags: SceneContainerFlags, private val controller: NotificationStackScrollLayoutController, private val notificationStackSizeCalculator: NotificationStackSizeCalculator, private val notificationScrollViewBinder: NotificationScrollViewBinder, @@ -130,7 +128,7 @@ constructor( .collect { controller.setMaxDisplayedNotifications(it) } } - if (!sceneContainerFlags.isEnabled()) { + if (!SceneContainerFlag.isEnabled) { launch { viewModel.bounds.collect { val animate = @@ -166,7 +164,7 @@ constructor( } } - if (sceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled) { disposables += notificationScrollViewBinder.bindWhileAttached() } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModel.kt index b284179d42b7..ca19da58a135 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModel.kt @@ -22,7 +22,7 @@ import com.android.systemui.dump.DumpManager import com.android.systemui.flags.FeatureFlagsClassic import com.android.systemui.flags.Flags import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.shade.domain.interactor.ShadeInteractor import com.android.systemui.statusbar.notification.stack.domain.interactor.NotificationStackAppearanceInteractor import com.android.systemui.statusbar.notification.stack.shared.model.ShadeScrimBounds @@ -43,7 +43,6 @@ constructor( dumpManager: DumpManager, private val interactor: NotificationStackAppearanceInteractor, shadeInteractor: ShadeInteractor, - flags: SceneContainerFlags, featureFlags: FeatureFlagsClassic, private val keyguardInteractor: KeyguardInteractor, ) : FlowDumperImpl(dumpManager) { @@ -51,7 +50,7 @@ constructor( val isVisualDebuggingEnabled: Boolean = featureFlags.isEnabled(Flags.NSSL_DEBUG_LINES) /** DEBUG: whether the debug logging should be output. */ - val isDebugLoggingEnabled: Boolean = flags.isEnabled() + val isDebugLoggingEnabled: Boolean = SceneContainerFlag.isEnabled /** Notifies that the bounds of the notification scrim have changed. */ fun onScrimBoundsChanged(bounds: ShadeScrimBounds?) { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java index 08b65e3bb580..cb3c03ebae4d 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/CentralSurfacesImpl.java @@ -164,7 +164,6 @@ import com.android.systemui.qs.QSPanelController; import com.android.systemui.res.R; import com.android.systemui.scene.domain.interactor.WindowRootViewVisibilityInteractor; import com.android.systemui.scene.shared.flag.SceneContainerFlag; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; import com.android.systemui.scrim.ScrimView; import com.android.systemui.settings.UserTracker; import com.android.systemui.settings.brightness.BrightnessSliderController; @@ -592,9 +591,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { private final ColorExtractor.OnColorsChangedListener mOnColorsChangedListener = (extractor, which) -> updateTheme(); - - private final SceneContainerFlags mSceneContainerFlags; - private final BrightnessMirrorShowingInteractor mBrightnessMirrorShowingInteractor; /** @@ -708,7 +704,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { UserTracker userTracker, Provider<FingerprintManager> fingerprintManager, ActivityStarter activityStarter, - SceneContainerFlags sceneContainerFlags, BrightnessMirrorShowingInteractor brightnessMirrorShowingInteractor ) { mContext = context; @@ -804,7 +799,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mUserTracker = userTracker; mFingerprintManager = fingerprintManager; mActivityStarter = activityStarter; - mSceneContainerFlags = sceneContainerFlags; mBrightnessMirrorShowingInteractor = brightnessMirrorShowingInteractor; mLockscreenShadeTransitionController = lockscreenShadeTransitionController; @@ -1088,7 +1082,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { mJavaAdapter.alwaysCollectFlow( mCommunalInteractor.isIdleOnCommunal(), mIdleOnCommunalConsumer); - if (mSceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled()) { mJavaAdapter.alwaysCollectFlow( mBrightnessMirrorShowingInteractor.isShowing(), this::setBrightnessMirrorShowing @@ -1277,7 +1271,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces { // Set up the quick settings tile panel final View container = getNotificationShadeWindowView().findViewById(R.id.qs_frame); - if (container != null && !mSceneContainerFlags.isEnabled()) { + if (container != null && !SceneContainerFlag.isEnabled()) { FragmentHostManager fragmentHostManager = mFragmentService.getFragmentHostManager(container); ExtensionFragmentListener.attachExtensonToFragment( diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt index 92fd90a0859a..5206e46a4580 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewController.kt @@ -24,10 +24,10 @@ import android.view.View import android.view.ViewGroup import android.view.ViewTreeObserver import com.android.systemui.Gefingerpoken -import com.android.systemui.res.R import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.res.R +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.ui.view.WindowRootView import com.android.systemui.shade.ShadeController import com.android.systemui.shade.ShadeLogger @@ -65,7 +65,6 @@ private constructor( private val moveFromCenterAnimationController: StatusBarMoveFromCenterAnimationController?, private val userChipViewModel: StatusBarUserChipViewModel, private val viewUtil: ViewUtil, - private val sceneContainerFlags: SceneContainerFlags, private val configurationController: ConfigurationController, private val statusOverlayHoverListenerFactory: StatusOverlayHoverListenerFactory, ) : ViewController<PhoneStatusBarView>(view) { @@ -205,7 +204,7 @@ private constructor( // If scene framework is enabled, route the touch to it and // ignore the rest of the gesture. - if (sceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled) { windowRootView.get().dispatchTouchEvent(event) return true } @@ -267,7 +266,6 @@ private constructor( @Named(UNFOLD_STATUS_BAR) private val progressProvider: Optional<ScopedUnfoldTransitionProgressProvider>, private val featureFlags: FeatureFlags, - private val sceneContainerFlags: SceneContainerFlags, private val userChipViewModel: StatusBarUserChipViewModel, private val centralSurfaces: CentralSurfaces, private val statusBarWindowStateController: StatusBarWindowStateController, @@ -301,7 +299,6 @@ private constructor( statusBarMoveFromCenterAnimationController, userChipViewModel, viewUtil, - sceneContainerFlags, configurationController, statusOverlayHoverListenerFactory, ) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java index 8e8de46957ed..d1189e1e5e1c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarTouchableRegionManager.java @@ -37,7 +37,7 @@ import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor; import com.android.systemui.dagger.SysUISingleton; import com.android.systemui.res.R; import com.android.systemui.scene.domain.interactor.SceneInteractor; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; +import com.android.systemui.scene.shared.flag.SceneContainerFlag; import com.android.systemui.shade.ShadeExpansionStateManager; import com.android.systemui.shade.domain.interactor.ShadeInteractor; import com.android.systemui.statusbar.NotificationShadeWindowController; @@ -91,7 +91,6 @@ public final class StatusBarTouchableRegionManager implements Dumpable { ShadeInteractor shadeInteractor, Provider<SceneInteractor> sceneInteractor, JavaAdapter javaAdapter, - SceneContainerFlags sceneContainerFlags, UnlockedScreenOffAnimationController unlockedScreenOffAnimationController, PrimaryBouncerInteractor primaryBouncerInteractor, AlternateBouncerInteractor alternateBouncerInteractor @@ -130,7 +129,7 @@ public final class StatusBarTouchableRegionManager implements Dumpable { mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController; - if (sceneContainerFlags.isEnabled()) { + if (SceneContainerFlag.isEnabled()) { javaAdapter.alwaysCollectFlow( sceneInteractor.get().isVisible(), this::onSceneContainerVisibilityChanged); diff --git a/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java index f924ab4a4617..bcea4116d169 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerBaseTest.java @@ -36,6 +36,7 @@ import android.util.Pair; import android.view.View; import android.view.WindowManager; import android.view.accessibility.AccessibilityManager; +import android.widget.ImageView; import com.android.systemui.Flags; import com.android.systemui.SysuiTestCase; @@ -78,6 +79,7 @@ public class LegacyLockIconViewControllerBaseTest extends SysuiTestCase { protected final KosmosJavaAdapter mKosmos = new KosmosJavaAdapter(this); protected @Mock DeviceEntryInteractor mDeviceEntryInteractor; protected @Mock LockIconView mLockIconView; + protected @Mock ImageView mLockIcon; protected @Mock AnimatedStateListDrawable mIconDrawable; protected @Mock Context mContext; protected @Mock Resources mResources; @@ -146,8 +148,10 @@ public class LegacyLockIconViewControllerBaseTest extends SysuiTestCase { when(mStatusBarStateController.isDozing()).thenReturn(false); when(mStatusBarStateController.getState()).thenReturn(StatusBarState.KEYGUARD); - mSetFlagsRule.disableFlags(Flags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR); - mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT); + if (!Flags.sceneContainer()) { + mSetFlagsRule.disableFlags(Flags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR); + mSetFlagsRule.disableFlags(Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT); + } mFeatureFlags = new FakeFeatureFlags(); mFeatureFlags.set(LOCKSCREEN_WALLPAPER_DREAM_ENABLED, false); @@ -172,8 +176,7 @@ public class LegacyLockIconViewControllerBaseTest extends SysuiTestCase { mFeatureFlags, mPrimaryBouncerInteractor, mContext, - () -> mDeviceEntryInteractor, - mKosmos.getFakeSceneContainerFlags() + () -> mDeviceEntryInteractor ); } @@ -225,6 +228,7 @@ public class LegacyLockIconViewControllerBaseTest extends SysuiTestCase { protected void setupLockIconViewMocks() { when(mLockIconView.getResources()).thenReturn(mResources); when(mLockIconView.getContext()).thenReturn(mContext); + when(mLockIconView.getLockIcon()).thenReturn(mLockIcon); } protected void resetLockIconView() { diff --git a/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerTest.java b/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerTest.java index 868984233816..255c7d909194 100644 --- a/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/keyguard/LegacyLockIconViewControllerTest.java @@ -43,6 +43,7 @@ import androidx.test.filters.SmallTest; import com.android.systemui.biometrics.UdfpsController; import com.android.systemui.biometrics.shared.model.UdfpsOverlayParams; import com.android.systemui.doze.util.BurnInHelperKt; +import com.android.systemui.flags.EnableSceneContainer; import com.android.systemui.statusbar.StatusBarState; import org.junit.Test; @@ -373,7 +374,6 @@ public class LegacyLockIconViewControllerTest extends LegacyLockIconViewControll @Test public void longPress_showBouncer_sceneContainerNotEnabled() { init(/* useMigrationFlag= */ false); - mKosmos.getFakeSceneContainerFlags().setEnabled(false); when(mFalsingManager.isFalseLongTap(anyInt())).thenReturn(false); // WHEN longPress @@ -385,9 +385,9 @@ public class LegacyLockIconViewControllerTest extends LegacyLockIconViewControll } @Test + @EnableSceneContainer public void longPress_showBouncer() { init(/* useMigrationFlag= */ false); - mKosmos.getFakeSceneContainerFlags().setEnabled(true); when(mFalsingManager.isFalseLongTap(anyInt())).thenReturn(false); // WHEN longPress @@ -399,9 +399,9 @@ public class LegacyLockIconViewControllerTest extends LegacyLockIconViewControll } @Test + @EnableSceneContainer public void longPress_falsingTriggered_doesNotShowBouncer() { init(/* useMigrationFlag= */ false); - mKosmos.getFakeSceneContainerFlags().setEnabled(true); when(mFalsingManager.isFalseLongTap(anyInt())).thenReturn(true); // WHEN longPress diff --git a/packages/SystemUI/tests/src/com/android/systemui/back/domain/interactor/BackActionInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/back/domain/interactor/BackActionInteractorTest.kt index f490f3c56987..cbad133ba4f0 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/back/domain/interactor/BackActionInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/back/domain/interactor/BackActionInteractorTest.kt @@ -41,7 +41,6 @@ import com.android.systemui.power.domain.interactor.PowerInteractorFactory import com.android.systemui.scene.data.repository.WindowRootViewVisibilityRepository import com.android.systemui.scene.domain.interactor.WindowRootViewVisibilityInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.scene.ui.view.WindowRootView import com.android.systemui.shade.QuickSettingsController import com.android.systemui.shade.ShadeController @@ -109,7 +108,6 @@ class BackActionInteractorTest : SysuiTestCase() { headsUpManager, powerInteractor, activeNotificationsInteractor, - kosmos.sceneContainerFlags, kosmos::sceneInteractor, ) } diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/binder/SideFpsOverlayViewBinderTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/binder/SideFpsOverlayViewBinderTest.kt index 30c5e6ed4812..d3cc23296b46 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/binder/SideFpsOverlayViewBinderTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/binder/SideFpsOverlayViewBinderTest.kt @@ -78,7 +78,6 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.power.domain.interactor.powerInteractor import com.android.systemui.res.R import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.shared.Flags.FLAG_SIDEFPS_CONTROLLER_REFACTOR import com.android.systemui.statusbar.phone.dozeServiceHost import com.android.systemui.statusbar.policy.KeyguardStateController @@ -239,7 +238,6 @@ class SideFpsOverlayViewBinderTest : SysuiTestCase() { testScope.backgroundScope, mContext, deviceEntryFingerprintAuthRepository, - kosmos.fakeSceneContainerFlags, kosmos.sceneInteractor, primaryBouncerInteractor, alternateBouncerInteractor, diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/SideFpsOverlayViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/SideFpsOverlayViewModelTest.kt index 238a76eb7400..415da022cd32 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/SideFpsOverlayViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/ui/viewmodel/SideFpsOverlayViewModelTest.kt @@ -77,7 +77,6 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.power.domain.interactor.powerInteractor import com.android.systemui.res.R import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.shared.Flags.FLAG_SIDEFPS_CONTROLLER_REFACTOR import com.android.systemui.statusbar.phone.dozeServiceHost import com.android.systemui.statusbar.policy.KeyguardStateController @@ -236,7 +235,6 @@ class SideFpsOverlayViewModelTest : SysuiTestCase() { testScope.backgroundScope, mContext, deviceEntryFingerprintAuthRepository, - kosmos.fakeSceneContainerFlags, kosmos.sceneInteractor, primaryBouncerInteractor, alternateBouncerInteractor, diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java index a46f7551fa0b..709f7797d2bf 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java @@ -25,8 +25,8 @@ import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.SOM import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_DPM_LOCK_NOW; import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_NON_STRONG_BIOMETRICS_TIMEOUT; import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN; -import static com.android.systemui.Flags.FLAG_REFACTOR_GET_CURRENT_USER; import static com.android.systemui.Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR; +import static com.android.systemui.Flags.FLAG_REFACTOR_GET_CURRENT_USER; import static com.android.systemui.keyguard.KeyguardViewMediator.DELAYED_KEYGUARD_ACTION; import static com.android.systemui.keyguard.KeyguardViewMediator.KEYGUARD_LOCK_AFTER_DELAY_DEFAULT; import static com.android.systemui.keyguard.KeyguardViewMediator.REBOOT_MAINLINE_UPDATE; @@ -102,7 +102,6 @@ import com.android.systemui.kosmos.KosmosJavaAdapter; import com.android.systemui.log.SessionTracker; import com.android.systemui.navigationbar.NavigationModeController; import com.android.systemui.scene.FakeWindowRootViewComponent; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; import com.android.systemui.scene.ui.view.WindowRootView; import com.android.systemui.settings.UserTracker; import com.android.systemui.shade.NotificationShadeWindowControllerImpl; @@ -222,7 +221,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { private @Mock DreamViewModel mDreamViewModel; private @Mock CommunalTransitionViewModel mCommunalTransitionViewModel; private @Mock SystemPropertiesHelper mSystemPropertiesHelper; - private @Mock SceneContainerFlags mSceneContainerFlags; private FakeFeatureFlags mFeatureFlags; private final int mDefaultUserId = 100; @@ -270,7 +268,6 @@ public class KeyguardViewMediatorTest extends SysuiTestCase { mShadeWindowLogger, () -> mSelectedUserInteractor, mUserTracker, - mSceneContainerFlags, mKosmos::getCommunalInteractor); mFeatureFlags = new FakeFeatureFlags(); mSetFlagsRule.enableFlags(FLAG_REFACTOR_GET_CURRENT_USER); diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ResourceTrimmerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ResourceTrimmerTest.kt index b0aace6f650e..b50d248d6940 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/ResourceTrimmerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/ResourceTrimmerTest.kt @@ -23,7 +23,6 @@ import com.android.systemui.testKosmos import com.android.systemui.util.mockito.any import com.android.systemui.utils.GlobalWindowManager import kotlinx.coroutines.ExperimentalCoroutinesApi -import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest import org.junit.Before @@ -63,8 +62,8 @@ class ResourceTrimmerTest : SysuiTestCase() { val withDeps = KeyguardInteractorFactory.create( - repository = keyguardRepository, featureFlags = featureFlags, + repository = keyguardRepository, ) val keyguardInteractor = withDeps.keyguardInteractor resourceTrimmer = diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/DeviceEntrySideFpsOverlayInteractorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/DeviceEntrySideFpsOverlayInteractorTest.kt index 9266af452abd..dc7f372b5dfc 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/DeviceEntrySideFpsOverlayInteractorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/domain/interactor/DeviceEntrySideFpsOverlayInteractorTest.kt @@ -32,6 +32,7 @@ import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectValues import com.android.systemui.deviceentry.domain.interactor.DeviceEntryFaceAuthInteractor import com.android.systemui.deviceentry.domain.interactor.DeviceEntryFingerprintAuthInteractor +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.keyguard.DismissCallbackRegistry import com.android.systemui.keyguard.data.repository.FakeBiometricSettingsRepository import com.android.systemui.keyguard.data.repository.FakeDeviceEntryFingerprintAuthRepository @@ -40,7 +41,6 @@ import com.android.systemui.kosmos.testScope import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.res.R import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.shared.Flags.FLAG_SIDEFPS_CONTROLLER_REFACTOR import com.android.systemui.statusbar.policy.KeyguardStateController @@ -87,7 +87,6 @@ class DeviceEntrySideFpsOverlayInteractorTest : SysuiTestCase() { @Before fun setup() { mSetFlagsRule.enableFlags(FLAG_SIDEFPS_CONTROLLER_REFACTOR) - kosmos.fakeSceneContainerFlags.enabled = false primaryBouncerInteractor = PrimaryBouncerInteractor( @@ -127,7 +126,6 @@ class DeviceEntrySideFpsOverlayInteractorTest : SysuiTestCase() { testScope.backgroundScope, mContext, deviceEntryFingerprintAuthRepository, - kosmos.fakeSceneContainerFlags, kosmos.sceneInteractor, primaryBouncerInteractor, alternateBouncerInteractor, @@ -168,15 +166,14 @@ class DeviceEntrySideFpsOverlayInteractorTest : SysuiTestCase() { } @Test + @EnableSceneContainer fun updatesShowIndicatorForDeviceEntry_onBouncerSceneActive() = testScope.runTest { - kosmos.fakeSceneContainerFlags.enabled = true underTest = DeviceEntrySideFpsOverlayInteractor( testScope.backgroundScope, mContext, deviceEntryFingerprintAuthRepository, - kosmos.fakeSceneContainerFlags, kosmos.sceneInteractor, primaryBouncerInteractor, alternateBouncerInteractor, @@ -196,15 +193,14 @@ class DeviceEntrySideFpsOverlayInteractorTest : SysuiTestCase() { } @Test + @EnableSceneContainer fun updatesShowIndicatorForDeviceEntry_onBouncerSceneInactive() = testScope.runTest { - kosmos.fakeSceneContainerFlags.enabled = true underTest = DeviceEntrySideFpsOverlayInteractor( testScope.backgroundScope, mContext, deviceEntryFingerprintAuthRepository, - kosmos.fakeSceneContainerFlags, kosmos.sceneInteractor, primaryBouncerInteractor, alternateBouncerInteractor, diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSImplTest.java index e4a4836bcd46..6956beab418e 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSImplTest.java @@ -57,6 +57,7 @@ import androidx.test.filters.SmallTest; import com.android.keyguard.BouncerPanelExpansionCalculator; import com.android.systemui.SysuiTestCase; import com.android.systemui.dump.DumpManager; +import com.android.systemui.flags.EnableSceneContainer; import com.android.systemui.flags.FeatureFlagsClassic; import com.android.systemui.media.controls.ui.view.MediaHost; import com.android.systemui.qs.customize.QSCustomizerController; @@ -66,7 +67,6 @@ import com.android.systemui.qs.footer.ui.binder.FooterActionsViewBinder; import com.android.systemui.qs.footer.ui.viewmodel.FooterActionsViewModel; import com.android.systemui.qs.logging.QSLogger; import com.android.systemui.res.R; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; import com.android.systemui.settings.FakeDisplayTracker; import com.android.systemui.shade.transition.LargeScreenShadeInterpolator; import com.android.systemui.statusbar.CommandQueue; @@ -115,7 +115,6 @@ public class QSImplTest extends SysuiTestCase { @Mock private FooterActionsViewBinder mFooterActionsViewBinder; @Mock private LargeScreenShadeInterpolator mLargeScreenShadeInterpolator; @Mock private FeatureFlagsClassic mFeatureFlags; - @Mock private SceneContainerFlags mSceneContainerFlags; private ViewGroup mQsView; private final CommandQueue mCommandQueue = @@ -127,7 +126,6 @@ public class QSImplTest extends SysuiTestCase { @Before public void setup() { MockitoAnnotations.initMocks(this); - when(mSceneContainerFlags.isEnabled()).thenReturn(false); mUnderTest = instantiate(); @@ -496,8 +494,8 @@ public class QSImplTest extends SysuiTestCase { } @Test + @EnableSceneContainer public void testSceneContainerFlagsEnabled_FooterActionsRemoved_controllerNotStarted() { - when(mSceneContainerFlags.isEnabled()).thenReturn(true); clearInvocations( mFooterActionsViewBinder, mFooterActionsViewModel, mFooterActionsViewModelFactory); QSImpl other = instantiate(); @@ -513,9 +511,8 @@ public class QSImplTest extends SysuiTestCase { } @Test + @EnableSceneContainer public void testSceneContainerFlagsEnabled_statusBarStateIsShade() { - when(mSceneContainerFlags.isEnabled()).thenReturn(true); - mUnderTest.onStateChanged(KEYGUARD); assertThat(mUnderTest.getStatusBarState()).isEqualTo(SHADE); @@ -524,9 +521,8 @@ public class QSImplTest extends SysuiTestCase { } @Test + @EnableSceneContainer public void testSceneContainerFlagsEnabled_isKeyguardState_alwaysFalse() { - when(mSceneContainerFlags.isEnabled()).thenReturn(true); - mUnderTest.onStateChanged(KEYGUARD); assertThat(mUnderTest.isKeyguardState()).isFalse(); @@ -559,8 +555,8 @@ public class QSImplTest extends SysuiTestCase { mFooterActionsViewModelFactory, mFooterActionsViewBinder, mLargeScreenShadeInterpolator, - mFeatureFlags, - mSceneContainerFlags); + mFeatureFlags + ); } private void setUpOther() { diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt index a60494f87fb4..0275643b8489 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSPanelControllerTest.kt @@ -17,13 +17,13 @@ import com.android.systemui.plugins.qs.QSTile import com.android.systemui.qs.customize.QSCustomizerController import com.android.systemui.qs.logging.QSLogger import com.android.systemui.res.R -import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags import com.android.systemui.settings.brightness.BrightnessController import com.android.systemui.settings.brightness.BrightnessSliderController import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager import com.android.systemui.statusbar.policy.ResourcesSplitShadeStateController import com.android.systemui.tuner.TunerService import com.google.common.truth.Truth.assertThat +import javax.inject.Provider import org.junit.After import org.junit.Before import org.junit.Test @@ -36,7 +36,6 @@ import org.mockito.Mockito.never import org.mockito.Mockito.reset import org.mockito.Mockito.verify import org.mockito.MockitoAnnotations -import javax.inject.Provider import org.mockito.Mockito.`when` as whenever @SmallTest @@ -65,8 +64,6 @@ class QSPanelControllerTest : SysuiTestCase() { @Mock private lateinit var pagedTileLayout: PagedTileLayout @Mock private lateinit var longPressEffectProvider: Provider<QSLongPressEffect> - private val sceneContainerFlags = FakeSceneContainerFlags() - private lateinit var controller: QSPanelController private val testableResources: TestableResources = mContext.orCreateTestableResources @@ -103,7 +100,6 @@ class QSPanelControllerTest : SysuiTestCase() { falsingManager, statusBarKeyguardViewManager, ResourcesSplitShadeStateController(), - sceneContainerFlags, longPressEffectProvider, ) } diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QuickStatusBarHeaderControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/qs/QuickStatusBarHeaderControllerTest.kt index 8acde3637576..4915e555dcc5 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/qs/QuickStatusBarHeaderControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QuickStatusBarHeaderControllerTest.kt @@ -20,15 +20,14 @@ import android.content.Context import android.testing.AndroidTestingRunner import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase -import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags import org.junit.After import org.junit.Before import org.junit.Test import org.junit.runner.RunWith import org.mockito.Answers import org.mockito.Mock -import org.mockito.Mockito.`when` import org.mockito.Mockito.verify +import org.mockito.Mockito.`when` import org.mockito.MockitoAnnotations @SmallTest @@ -43,8 +42,6 @@ class QuickStatusBarHeaderControllerTest : SysuiTestCase() { @Mock(answer = Answers.RETURNS_DEEP_STUBS) private lateinit var context: Context - private val sceneContainerFlags = FakeSceneContainerFlags() - private lateinit var controller: QuickStatusBarHeaderController @Before @@ -55,9 +52,8 @@ class QuickStatusBarHeaderControllerTest : SysuiTestCase() { `when`(view.context).thenReturn(context) controller = QuickStatusBarHeaderController( - view, - quickQSPanelController, - sceneContainerFlags, + view, + quickQSPanelController, ) } diff --git a/packages/SystemUI/tests/src/com/android/systemui/recents/OverviewProxyServiceTest.kt b/packages/SystemUI/tests/src/com/android/systemui/recents/OverviewProxyServiceTest.kt index 1313227c7f3d..387f27d048ea 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/recents/OverviewProxyServiceTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/recents/OverviewProxyServiceTest.kt @@ -42,7 +42,6 @@ import com.android.systemui.model.sceneContainerPlugin import com.android.systemui.navigationbar.NavigationBarController import com.android.systemui.navigationbar.NavigationModeController import com.android.systemui.recents.OverviewProxyService.ACTION_QUICKSTEP -import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags import com.android.systemui.settings.FakeDisplayTracker import com.android.systemui.settings.UserTracker import com.android.systemui.shade.ShadeViewController @@ -249,7 +248,6 @@ class OverviewProxyServiceTest : SysuiTestCase() { sysuiUnlockAnimationController, inWindowLauncherUnlockAnimationManager, assistUtils, - FakeSceneContainerFlags(), dumpManager, unfoldTransitionProgressForwarder, broadcastDispatcher diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowControllerImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowControllerImplTest.java index cf7c6f4e2174..b89ccefddf6b 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowControllerImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/NotificationShadeWindowControllerImplTest.java @@ -75,8 +75,6 @@ import com.android.systemui.res.R; import com.android.systemui.scene.FakeWindowRootViewComponent; import com.android.systemui.scene.data.repository.SceneContainerRepository; import com.android.systemui.scene.domain.interactor.SceneInteractor; -import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; import com.android.systemui.scene.shared.logger.SceneLogger; import com.android.systemui.settings.UserTracker; import com.android.systemui.shade.data.repository.FakeShadeRepository; @@ -136,7 +134,6 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { @Mock private ShadeWindowLogger mShadeWindowLogger; @Mock private SelectedUserInteractor mSelectedUserInteractor; @Mock private UserTracker mUserTracker; - @Mock private SceneContainerFlags mSceneContainerFlags; @Mock private LargeScreenHeaderHelper mLargeScreenHeaderHelper; @Captor private ArgumentCaptor<WindowManager.LayoutParams> mLayoutParameters; @Captor private ArgumentCaptor<StatusBarStateController.StateListener> mStateListener; @@ -185,14 +182,12 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { mKosmos.getDeviceUnlockedInteractor()); FakeConfigurationRepository configurationRepository = new FakeConfigurationRepository(); - FakeSceneContainerFlags sceneContainerFlags = new FakeSceneContainerFlags(); KeyguardTransitionInteractor keyguardTransitionInteractor = mKosmos.getKeyguardTransitionInteractor(); KeyguardInteractor keyguardInteractor = new KeyguardInteractor( keyguardRepository, new FakeCommandQueue(), powerInteractor, - sceneContainerFlags, new FakeKeyguardBouncerRepository(), new ConfigurationInteractor(configurationRepository), shadeRepository, @@ -256,7 +251,6 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase { mShadeWindowLogger, () -> mSelectedUserInteractor, mUserTracker, - mSceneContainerFlags, () -> communalInteractor) { @Override protected boolean isDebuggable() { diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerImplBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerImplBaseTest.java index 20d877e3e2c5..77ad17a9e918 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerImplBaseTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/QuickSettingsControllerImplBaseTest.java @@ -62,7 +62,6 @@ import com.android.systemui.qs.QSFragmentLegacy; import com.android.systemui.res.R; import com.android.systemui.scene.data.repository.SceneContainerRepository; import com.android.systemui.scene.domain.interactor.SceneInteractor; -import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags; import com.android.systemui.scene.shared.logger.SceneLogger; import com.android.systemui.screenrecord.RecordingController; import com.android.systemui.shade.data.repository.FakeShadeRepository; @@ -208,14 +207,12 @@ public class QuickSettingsControllerImplBaseTest extends SysuiTestCase { mock(SceneLogger.class), mKosmos.getDeviceUnlockedInteractor()); - FakeSceneContainerFlags sceneContainerFlags = new FakeSceneContainerFlags(); KeyguardTransitionInteractor keyguardTransitionInteractor = mKosmos.getKeyguardTransitionInteractor(); KeyguardInteractor keyguardInteractor = new KeyguardInteractor( mKeyguardRepository, new FakeCommandQueue(), powerInteractor, - sceneContainerFlags, new FakeKeyguardBouncerRepository(), new ConfigurationInteractor(configurationRepository), mShadeRepository, diff --git a/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeControllerImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeControllerImplTest.kt index 433c95ab5791..6bdd3ef5cebe 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeControllerImplTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/shade/ShadeControllerImplTest.kt @@ -33,7 +33,6 @@ import com.android.systemui.power.domain.interactor.PowerInteractorFactory import com.android.systemui.scene.data.repository.WindowRootViewVisibilityRepository import com.android.systemui.scene.domain.interactor.WindowRootViewVisibilityInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.statusbar.CommandQueue import com.android.systemui.statusbar.NotificationShadeWindowController import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationListRepository @@ -95,7 +94,6 @@ class ShadeControllerImplTest : SysuiTestCase() { headsUpManager, PowerInteractorFactory.create().powerInteractor, ActiveNotificationsInteractor(activeNotificationsRepository, testDispatcher), - kosmos.sceneContainerFlags, kosmos::sceneInteractor, ) } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt index d2fc087e44bd..be5af885c895 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/StatusBarStateControllerImplTest.kt @@ -55,7 +55,6 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController import com.android.systemui.power.data.repository.FakePowerRepository import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.shade.LargeScreenHeaderHelper import com.android.systemui.shade.data.repository.FakeShadeRepository @@ -87,8 +86,8 @@ import org.mockito.ArgumentMatchers.eq import org.mockito.Mockito import org.mockito.Mockito.mock import org.mockito.Mockito.verify -import org.mockito.Mockito.`when` as whenever import org.mockito.MockitoAnnotations +import org.mockito.Mockito.`when` as whenever @SmallTest @RunWith(AndroidTestingRunner::class) @@ -135,7 +134,6 @@ class StatusBarStateControllerImplTest : SysuiTestCase() { val keyguardTransitionRepository = FakeKeyguardTransitionRepository() val featureFlags = FakeFeatureFlagsClassic() val shadeRepository = FakeShadeRepository() - val sceneContainerFlags = FakeSceneContainerFlags() val configurationRepository = FakeConfigurationRepository() val keyguardTransitionInteractor = kosmos.keyguardTransitionInteractor fromLockscreenTransitionInteractor = kosmos.fromLockscreenTransitionInteractor @@ -146,7 +144,6 @@ class StatusBarStateControllerImplTest : SysuiTestCase() { keyguardRepository, FakeCommandQueue(), powerInteractor, - sceneContainerFlags, FakeKeyguardBouncerRepository(), ConfigurationInteractor(configurationRepository), shadeRepository, diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/logging/NotificationLoggerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/logging/NotificationLoggerTest.java index 54a6523d82a1..bb68ec540bac 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/logging/NotificationLoggerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/logging/NotificationLoggerTest.java @@ -138,7 +138,6 @@ public class NotificationLoggerTest extends SysuiTestCase { mHeadsUpManager, mPowerInteractor, mActiveNotificationsInteractor, - mKosmos.getSceneContainerFlags(), () -> mKosmos.getSceneInteractor()); mWindowRootViewVisibilityInteractor.setIsLockscreenOrShadeVisible(true); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java index db053d842bdb..9e2856d65a71 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerTest.java @@ -180,7 +180,6 @@ public class NotificationGutsManagerTest extends SysuiTestCase { mHeadsUpManager, PowerInteractorFactory.create().getPowerInteractor(), mActiveNotificationsInteractor, - mKosmos.getSceneContainerFlags(), () -> mKosmos.getSceneInteractor() ); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerWithScenesTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerWithScenesTest.kt index 65a960b5ff6c..1b85dfa5a087 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerWithScenesTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationGutsManagerWithScenesTest.kt @@ -45,6 +45,7 @@ import com.android.internal.logging.testing.UiEventLoggerFake import com.android.internal.statusbar.statusBarService import com.android.systemui.SysuiTestCase import com.android.systemui.concurrency.fakeExecutor +import com.android.systemui.flags.EnableSceneContainer import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository import com.android.systemui.kosmos.testScope import com.android.systemui.people.widget.PeopleSpaceWidgetManager @@ -55,7 +56,6 @@ import com.android.systemui.power.domain.interactor.PowerInteractorFactory.creat import com.android.systemui.scene.data.repository.WindowRootViewVisibilityRepository import com.android.systemui.scene.domain.interactor.WindowRootViewVisibilityInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.settings.UserContextProvider import com.android.systemui.shade.shadeControllerSceneImpl @@ -93,6 +93,7 @@ import org.mockito.invocation.InvocationOnMock @SmallTest @RunWith(AndroidTestingRunner::class) @RunWithLooper +@EnableSceneContainer class NotificationGutsManagerWithScenesTest : SysuiTestCase() { private val testNotificationChannel = NotificationChannel( @@ -143,8 +144,6 @@ class NotificationGutsManagerWithScenesTest : SysuiTestCase() { @Before fun setUp() { MockitoAnnotations.initMocks(this) - val sceneContainerFlags = kosmos.fakeSceneContainerFlags - sceneContainerFlags.enabled = true allowTestableLooperAsMainThread() helper = NotificationTestHelper(mContext, mDependency) Mockito.`when`(accessibilityManager.isTouchExplorationEnabled).thenReturn(false) @@ -156,9 +155,9 @@ class NotificationGutsManagerWithScenesTest : SysuiTestCase() { headsUpManager, create().powerInteractor, activeNotificationsInteractor, - sceneContainerFlags, - { sceneInteractor }, - ) + ) { + sceneInteractor + } gutsManager = NotificationGutsManager( mContext, diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java index 783bf80000d6..5c651035262d 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/CentralSurfacesImplTest.java @@ -31,6 +31,7 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.atLeastOnce; import static org.mockito.Mockito.clearInvocations; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.mock; @@ -101,6 +102,7 @@ import com.android.systemui.communal.domain.interactor.CommunalInteractor; import com.android.systemui.communal.shared.model.CommunalScenes; import com.android.systemui.demomode.DemoModeController; import com.android.systemui.dump.DumpManager; +import com.android.systemui.flags.EnableSceneContainer; import com.android.systemui.flags.FakeFeatureFlags; import com.android.systemui.flags.Flags; import com.android.systemui.fragments.FragmentService; @@ -120,7 +122,6 @@ import com.android.systemui.plugins.statusbar.StatusBarStateController; import com.android.systemui.power.domain.interactor.PowerInteractor; import com.android.systemui.res.R; import com.android.systemui.scene.domain.interactor.WindowRootViewVisibilityInteractor; -import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags; import com.android.systemui.settings.UserTracker; import com.android.systemui.settings.brightness.BrightnessSliderController; import com.android.systemui.settings.brightness.domain.interactor.BrightnessMirrorShowingInteractor; @@ -336,8 +337,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase { private final DumpManager mDumpManager = new DumpManager(); private final ScreenLifecycle mScreenLifecycle = new ScreenLifecycle(mDumpManager); - private final FakeSceneContainerFlags mSceneContainerFlags = new FakeSceneContainerFlags(); - private final BrightnessMirrorShowingInteractor mBrightnessMirrorShowingInteractor = mKosmos.getBrightnessMirrorShowingInteractor(); @@ -351,7 +350,9 @@ public class CentralSurfacesImplTest extends SysuiTestCase { // Turn AOD on and toggle feature flag for jank fixes mFeatureFlags.set(Flags.ZJ_285570694_LOCKSCREEN_TRANSITION_FROM_AOD, true); when(mDozeParameters.getAlwaysOn()).thenReturn(true); - mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); + if (!com.android.systemui.Flags.sceneContainer()) { + mSetFlagsRule.disableFlags(com.android.systemui.Flags.FLAG_DEVICE_ENTRY_UDFPS_REFACTOR); + } IThermalService thermalService = mock(IThermalService.class); mPowerManager = new PowerManager(mContext, mPowerManagerService, thermalService, @@ -426,22 +427,25 @@ public class CentralSurfacesImplTest extends SysuiTestCase { ((Runnable) invocation.getArgument(0)).run(); return null; }).when(mNotificationShadeWindowController).batchApplyWindowLayoutParams(any()); - - mShadeController = spy(new ShadeControllerImpl( - mCommandQueue, - mMainExecutor, - mock(WindowRootViewVisibilityInteractor.class), - mKeyguardStateController, - mStatusBarStateController, - mStatusBarKeyguardViewManager, - mStatusBarWindowController, - mDeviceProvisionedController, - mNotificationShadeWindowController, - 0, - () -> mNotificationPanelViewController, - () -> mAssistManager, - () -> mNotificationGutsManager - )); + if (com.android.systemui.Flags.sceneContainer()) { + mShadeController = spy(mKosmos.getShadeController()); + } else { + mShadeController = spy(new ShadeControllerImpl( + mCommandQueue, + mMainExecutor, + mock(WindowRootViewVisibilityInteractor.class), + mKeyguardStateController, + mStatusBarStateController, + mStatusBarKeyguardViewManager, + mStatusBarWindowController, + mDeviceProvisionedController, + mNotificationShadeWindowController, + 0, + () -> mNotificationPanelViewController, + () -> mAssistManager, + () -> mNotificationGutsManager + )); + } mShadeController.setNotificationShadeWindowViewController( mNotificationShadeWindowViewController); mShadeController.setNotificationPresenter(mNotificationPresenter); @@ -562,7 +566,6 @@ public class CentralSurfacesImplTest extends SysuiTestCase { mUserTracker, () -> mFingerprintManager, mActivityStarter, - mSceneContainerFlags, mBrightnessMirrorShowingInteractor ); mScreenLifecycle.addObserver(mCentralSurfaces.mScreenObserver); @@ -1094,25 +1097,24 @@ public class CentralSurfacesImplTest extends SysuiTestCase { } @Test + @EnableSceneContainer public void brightnesShowingChanged_flagEnabled_ScrimControllerNotified() { - mSceneContainerFlags.setEnabled(true); mCentralSurfaces.registerCallbacks(); mBrightnessMirrorShowingInteractor.setMirrorShowing(true); mTestScope.getTestScheduler().runCurrent(); - verify(mScrimController).transitionTo(ScrimState.BRIGHTNESS_MIRROR); + verify(mScrimController, atLeastOnce()).transitionTo(ScrimState.BRIGHTNESS_MIRROR); mBrightnessMirrorShowingInteractor.setMirrorShowing(false); mTestScope.getTestScheduler().runCurrent(); ArgumentCaptor<ScrimState> captor = ArgumentCaptor.forClass(ScrimState.class); // The default is to call the one with the callback argument - verify(mScrimController).transitionTo(captor.capture(), any()); + verify(mScrimController, atLeastOnce()).transitionTo(captor.capture(), any()); assertThat(captor.getValue()).isNotEqualTo(ScrimState.BRIGHTNESS_MIRROR); } @Test public void brightnesShowingChanged_flagDisabled_ScrimControllerNotified() { - mSceneContainerFlags.setEnabled(false); mCentralSurfaces.registerCallbacks(); mBrightnessMirrorShowingInteractor.setMirrorShowing(true); diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardStatusBarViewControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardStatusBarViewControllerTest.java index dc3db4c7fa19..a6a4f24be4a4 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardStatusBarViewControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/KeyguardStatusBarViewControllerTest.java @@ -20,9 +20,9 @@ package com.android.systemui.statusbar.phone; import static android.app.StatusBarManager.DISABLE2_SYSTEM_ICONS; import static android.app.StatusBarManager.DISABLE_SYSTEM_INFO; +import static com.android.systemui.Flags.FLAG_UPDATE_USER_SWITCHER_BACKGROUND; import static com.android.systemui.statusbar.StatusBarState.KEYGUARD; import static com.android.systemui.statusbar.StatusBarState.SHADE; -import static com.android.systemui.Flags.FLAG_UPDATE_USER_SWITCHER_BACKGROUND; import static com.google.common.truth.Truth.assertThat; @@ -172,7 +172,6 @@ public class KeyguardStatusBarViewControllerTest extends SysuiTestCase { mKeyguardRepository, mCommandQueue, PowerInteractorFactory.create().getPowerInteractor(), - mKosmos.getSceneContainerFlags(), new FakeKeyguardBouncerRepository(), new ConfigurationInteractor(new FakeConfigurationRepository()), new FakeShadeRepository(), diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt index 1463680de7d8..d365663e3621 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/PhoneStatusBarViewControllerTest.kt @@ -33,7 +33,6 @@ import com.android.systemui.SysuiTestCase import com.android.systemui.flags.FeatureFlags import com.android.systemui.flags.Flags import com.android.systemui.res.R -import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags import com.android.systemui.scene.ui.view.WindowRootView import com.android.systemui.shade.ShadeControllerImpl import com.android.systemui.shade.ShadeLogger @@ -51,6 +50,8 @@ import com.android.systemui.util.mockito.argumentCaptor import com.android.systemui.util.mockito.whenever import com.android.systemui.util.view.ViewUtil import com.google.common.truth.Truth.assertThat +import java.util.Optional +import javax.inject.Provider import org.junit.Before import org.junit.Test import org.mockito.ArgumentCaptor @@ -61,8 +62,6 @@ import org.mockito.Mockito.spy import org.mockito.Mockito.verify import org.mockito.Mockito.`when` import org.mockito.MockitoAnnotations -import java.util.Optional -import javax.inject.Provider @SmallTest class PhoneStatusBarViewControllerTest : SysuiTestCase() { @@ -296,7 +295,6 @@ class PhoneStatusBarViewControllerTest : SysuiTestCase() { Optional.of(sysuiUnfoldComponent), Optional.of(progressProvider), featureFlags, - FakeSceneContainerFlags(), userChipViewModel, centralSurfacesImpl, statusBarWindowStateController, diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/ui/viewmodel/KeyguardStatusBarViewModelTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/ui/viewmodel/KeyguardStatusBarViewModelTest.kt index 69536c5e9c0a..bdd3d188ad91 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/ui/viewmodel/KeyguardStatusBarViewModelTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/ui/viewmodel/KeyguardStatusBarViewModelTest.kt @@ -30,7 +30,6 @@ import com.android.systemui.keyguard.shared.model.StatusBarState import com.android.systemui.kosmos.testScope import com.android.systemui.power.domain.interactor.PowerInteractorFactory import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.shade.data.repository.FakeShadeRepository import com.android.systemui.statusbar.CommandQueue import com.android.systemui.statusbar.data.repository.FakeKeyguardStatusBarRepository @@ -60,7 +59,6 @@ class KeyguardStatusBarViewModelTest : SysuiTestCase() { keyguardRepository, mock<CommandQueue>(), PowerInteractorFactory.create().powerInteractor, - kosmos.sceneContainerFlags, FakeKeyguardBouncerRepository(), ConfigurationInteractor(FakeConfigurationRepository()), FakeShadeRepository(), diff --git a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java index c24c86c8cb2a..d9a0c4be04ff 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/wmshell/BubblesTest.java @@ -121,8 +121,6 @@ import com.android.systemui.power.domain.interactor.PowerInteractor; import com.android.systemui.scene.FakeWindowRootViewComponent; import com.android.systemui.scene.data.repository.SceneContainerRepository; import com.android.systemui.scene.domain.interactor.SceneInteractor; -import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags; -import com.android.systemui.scene.shared.flag.SceneContainerFlags; import com.android.systemui.scene.shared.logger.SceneLogger; import com.android.systemui.settings.FakeDisplayTracker; import com.android.systemui.settings.UserTracker; @@ -360,8 +358,6 @@ public class BubblesTest extends SysuiTestCase { @Mock private Display mDefaultDisplay; @Mock - private SceneContainerFlags mSceneContainerFlags; - @Mock private LargeScreenHeaderHelper mLargeScreenHeaderHelper; private final KosmosJavaAdapter mKosmos = new KosmosJavaAdapter(this); @@ -430,14 +426,12 @@ public class BubblesTest extends SysuiTestCase { mock(SceneLogger.class), mKosmos.getDeviceUnlockedInteractor()); - FakeSceneContainerFlags sceneContainerFlags = new FakeSceneContainerFlags(); KeyguardTransitionInteractor keyguardTransitionInteractor = mKosmos.getKeyguardTransitionInteractor(); KeyguardInteractor keyguardInteractor = new KeyguardInteractor( keyguardRepository, new FakeCommandQueue(), powerInteractor, - sceneContainerFlags, new FakeKeyguardBouncerRepository(), new ConfigurationInteractor(configurationRepository), shadeRepository, @@ -503,7 +497,6 @@ public class BubblesTest extends SysuiTestCase { mShadeWindowLogger, () -> mSelectedUserInteractor, mUserTracker, - mSceneContainerFlags, mKosmos::getCommunalInteractor ); mNotificationShadeWindowController.fetchWindowRootView(); diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/SysUITestModule.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/SysUITestModule.kt index de7b14d1e102..0682361823ee 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/SysUITestModule.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/SysUITestModule.kt @@ -31,7 +31,7 @@ import com.android.systemui.deviceentry.data.repository.FaceWakeUpTriggersConfig import com.android.systemui.deviceentry.domain.interactor.DeviceEntryFaceAuthInteractor import com.android.systemui.deviceentry.domain.interactor.SystemUIDeviceEntryFaceAuthInteractor import com.android.systemui.scene.SceneContainerFrameworkModule -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.scene.shared.model.SceneContainerConfig import com.android.systemui.scene.shared.model.SceneDataSource import com.android.systemui.scene.shared.model.SceneDataSourceDelegator @@ -104,11 +104,10 @@ interface SysUITestModule { @Provides fun provideBaseShadeInteractor( - sceneContainerFlags: SceneContainerFlags, sceneContainerOn: Provider<ShadeInteractorSceneContainerImpl>, sceneContainerOff: Provider<ShadeInteractorLegacyImpl> ): BaseShadeInteractor { - return if (sceneContainerFlags.isEnabled()) { + return if (SceneContainerFlag.isEnabled) { sceneContainerOn.get() } else { sceneContainerOff.get() diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/shared/flag/ComposeBouncerFlagsKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/shared/flag/ComposeBouncerFlagsKosmos.kt index 5c3e1f410e63..60d97d1b1437 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/shared/flag/ComposeBouncerFlagsKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/shared/flag/ComposeBouncerFlagsKosmos.kt @@ -17,8 +17,6 @@ package com.android.systemui.bouncer.shared.flag import com.android.systemui.kosmos.Kosmos -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags -var Kosmos.fakeComposeBouncerFlags by - Kosmos.Fixture { FakeComposeBouncerFlags(fakeSceneContainerFlags) } +var Kosmos.fakeComposeBouncerFlags by Kosmos.Fixture { FakeComposeBouncerFlags() } val Kosmos.composeBouncerFlags by Kosmos.Fixture<ComposeBouncerFlags> { fakeComposeBouncerFlags } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/shared/flag/FakeComposeBouncerFlags.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/shared/flag/FakeComposeBouncerFlags.kt index c116bbd32f9e..7482c0feb56a 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/shared/flag/FakeComposeBouncerFlags.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/bouncer/shared/flag/FakeComposeBouncerFlags.kt @@ -16,14 +16,11 @@ package com.android.systemui.bouncer.shared.flag -import com.android.systemui.scene.shared.flag.SceneContainerFlags +import com.android.systemui.scene.shared.flag.SceneContainerFlag -class FakeComposeBouncerFlags( - private val sceneContainerFlags: SceneContainerFlags, - var composeBouncerEnabled: Boolean = false -) : ComposeBouncerFlags { +class FakeComposeBouncerFlags(var composeBouncerEnabled: Boolean = false) : ComposeBouncerFlags { override fun isComposeBouncerOrSceneContainerEnabled(): Boolean { - return sceneContainerFlags.isEnabled() || composeBouncerEnabled + return SceneContainerFlag.isEnabled || composeBouncerEnabled } @Deprecated( diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorKosmos.kt index 4b6ef373a7ee..3dd382f6db3e 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/communal/domain/interactor/CommunalInteractorKosmos.kt @@ -34,7 +34,6 @@ import com.android.systemui.kosmos.applicationCoroutineScope import com.android.systemui.log.logcatLogBuffer import com.android.systemui.plugins.activityStarter import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.settings.userTracker import com.android.systemui.smartspace.data.repository.smartspaceRepository import com.android.systemui.user.data.repository.fakeUserRepository @@ -46,21 +45,20 @@ val Kosmos.communalInteractor by Fixture { broadcastDispatcher = broadcastDispatcher, communalRepository = communalRepository, widgetRepository = communalWidgetRepository, - mediaRepository = communalMediaRepository, communalPrefsRepository = communalPrefsRepository, + mediaRepository = communalMediaRepository, smartspaceRepository = smartspaceRepository, - appWidgetHost = mock(), keyguardInteractor = keyguardInteractor, + communalSettingsInteractor = communalSettingsInteractor, + appWidgetHost = mock(), editWidgetsActivityStarter = editWidgetsActivityStarter, userTracker = userTracker, activityStarter = activityStarter, userManager = userManager, dockManager = fakeDockManager, + sceneInteractor = sceneInteractor, logBuffer = logcatLogBuffer("CommunalInteractor"), tableLogBuffer = mock(), - communalSettingsInteractor = communalSettingsInteractor, - sceneInteractor = sceneInteractor, - sceneContainerFlags = sceneContainerFlags, ) } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorFactory.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorFactory.kt index e21c76672c1d..2e751cce7bad 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorFactory.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorFactory.kt @@ -24,12 +24,9 @@ import com.android.systemui.flags.FakeFeatureFlags import com.android.systemui.keyguard.data.repository.FakeCommandQueue import com.android.systemui.keyguard.data.repository.FakeKeyguardRepository import com.android.systemui.keyguard.shared.model.KeyguardState -import com.android.systemui.kosmos.testScope import com.android.systemui.power.domain.interactor.PowerInteractor import com.android.systemui.power.domain.interactor.PowerInteractorFactory import com.android.systemui.scene.domain.interactor.SceneInteractor -import com.android.systemui.scene.shared.flag.FakeSceneContainerFlags -import com.android.systemui.scene.shared.flag.SceneContainerFlags import com.android.systemui.shade.data.repository.FakeShadeRepository import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor import com.android.systemui.statusbar.notification.stack.domain.interactor.SharedNotificationContainerInteractor.ConfigurationBasedDimensions @@ -49,7 +46,6 @@ object KeyguardInteractorFactory { @JvmStatic fun create( featureFlags: FakeFeatureFlags = FakeFeatureFlags(), - sceneContainerFlags: SceneContainerFlags = FakeSceneContainerFlags(), repository: FakeKeyguardRepository = FakeKeyguardRepository(), commandQueue: FakeCommandQueue = FakeCommandQueue(), bouncerRepository: FakeKeyguardBouncerRepository = FakeKeyguardBouncerRepository(), @@ -88,7 +84,6 @@ object KeyguardInteractorFactory { repository = repository, commandQueue = commandQueue, featureFlags = featureFlags, - sceneContainerFlags = sceneContainerFlags, bouncerRepository = bouncerRepository, configurationRepository = configurationRepository, shadeRepository = shadeRepository, @@ -96,13 +91,12 @@ object KeyguardInteractorFactory { KeyguardInteractor( repository = repository, commandQueue = commandQueue, - sceneContainerFlags = sceneContainerFlags, + powerInteractor = powerInteractor, bouncerRepository = bouncerRepository, configurationInteractor = ConfigurationInteractor(configurationRepository), shadeRepository = shadeRepository, - sceneInteractorProvider = { sceneInteractor }, keyguardTransitionInteractor = keyguardTransitionInteractor, - powerInteractor = powerInteractor, + sceneInteractorProvider = { sceneInteractor }, fromGoneTransitionInteractor = { fromGoneTransitionInteractor }, sharedNotificationContainerInteractor = { sncInteractor }, applicationScope = testScope, @@ -114,7 +108,6 @@ object KeyguardInteractorFactory { val repository: FakeKeyguardRepository, val commandQueue: FakeCommandQueue, val featureFlags: FakeFeatureFlags, - val sceneContainerFlags: SceneContainerFlags, val bouncerRepository: FakeKeyguardBouncerRepository, val configurationRepository: FakeConfigurationRepository, val shadeRepository: FakeShadeRepository, diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorKosmos.kt index 2a0c01c5c0af..94267189e179 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardInteractorKosmos.kt @@ -23,7 +23,6 @@ import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.testScope import com.android.systemui.power.domain.interactor.powerInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.shade.data.repository.shadeRepository import com.android.systemui.statusbar.commandQueue import com.android.systemui.statusbar.notification.stack.domain.interactor.sharedNotificationContainerInteractor @@ -34,7 +33,6 @@ val Kosmos.keyguardInteractor: KeyguardInteractor by repository = keyguardRepository, commandQueue = commandQueue, powerInteractor = powerInteractor, - sceneContainerFlags = sceneContainerFlags, bouncerRepository = keyguardBouncerRepository, configurationInteractor = configurationInteractor, shadeRepository = shadeRepository, diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryIconViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryIconViewModelKosmos.kt index 709f86426f94..58b0ff8513f5 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryIconViewModelKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/DeviceEntryIconViewModelKosmos.kt @@ -26,7 +26,6 @@ import com.android.systemui.keyguard.ui.transitions.DeviceEntryIconTransition import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.kosmos.testScope -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.shade.domain.interactor.shadeInteractor import com.android.systemui.statusbar.phone.statusBarKeyguardViewManager import kotlinx.coroutines.ExperimentalCoroutinesApi @@ -47,7 +46,6 @@ val Kosmos.deviceEntryIconViewModel by Fixture { transitionInteractor = keyguardTransitionInteractor, keyguardInteractor = keyguardInteractor, viewModel = aodToLockscreenTransitionViewModel, - sceneContainerFlags = sceneContainerFlags, keyguardViewController = { statusBarKeyguardViewManager }, deviceEntryInteractor = deviceEntryInteractor, deviceEntrySourceInteractor = deviceEntrySourceInteractor, diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/KosmosJavaAdapter.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/KosmosJavaAdapter.kt index fdc3e0a22627..162f278b7a8f 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/KosmosJavaAdapter.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/kosmos/KosmosJavaAdapter.kt @@ -48,10 +48,9 @@ import com.android.systemui.power.data.repository.fakePowerRepository import com.android.systemui.power.domain.interactor.powerInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor import com.android.systemui.scene.sceneContainerConfig -import com.android.systemui.scene.shared.flag.fakeSceneContainerFlags -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.scene.shared.model.sceneDataSource import com.android.systemui.settings.brightness.domain.interactor.brightnessMirrorShowingInteractor +import com.android.systemui.shade.shadeController import com.android.systemui.statusbar.notification.stack.domain.interactor.sharedNotificationContainerInteractor import com.android.systemui.statusbar.phone.screenOffAnimationController import com.android.systemui.statusbar.pipeline.mobile.data.repository.fakeMobileConnectionsRepository @@ -71,8 +70,6 @@ class KosmosJavaAdapter( val testDispatcher by lazy { kosmos.testDispatcher } val testScope by lazy { kosmos.testScope } val fakeFeatureFlags by lazy { kosmos.fakeFeatureFlagsClassic } - val fakeSceneContainerFlags by lazy { kosmos.fakeSceneContainerFlags } - val sceneContainerFlags by lazy { kosmos.sceneContainerFlags } val fakeExecutor by lazy { kosmos.fakeExecutor } val fakeExecutorHandler by lazy { kosmos.fakeExecutorHandler } val configurationRepository by lazy { kosmos.fakeConfigurationRepository } @@ -112,6 +109,7 @@ class KosmosJavaAdapter( } val brightnessMirrorShowingInteractor by lazy { kosmos.brightnessMirrorShowingInteractor } val qsLongPressEffect by lazy { kosmos.qsLongPressEffect } + val shadeController by lazy { kosmos.shadeController } init { kosmos.applicationContext = testCase.context diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/util/MediaFlagsKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/util/MediaFlagsKosmos.kt index 6f652f224975..e88d22a0e0cd 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/util/MediaFlagsKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/media/controls/util/MediaFlagsKosmos.kt @@ -18,9 +18,5 @@ package com.android.systemui.media.controls.util import com.android.systemui.flags.featureFlagsClassic import com.android.systemui.kosmos.Kosmos -import com.android.systemui.scene.shared.flag.sceneContainerFlags -val Kosmos.mediaFlags by - Kosmos.Fixture { - MediaFlags(featureFlags = featureFlagsClassic, sceneContainerFlags = sceneContainerFlags) - } +val Kosmos.mediaFlags by Kosmos.Fixture { MediaFlags(featureFlags = featureFlagsClassic) } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/shared/flag/FakeSceneContainerFlags.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/shared/flag/FakeSceneContainerFlags.kt deleted file mode 100644 index ded725683e59..000000000000 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/shared/flag/FakeSceneContainerFlags.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.systemui.scene.shared.flag - -import dagger.Binds -import dagger.Module -import dagger.Provides - -class FakeSceneContainerFlags( - var enabled: Boolean = SceneContainerFlag.isEnabled, -) : SceneContainerFlags { - - override fun isEnabled(): Boolean { - return enabled - } - - override fun requirementDescription(): String { - return "" - } -} - -@Module(includes = [FakeSceneContainerFlagsModule.Bindings::class]) -class FakeSceneContainerFlagsModule( - @get:Provides val sceneContainerFlags: FakeSceneContainerFlags = FakeSceneContainerFlags(), -) { - @Module - interface Bindings { - @Binds fun bindFake(fake: FakeSceneContainerFlags): SceneContainerFlags - } -} diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/shared/flag/SceneContainerFlagsKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/scene/shared/flag/SceneContainerFlagsKosmos.kt deleted file mode 100644 index 979d8e76f3ee..000000000000 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/scene/shared/flag/SceneContainerFlagsKosmos.kt +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2023 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.android.systemui.scene.shared.flag - -import com.android.systemui.kosmos.Kosmos - -var Kosmos.fakeSceneContainerFlags by Kosmos.Fixture { FakeSceneContainerFlags() } -val Kosmos.sceneContainerFlags by Kosmos.Fixture<SceneContainerFlags> { fakeSceneContainerFlags } diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/domain/interactor/ShadeInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/domain/interactor/ShadeInteractorKosmos.kt index 07e2d6b0334c..543d5b6f8857 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/shade/domain/interactor/ShadeInteractorKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/shade/domain/interactor/ShadeInteractorKosmos.kt @@ -23,7 +23,6 @@ import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.applicationCoroutineScope import com.android.systemui.power.domain.interactor.powerInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.shade.ShadeModule import com.android.systemui.shade.data.repository.shadeRepository import com.android.systemui.statusbar.disableflags.data.repository.disableFlagsRepository @@ -36,7 +35,6 @@ import com.android.systemui.user.domain.interactor.userSwitcherInteractor var Kosmos.baseShadeInteractor: BaseShadeInteractor by Kosmos.Fixture { ShadeModule.provideBaseShadeInteractor( - sceneContainerFlags = sceneContainerFlags, sceneContainerOn = { shadeInteractorSceneContainerImpl }, sceneContainerOff = { shadeInteractorLegacyImpl }, ) diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModelKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModelKosmos.kt index b2492110f849..f0eea386ecdb 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModelKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationsPlaceholderViewModelKosmos.kt @@ -21,7 +21,6 @@ import com.android.systemui.flags.featureFlagsClassic import com.android.systemui.keyguard.domain.interactor.keyguardInteractor import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.Kosmos.Fixture -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.shade.domain.interactor.shadeInteractor import com.android.systemui.statusbar.notification.stack.domain.interactor.notificationStackAppearanceInteractor @@ -30,7 +29,6 @@ val Kosmos.notificationsPlaceholderViewModel by Fixture { dumpManager = dumpManager, interactor = notificationStackAppearanceInteractor, shadeInteractor = shadeInteractor, - flags = sceneContainerFlags, featureFlags = featureFlagsClassic, keyguardInteractor = keyguardInteractor, ) diff --git a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/WindowRootViewVisibilityInteractorKosmos.kt b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/WindowRootViewVisibilityInteractorKosmos.kt index cf800d04f816..9c3f510c8585 100644 --- a/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/WindowRootViewVisibilityInteractorKosmos.kt +++ b/packages/SystemUI/tests/utils/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/WindowRootViewVisibilityInteractorKosmos.kt @@ -24,7 +24,6 @@ import com.android.systemui.power.domain.interactor.powerInteractor import com.android.systemui.scene.data.repository.windowRootViewVisibilityRepository import com.android.systemui.scene.domain.interactor.WindowRootViewVisibilityInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor -import com.android.systemui.scene.shared.flag.sceneContainerFlags import com.android.systemui.statusbar.notification.domain.interactor.activeNotificationsInteractor import com.android.systemui.statusbar.policy.headsUpManager @@ -36,7 +35,7 @@ val Kosmos.windowRootViewVisibilityInteractor by Fixture { headsUpManager = headsUpManager, powerInteractor = powerInteractor, activeNotificationsInteractor = activeNotificationsInteractor, - sceneInteractorProvider = { sceneInteractor }, - sceneContainerFlags = sceneContainerFlags, - ) + ) { + sceneInteractor + } } |