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

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

Merge "Using onLongPress from detectTapGestures in LockscreenTouchHandling." into main

parents 8a163e61 a5ad26a8
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -33,8 +33,6 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
import androidx.compose.ui.geometry.Rect
import androidx.compose.ui.input.pointer.pointerInput
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.android.systemui.communal.ui.compose.extensions.detectLongPressGesture
import com.android.systemui.keyguard.ui.viewmodel.KeyguardTouchHandlingViewModel
import com.android.systemui.lifecycle.rememberViewModel

@@ -53,14 +51,14 @@ fun LockscreenTouchHandling(
        modifier =
            modifier
                .pointerInput(viewModel.isLongPressHandlingEnabled) {
                    if (viewModel.isLongPressHandlingEnabled) {
                        detectLongPressGesture { viewModel.onLongPress(isA11yAction = false) }
                    }
                }
                .pointerInput(Unit) {
                    detectTapGestures(
                        onTap = { viewModel.onClick(it.x, it.y) },
                        onDoubleTap = { viewModel.onDoubleClick() },
                        onLongPress = {
                            if (viewModel.isLongPressHandlingEnabled) {
                                viewModel.onLongPress(isA11yAction = false)
                            }
                        },
                    )
                }
                .pointerInput(settingsMenuBounds) {