Merge "Constrain scroll amount" into sc-v2-dev

This commit is contained in:
TreeHugger Robot 2021-08-14 00:57:13 +00:00 committed by Android (Google) Code Review
commit 348065811f
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ public class DepthController implements StateHandler<LauncherState>,
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;
}