Merge "Fixing shade transition calculation logic." into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
79a17c3fa3
@@ -441,7 +441,9 @@ class LockscreenShadeTransitionController @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun transitionToShadeAmountCommon(dragDownAmount: Float) {
|
private fun transitionToShadeAmountCommon(dragDownAmount: Float) {
|
||||||
if (depthControllerTransitionDistance > 0) {
|
if (depthControllerTransitionDistance == 0) { // split shade
|
||||||
|
depthController.transitionToFullShadeProgress = 0f
|
||||||
|
} else {
|
||||||
val depthProgress =
|
val depthProgress =
|
||||||
MathUtils.saturate(dragDownAmount / depthControllerTransitionDistance)
|
MathUtils.saturate(dragDownAmount / depthControllerTransitionDistance)
|
||||||
depthController.transitionToFullShadeProgress = depthProgress
|
depthController.transitionToFullShadeProgress = depthProgress
|
||||||
|
|||||||
Reference in New Issue
Block a user