Loading packages/SystemUI/aconfig/systemui.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -2196,3 +2196,13 @@ flag { bug: "201143076" is_fixed_read_only: true } flag { name: "defer_doze_transition_on_shade_drag" namespace: "systemui" description: "Defer doze-to-lockscreen transition animation during notification shade drag" bug: "419763981" metadata { purpose: PURPOSE_BUGFIX } } packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt +20 −5 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ import kotlinx.coroutines.flow.combineTransform import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.emptyFlow import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.merge Loading Loading @@ -256,6 +257,24 @@ constructor( .dumpWhileCollecting("zoomOutFromGlanceableHub") } private fun dozingToLockscreenAlpha(viewState: ViewStateAccessor) = alphaOnShadeExpansion .map { it < 1f } .distinctUntilChanged() .onStart { emit(false) }.flatMapLatest { isExpanding -> if (Flags.deferDozeTransitionOnShadeDrag() && isExpanding) { // If shade is expanding, switch to a flow that never emits. emptyFlow() } else { // Otherwise, use the original flow. if (Flags.newDozingKeyguardStates()) { dozingToLockscreenTransitionViewModel.lockscreenAlpha(viewState) } else { dozingToLockscreenTransitionViewModel.lockscreenAlpha } } } /** Last point that the root view was tapped */ val lastRootViewTapPosition: Flow<Point?> = keyguardInteractor.lastRootViewTapPosition.dumpWhileCollecting("lastRootViewTapPosition") Loading Loading @@ -314,11 +333,7 @@ constructor( aodToGlanceableHubTransitionViewModel.lockscreenAlpha(viewState), dozingToDreamingTransitionViewModel.lockscreenAlpha, dozingToGoneTransitionViewModel.lockscreenAlpha(viewState), if (Flags.newDozingKeyguardStates()) { dozingToLockscreenTransitionViewModel.lockscreenAlpha(viewState) } else { dozingToLockscreenTransitionViewModel.lockscreenAlpha }, dozingToLockscreenAlpha(viewState), dozingToOccludedTransitionViewModel.lockscreenAlpha(viewState), dozingToPrimaryBouncerTransitionViewModel.lockscreenAlpha, dreamingToAodTransitionViewModel.lockscreenAlpha, Loading Loading
packages/SystemUI/aconfig/systemui.aconfig +10 −0 Original line number Diff line number Diff line Loading @@ -2196,3 +2196,13 @@ flag { bug: "201143076" is_fixed_read_only: true } flag { name: "defer_doze_transition_on_shade_drag" namespace: "systemui" description: "Defer doze-to-lockscreen transition animation during notification shade drag" bug: "419763981" metadata { purpose: PURPOSE_BUGFIX } }
packages/SystemUI/src/com/android/systemui/keyguard/ui/viewmodel/KeyguardRootViewModel.kt +20 −5 Original line number Diff line number Diff line Loading @@ -71,6 +71,7 @@ import kotlinx.coroutines.flow.combineTransform import kotlinx.coroutines.flow.distinctUntilChanged import kotlinx.coroutines.flow.emptyFlow import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.flatMapLatest import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.merge Loading Loading @@ -256,6 +257,24 @@ constructor( .dumpWhileCollecting("zoomOutFromGlanceableHub") } private fun dozingToLockscreenAlpha(viewState: ViewStateAccessor) = alphaOnShadeExpansion .map { it < 1f } .distinctUntilChanged() .onStart { emit(false) }.flatMapLatest { isExpanding -> if (Flags.deferDozeTransitionOnShadeDrag() && isExpanding) { // If shade is expanding, switch to a flow that never emits. emptyFlow() } else { // Otherwise, use the original flow. if (Flags.newDozingKeyguardStates()) { dozingToLockscreenTransitionViewModel.lockscreenAlpha(viewState) } else { dozingToLockscreenTransitionViewModel.lockscreenAlpha } } } /** Last point that the root view was tapped */ val lastRootViewTapPosition: Flow<Point?> = keyguardInteractor.lastRootViewTapPosition.dumpWhileCollecting("lastRootViewTapPosition") Loading Loading @@ -314,11 +333,7 @@ constructor( aodToGlanceableHubTransitionViewModel.lockscreenAlpha(viewState), dozingToDreamingTransitionViewModel.lockscreenAlpha, dozingToGoneTransitionViewModel.lockscreenAlpha(viewState), if (Flags.newDozingKeyguardStates()) { dozingToLockscreenTransitionViewModel.lockscreenAlpha(viewState) } else { dozingToLockscreenTransitionViewModel.lockscreenAlpha }, dozingToLockscreenAlpha(viewState), dozingToOccludedTransitionViewModel.lockscreenAlpha(viewState), dozingToPrimaryBouncerTransitionViewModel.lockscreenAlpha, dreamingToAodTransitionViewModel.lockscreenAlpha, Loading