diff options
author | 2025-03-11 01:32:26 -0700 | |
---|---|---|
committer | 2025-03-11 01:32:26 -0700 | |
commit | 3b168dee4a80ed93b57b18612aa6749ce0060a51 (patch) | |
tree | 3cb3dc1e22d21615e33ffd7c07a4576e9f755406 | |
parent | 0dcce162c2430d3c3881434e86473ede1d46df12 (diff) | |
parent | 0be82fe561dce915ef539e0aa139761bb67beae5 (diff) |
Merge "Revert "[Flexiglass] Wire in NSSL#setFractionToShade"" into main
5 files changed, 2 insertions, 48 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java index fbbf84596610..a5f711050c46 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java @@ -64,6 +64,7 @@ import android.util.AttributeSet; import android.util.IndentingPrintWriter; import android.util.Log; import android.util.MathUtils; +import android.util.Pair; import android.view.DisplayCutout; import android.view.InputDevice; import android.view.LayoutInflater; @@ -140,6 +141,7 @@ import com.android.systemui.statusbar.notification.stack.ui.view.NotificationScr import com.android.systemui.statusbar.phone.HeadsUpAppearanceController; import com.android.systemui.statusbar.policy.ScrollAdapter; import com.android.systemui.statusbar.policy.SplitShadeStateController; +import com.android.systemui.statusbar.ui.SystemBarUtilsProxy; import com.android.systemui.util.Assert; import com.android.systemui.util.ColorUtilKt; import com.android.systemui.util.DumpUtilsKt; @@ -6000,7 +6002,6 @@ public class NotificationStackScrollLayout * LockscreenShadeTransitionController resets fraction to 0 * where it remains until the next lockscreen-to-shade transition. */ - @Override public void setFractionToShade(float fraction) { mAmbientState.setFractionToShade(fraction); updateContentHeight(); // Recompute stack height with different section gap. diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java index e6a25b76443f..2d0a1c069c5c 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutController.java @@ -1742,7 +1742,6 @@ public class NotificationStackScrollLayoutController implements Dumpable { * they remain until the next lockscreen-to-shade transition. */ public void setTransitionToFullShadeAmount(float fraction) { - SceneContainerFlag.assertInLegacyMode(); mView.setFractionToShade(fraction); } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt index ac89f3a63fcd..9c855e9cd9b7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/view/NotificationScrollView.kt @@ -107,9 +107,6 @@ interface NotificationScrollView { /** sets the current expand fraction */ fun setExpandFraction(expandFraction: Float) - /** Sets the fraction of the LockScreen -> Shade transition. */ - fun setFractionToShade(fraction: Float) - /** sets the current QS expand fraction */ fun setQsExpandFraction(expandFraction: Float) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotificationScrollViewBinder.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotificationScrollViewBinder.kt index 40739b386d20..653344ae9203 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotificationScrollViewBinder.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewbinder/NotificationScrollViewBinder.kt @@ -95,11 +95,6 @@ constructor( view.setExpandFraction(it.coerceIn(0f, 1f)) } } - launch { - viewModel.lockScreenToShadeTransitionProgress.collectTraced { - view.setFractionToShade(it.coerceIn(0f, 1f)) - } - } launch { viewModel.qsExpandFraction.collectTraced { view.setQsExpandFraction(it) } } launch { viewModel.blurRadius(maxBlurRadius).collect(view::setBlurRadius) } launch { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationScrollViewModel.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationScrollViewModel.kt index 940b2e541758..c1aa5f12aa99 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationScrollViewModel.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/ui/viewmodel/NotificationScrollViewModel.kt @@ -207,44 +207,6 @@ constructor( val qsExpandFraction: Flow<Float> = shadeInteractor.qsExpansion.dumpWhileCollecting("qsExpandFraction") - /** - * Fraction of the LockScreen -> Shade transition. 0..1 while the transition in progress, and - * snaps back to 0 when it is Idle. - */ - val lockScreenToShadeTransitionProgress: Flow<Float> = - combine( - shadeInteractor.shadeExpansion, - shadeModeInteractor.shadeMode, - sceneInteractor.transitionState, - ) { shadeExpansion, _, transitionState -> - when (transitionState) { - is Idle -> 0f - is ChangeScene -> - if ( - transitionState.isTransitioning( - from = Scenes.Lockscreen, - to = Scenes.Shade, - ) - ) { - shadeExpansion - } else { - 0f - } - - is Transition.OverlayTransition -> - if ( - transitionState.currentScene == Scenes.Lockscreen && - transitionState.isTransitioning(to = Overlays.NotificationsShade) - ) { - shadeExpansion - } else { - 0f - } - } - } - .distinctUntilChanged() - .dumpWhileCollecting("lockScreenToShadeTransitionProgress") - val isOccluded: Flow<Boolean> = bouncerInteractor.bouncerExpansion .map { it == 1f } |