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

Commit 607032e0 authored by Andre Le's avatar Andre Le Committed by Android (Google) Code Review
Browse files

Merge "Clean up flag usage in KeyguardStateCallbackInteractor" into main

parents f0e91f6e 6faa43b2
Loading
Loading
Loading
Loading
+43 −56
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@ import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.keyguard.DismissCallbackRegistry
import com.android.systemui.keyguard.KeyguardWmStateRefactor
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.user.domain.interactor.SelectedUserInteractor
import javax.inject.Inject
import kotlinx.coroutines.CoroutineDispatcher
@@ -64,17 +63,6 @@ constructor(
            return
        }

        if (SceneContainerFlag.isEnabled) {
            // In flexiglass, only the dismiss callback success is tied to the ATMS lockscreen
            // visibility. All other state callbacks are triggered via SceneContainerStartable.
            applicationScope.launch {
                wmLockscreenVisibilityInteractor.lockscreenVisibility.collect { visible ->
                    if (!visible) {
                        dismissCallbackRegistry.notifyDismissSucceeded()
                    }
                }
            }
        } else {
        applicationScope.launch {
            wmLockscreenVisibilityInteractor.lockscreenVisibility.collect { visible ->
                val iterator = callbacks.iterator()
@@ -139,7 +127,6 @@ constructor(
            }
        }
    }
    }

    fun addCallback(callback: IKeyguardStateCallback) {
        KeyguardWmStateRefactor.isUnexpectedlyInLegacyMode()