Merge "Add flag that disables depth on overlay scroll" into tm-dev am: 8c65675382 am: ac1d0b7089
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/17766312 Change-Id: Id36a98777f2067abbc285ef5013c139af1f9bbe7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -53,6 +53,7 @@ import java.util.function.Consumer;
|
|||||||
public class DepthController implements StateHandler<LauncherState>,
|
public class DepthController implements StateHandler<LauncherState>,
|
||||||
BaseActivity.MultiWindowModeChangedListener {
|
BaseActivity.MultiWindowModeChangedListener {
|
||||||
|
|
||||||
|
private static final boolean OVERLAY_SCROLL_ENABLED = false;
|
||||||
public static final FloatProperty<DepthController> DEPTH =
|
public static final FloatProperty<DepthController> DEPTH =
|
||||||
new FloatProperty<DepthController>("depth") {
|
new FloatProperty<DepthController>("depth") {
|
||||||
@Override
|
@Override
|
||||||
@@ -294,6 +295,9 @@ public class DepthController implements StateHandler<LauncherState>,
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onOverlayScrollChanged(float progress) {
|
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
|
// 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
|
// 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.
|
// horizontally by accident, causing the device to enter client composition unnecessarily.
|
||||||
|
|||||||
Reference in New Issue
Block a user