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

Commit f6db0e7e authored by Shawn Lee's avatar Shawn Lee
Browse files

Fix Udfps setup being blocked due to bouncerExpansion value

bouncer expansion should be ignored while in unlocked (StatusBarState == SHADE) state. This condition brings the expansion value in line with the previous implementation, fixing the regression.

Bug: 300018018
Test: manually verified expansion values are the same in keyguard, and setup works
Change-Id: Idaf2fd0deb199091ae3dab3d5096d7d6d27b3893
parent b3644ceb
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import com.android.systemui.bouncer.domain.interactor.PrimaryBouncerInteractor
import com.android.systemui.dump.DumpManager
import com.android.systemui.lifecycle.repeatWhenAttached
import com.android.systemui.plugins.statusbar.StatusBarStateController
import com.android.systemui.statusbar.StatusBarState.SHADE
import com.android.systemui.statusbar.phone.SystemUIDialogManager
import com.android.systemui.util.ViewController
import kotlinx.coroutines.CoroutineScope
@@ -102,12 +103,14 @@ abstract class UdfpsAnimationViewController<T : UdfpsAnimationView>(
    open suspend fun listenForBouncerExpansion(scope: CoroutineScope): Job {
        return scope.launch {
            primaryBouncerInteractor.bouncerExpansion.map { 1f - it }.collect { expansion: Float ->
                if (statusBarStateController.state != SHADE) {
                    notificationShadeVisible = expansion > 0f
                    view.onExpansionChanged(expansion)
                    updatePauseAuth()
                }
            }
        }
    }

    fun runDialogAlphaAnimator() {
        val hideAffordance = dialogManager.shouldHideAffordance()