commit | 6d7a006302bcbdfdfb36feb54f8b5376a58ebb4f | [log] [tgz] |
---|---|---|
author | Lucas Dupin <dupin@google.com> | Fri Aug 13 15:57:41 2021 -0700 |
committer | Lucas Dupin <dupin@google.com> | Wed Aug 25 16:45:20 2021 +0000 |
tree | 9f1f7820b7df9ff6367cf23afa456ef6f06e0427 | |
parent | d688120ee11b997df85de2006d3bdff1b852023e [diff] |
Constrain scroll amount Test: scroll vertically and horizontally Fixes: 196309367 Change-Id: Ibf16fb72cf95e29ed820d5f511e764a388c93bb0 Merged-In: Ibf16fb72cf95e29ed820d5f511e764a388c93bb0 (cherry picked from commit b259a896f5e4280fce236061d6f12a28b9ba6355)
diff --git a/quickstep/src/com/android/launcher3/statehandlers/DepthController.java b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java index d22abf6..bb58f45 100644 --- a/quickstep/src/com/android/launcher3/statehandlers/DepthController.java +++ b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java
@@ -271,7 +271,7 @@ public void onOverlayScrollChanged(float progress) { // Round out the progress to dedupe frequent, non-perceptable updates int progressI = (int) (progress * 256); - float progressF = progressI / 256f; + float progressF = Utilities.boundToRange(progressI / 256f, 0f, 1f); if (Float.compare(mOverlayScrollProgress, progressF) == 0) { return; }