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

Commit 046616d8 authored by Jesse Dai's avatar Jesse Dai
Browse files

Rename LockscreenLongPress to LockscreenTouchHandling

Update the name and comments as the composable handles single tap,
double tap, and long press inputs.

Bug: 394952486
Test: atest SystemUiRoboTests
Test: manual - enable AConfig and double tap setting and verify
double tapping in empty space on lock screen goes to sleep
Flag: com.android.systemui.double_tap_to_sleep

Change-Id: I1261d907a5846d3550ec8e6a16ed5ed89bdf3dd0
parent 8f73b9bd
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -38,10 +38,9 @@ import com.android.systemui.communal.ui.compose.extensions.detectLongPressGestur
import com.android.systemui.keyguard.ui.viewmodel.KeyguardTouchHandlingViewModel
import com.android.systemui.lifecycle.rememberViewModel

/** Container for lockscreen content that handles long-press to bring up the settings menu. */
/** Container for lockscreen content that handles inputs including long-press and double tap. */
@Composable
// TODO(b/344879669): now that it's more generic than long-press, rename it.
fun LockscreenLongPress(
fun LockscreenTouchHandling(
    viewModelFactory: KeyguardTouchHandlingViewModel.Factory,
    modifier: Modifier = Modifier,
    content: @Composable BoxScope.(onSettingsMenuPlaces: (coordinates: Rect?) -> Unit) -> Unit,
+2 −2
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import com.android.compose.animation.scene.ContentScope
import com.android.systemui.keyguard.ui.composable.LockscreenLongPress
import com.android.systemui.keyguard.ui.composable.LockscreenTouchHandling
import com.android.systemui.keyguard.ui.viewmodel.LockscreenContentViewModel
import dagger.Binds
import dagger.Module
@@ -38,7 +38,7 @@ class CommunalBlueprint @Inject constructor() : ComposableLockscreenSceneBluepri

    @Composable
    override fun ContentScope.Content(viewModel: LockscreenContentViewModel, modifier: Modifier) {
        LockscreenLongPress(
        LockscreenTouchHandling(
            viewModelFactory = viewModel.touchHandlingFactory,
            modifier = modifier,
        ) { _ ->
+2 −2
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ import androidx.compose.ui.unit.dp
import com.android.compose.animation.scene.ContentScope
import com.android.compose.modifiers.padding
import com.android.systemui.compose.modifiers.sysuiResTag
import com.android.systemui.keyguard.ui.composable.LockscreenLongPress
import com.android.systemui.keyguard.ui.composable.LockscreenTouchHandling
import com.android.systemui.keyguard.ui.composable.section.AmbientIndicationSection
import com.android.systemui.keyguard.ui.composable.section.BottomAreaSection
import com.android.systemui.keyguard.ui.composable.section.LockSection
@@ -78,7 +78,7 @@ constructor(
            with(notificationSection) { HeadsUpNotifications() }
        }

        LockscreenLongPress(
        LockscreenTouchHandling(
            viewModelFactory = viewModel.touchHandlingFactory,
            modifier = modifier,
        ) { onSettingsMenuPlaced ->