From 4d9086807578f79c5c9e4eb4069814a824e8c294 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Thu, 14 Apr 2022 14:06:11 -0700 Subject: [PATCH] Add flag that disables depth on overlay scroll Test: manual Fixes: 229261804 Change-Id: I132d9b5ca78255447ca72655b0a1fb1a4f86c3a1 --- .../com/android/launcher3/statehandlers/DepthController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quickstep/src/com/android/launcher3/statehandlers/DepthController.java b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java index 3b02599ada..eda08239d6 100644 --- a/quickstep/src/com/android/launcher3/statehandlers/DepthController.java +++ b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java @@ -53,6 +53,7 @@ import java.util.function.Consumer; public class DepthController implements StateHandler, BaseActivity.MultiWindowModeChangedListener { + private static final boolean OVERLAY_SCROLL_ENABLED = false; public static final FloatProperty DEPTH = new FloatProperty("depth") { @Override @@ -294,6 +295,9 @@ public class DepthController implements StateHandler, } public void onOverlayScrollChanged(float progress) { + if (!OVERLAY_SCROLL_ENABLED) { + return; + } // Add some padding to the progress, such we don't change the depth on the last frames of // the animation. It's possible that a user flinging the feed quickly would scroll // horizontally by accident, causing the device to enter client composition unnecessarily.