Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0401b355 authored by András Kurucz's avatar András Kurucz
Browse files

SceneContainer now depends on NotificationsHeadsUpRefactor

- add dependency on NotificationsHeadsUpRefactor
- add missing secondary flags
- sort flags alphabetically

Fixes: 332730521
Test: run sysui with flexiglass on and off
Flag: ACONFIG com.android.systemui.scene_container DEVELOPMENTi
Change-Id: I5f7e039649dd2bc2653b0ade718830be003b1f0f
parent 0aeed083
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import com.android.systemui.keyguard.KeyguardWmStateRefactor
import com.android.systemui.keyguard.MigrateClocksToBlueprint
import com.android.systemui.keyguard.shared.ComposeLockscreen
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
@@ -41,11 +42,12 @@ object SceneContainerFlag {
    inline val isEnabled
        get() =
            sceneContainer() && // mainAconfigFlag
            KeyguardBottomAreaRefactor.isEnabled &&
                MigrateClocksToBlueprint.isEnabled &&
            ComposeLockscreen.isEnabled &&
                MediaInSceneContainerFlag.isEnabled &&
                KeyguardBottomAreaRefactor.isEnabled &&
                KeyguardWmStateRefactor.isEnabled &&
                MediaInSceneContainerFlag.isEnabled &&
                MigrateClocksToBlueprint.isEnabled &&
                NotificationsHeadsUpRefactor.isEnabled &&
                PredictiveBackSysUiFlag.isEnabled
    // NOTE: Changes should also be made in getSecondaryFlags and @EnableSceneContainer

@@ -55,11 +57,13 @@ object SceneContainerFlag {
    /** The set of secondary flags which must be enabled for scene container to work properly */
    inline fun getSecondaryFlags(): Sequence<FlagToken> =
        sequenceOf(
            ComposeLockscreen.token,
            KeyguardBottomAreaRefactor.token,
            MigrateClocksToBlueprint.token,
            KeyguardWmStateRefactor.token,
            ComposeLockscreen.token,
            MediaInSceneContainerFlag.token,
            MigrateClocksToBlueprint.token,
            NotificationsHeadsUpRefactor.token,
            PredictiveBackSysUiFlag.token,
            // NOTE: Changes should also be made in isEnabled and @EnableSceneContainer
        )

+6 −4
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import com.android.systemui.Flags.FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR
import com.android.systemui.Flags.FLAG_KEYGUARD_WM_STATE_REFACTOR
import com.android.systemui.Flags.FLAG_MEDIA_IN_SCENE_CONTAINER
import com.android.systemui.Flags.FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT
import com.android.systemui.Flags.FLAG_NOTIFICATIONS_HEADS_UP_REFACTOR
import com.android.systemui.Flags.FLAG_PREDICTIVE_BACK_SYSUI
import com.android.systemui.Flags.FLAG_SCENE_CONTAINER

@@ -30,13 +31,14 @@ import com.android.systemui.Flags.FLAG_SCENE_CONTAINER
 * that feature. It is also picked up by [SceneContainerRule] to set non-aconfig prerequisites.
 */
@EnableFlags(
    FLAG_SCENE_CONTAINER,
    FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR,
    FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT,
    FLAG_COMPOSE_LOCKSCREEN,
    FLAG_MEDIA_IN_SCENE_CONTAINER,
    FLAG_KEYGUARD_BOTTOM_AREA_REFACTOR,
    FLAG_KEYGUARD_WM_STATE_REFACTOR,
    FLAG_MEDIA_IN_SCENE_CONTAINER,
    FLAG_MIGRATE_CLOCKS_TO_BLUEPRINT,
    FLAG_NOTIFICATIONS_HEADS_UP_REFACTOR,
    FLAG_PREDICTIVE_BACK_SYSUI,
    FLAG_SCENE_CONTAINER,
)
@Retention(AnnotationRetention.RUNTIME)
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.CLASS)