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

Commit eb992e6b authored by Alejandro Nijamkin's avatar Alejandro Nijamkin Committed by Ale Nijamkin
Browse files

[flexiglass] Moves hardcoded enabledness check into SceneContainerFlags.

Bug: 299199299
Test: N/A
Change-Id: Ib0cb5664631a9508921c8471dadfc5f290285d68
parent 522930ff
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -69,7 +69,9 @@ constructor(
            listOf(ComposeMustBeAvailable(), CompileTimeFlagMustBeEnabled())

    override fun isEnabled(): Boolean {
        return requirements.all { it.isMet() }
        // SCENE_CONTAINER_ENABLED is an explicit static flag check that helps with downstream
        // optimizations, e.g., unused code stripping. Do not remove!
        return Flags.SCENE_CONTAINER_ENABLED && requirements.all { it.isMet() }
    }

    override fun requirementDescription(): String {
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ abstract class ShadeViewProviderModule {
            scenesProvider: Provider<Set<@JvmSuppressWildcards Scene>>,
            layoutInsetController: NotificationInsetsController,
        ): WindowRootView {
            return if (Flags.SCENE_CONTAINER_ENABLED && sceneContainerFlags.isEnabled()) {
            return if (sceneContainerFlags.isEnabled()) {
                val sceneWindowRootView =
                    layoutInflater.inflate(R.layout.scene_window_root, null) as SceneWindowRootView
                sceneWindowRootView.init(