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

Commit a5690388 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 96b61aec 46cdf078
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
            }