Merge "Fixing shade transition calculation logic." into tm-dev

This commit is contained in:
Christian Göllner
2022-03-23 11:13:09 +00:00
committed by Android (Google) Code Review

View File

@@ -441,7 +441,9 @@ class LockscreenShadeTransitionController @Inject constructor(
}
private fun transitionToShadeAmountCommon(dragDownAmount: Float) {
if (depthControllerTransitionDistance > 0) {
if (depthControllerTransitionDistance == 0) { // split shade
depthController.transitionToFullShadeProgress = 0f
} else {
val depthProgress =
MathUtils.saturate(dragDownAmount / depthControllerTransitionDistance)
depthController.transitionToFullShadeProgress = depthProgress