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

Commit 46cdf078 authored by Josh Tsuji's avatar Josh Tsuji
Browse files

Don't count swiping up on the locked shade as a swipe to dismiss.

Bug: 278086361
Test: presubmits run on WIP CLs - CTS tests which failed with 'lockscreen not shown' all pass
Flag: com.android.systemui.keyguard_wm_state_refactor
Change-Id: Iccfca568b5fe4e09fc57bbf0ca115fa93fc33ecb
parent 2c399676
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -19,14 +19,15 @@ package com.android.systemui.keyguard.domain.interactor
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.keyguard.shared.model.StatusBarState
import com.android.systemui.shade.data.repository.ShadeRepository
import com.android.systemui.util.kotlin.Utils.Companion.sample
import javax.inject.Inject
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.filter
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.stateIn
import javax.inject.Inject

/**
 * Handles logic around the swipe to dismiss gesture, where the user swipes up on the dismissable
@@ -53,11 +54,13 @@ constructor(
        shadeRepository.currentFling
            .sample(
                transitionInteractor.startedKeyguardState,
                keyguardInteractor.isKeyguardDismissible
                keyguardInteractor.isKeyguardDismissible,
                keyguardInteractor.statusBarState,
            )
            .filter { (flingInfo, startedState, keyguardDismissable) ->
            .filter { (flingInfo, startedState, keyguardDismissable, statusBarState) ->
                flingInfo != null &&
                        !flingInfo.expand &&
                        statusBarState != StatusBarState.SHADE_LOCKED &&
                        startedState == KeyguardState.LOCKSCREEN &&
                    keyguardDismissable
            }