From a84953202ae6827c10b093b6fc4a536f7aa31ac0 Mon Sep 17 00:00:00 2001 From: Lucas Silva Date: Tue, 25 Jun 2024 10:05:19 -0400 Subject: Disable overscroll scene transition Fixes: 348619549 Test: no longer able to reproduce issue which occurs if hub is overscrolled immediately after opening Flag: com.android.systemui.communal_hub Change-Id: Id53f8e7d7cdb1c831ee460922aac934c5b4d30c8 --- .../src/com/android/systemui/communal/ui/compose/CommunalContainer.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt index 7c2f7fe51d67..d0c40041ee6a 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt @@ -7,6 +7,7 @@ import androidx.compose.animation.core.infiniteRepeatable import androidx.compose.animation.core.rememberInfiniteTransition import androidx.compose.animation.core.tween import androidx.compose.foundation.background +import androidx.compose.foundation.gestures.Orientation import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box @@ -137,6 +138,9 @@ val sceneTransitions = transitions { fade(Communal.Elements.Grid) } } + // Disable horizontal overscroll. If the scene is overscrolled too soon after showing, this + // can lead to inconsistent KeyguardState changes. + overscroll(CommunalScenes.Communal, Orientation.Horizontal) {} } /** -- cgit v1.2.3-59-g8ed1b