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

Commit 6faa43b2 authored by Andre Le's avatar Andre Le
Browse files

Clean up flag usage in KeyguardStateCallbackInteractor

When KeyguardWmStateRefactor is disabled, this means that
SceneContainerFlag should also be disabled. Thus, we can clean up the
extra logic in KeyguardStateCallbackInteractor.

Bug: None
Test: KeyguardStateCallbackInteractorTest
Flag: EXEMPT clean up
Change-Id: I58cc40ca2a0e3cacc42f5889ad99690679dc8aac
parent 5210ef7e
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()