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

Commit fc066743 authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

[flexiglass] Renames KeyguardLongPress<*>

Now that these classes don't deal only with long-press (they also deal
with click and double click), "touch handling" is a more fitting name.

Fix: 344879669
Test: not tested, rename only
Flag: com.android.systemui.scene_container
Change-Id: I2063f040b057e2b15c4019b6c5390f0dd8a26a01
parent 69ccc074
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -35,13 +35,13 @@ 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.KeyguardLongPressViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardTouchHandlingViewModel

/** Container for lockscreen content that handles long-press to bring up the settings menu. */
@Composable
// TODO(b/344879669): now that it's more generic than long-press, rename it.
fun LockscreenLongPress(
    viewModel: KeyguardLongPressViewModel,
    viewModel: KeyguardTouchHandlingViewModel,
    modifier: Modifier = Modifier,
    content: @Composable BoxScope.(onSettingsMenuPlaces: (coordinates: Rect?) -> Unit) -> Unit,
) {
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ constructor(
    @Composable
    override fun SceneScope.Content(modifier: Modifier) {
        LockscreenLongPress(
            viewModel = viewModel.longPress,
            viewModel = viewModel.touchHandling,
            modifier = modifier,
        ) { _ ->
            Box(modifier.background(Color.Black)) {
+1 −1
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ constructor(
        val unfoldTranslations by viewModel.unfoldTranslations.collectAsStateWithLifecycle()

        LockscreenLongPress(
            viewModel = viewModel.longPress,
            viewModel = viewModel.touchHandling,
            modifier = modifier,
        ) { onSettingsMenuPlaced ->
            Layout(
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ constructor(
        val unfoldTranslations by viewModel.unfoldTranslations.collectAsStateWithLifecycle()

        LockscreenLongPress(
            viewModel = viewModel.longPress,
            viewModel = viewModel.touchHandling,
            modifier = modifier,
        ) { onSettingsMenuPlaced ->
            Layout(
+3 −3
Original line number Diff line number Diff line
@@ -30,8 +30,8 @@ import androidx.compose.ui.unit.toSize
import androidx.compose.ui.viewinterop.AndroidView
import androidx.core.view.isVisible
import com.android.systemui.keyguard.ui.binder.KeyguardSettingsViewBinder
import com.android.systemui.keyguard.ui.viewmodel.KeyguardLongPressViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardSettingsMenuViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardTouchHandlingViewModel
import com.android.systemui.plugins.ActivityStarter
import com.android.systemui.res.R
import com.android.systemui.statusbar.VibratorHelper
@@ -42,7 +42,7 @@ class SettingsMenuSection
@Inject
constructor(
    private val viewModel: KeyguardSettingsMenuViewModel,
    private val longPressViewModel: KeyguardLongPressViewModel,
    private val touchHandlingViewModel: KeyguardTouchHandlingViewModel,
    private val vibratorHelper: VibratorHelper,
    private val activityStarter: ActivityStarter,
) {
@@ -69,7 +69,7 @@ constructor(
                            KeyguardSettingsViewBinder.bind(
                                view = this,
                                viewModel = viewModel,
                                longPressViewModel = longPressViewModel,
                                touchHandlingViewModel = touchHandlingViewModel,
                                rootViewModel = null,
                                vibratorHelper = vibratorHelper,
                                activityStarter = activityStarter,
Loading