Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3f02c4d authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Automerger Merge Worker
Browse files

Merge "Postponing CUJ start by 1 frame" into sc-dev am: e70e6a3b

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15096971

Change-Id: Iaedc20bb98781ad97b8f72e064cb47e77e7f2975
parents 40a75363 e70e6a3b
Loading
Loading
Loading
Loading
+37 −18
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ import android.util.Size;
import android.view.SurfaceControl;
import android.view.View;
import android.view.ViewRootImpl;
import android.view.ViewTreeObserver;
import android.view.animation.Interpolator;
import android.view.animation.PathInterpolator;

@@ -367,7 +368,8 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
                public void onAnimationStart(Animator animation) {
                    mLauncher.addOnResumeCallback(() ->
                            ObjectAnimator.ofFloat(mLauncher.getDepthController(), DEPTH,
                            mLauncher.getStateManager().getState().getDepth(mLauncher)).start());
                                    mLauncher.getStateManager().getState().getDepth(
                                            mLauncher)).start());
                }
            });
        }
@@ -1224,7 +1226,24 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
        anim.addListener(new AnimationSuccessListener() {
            @Override
            public void onAnimationStart(Animator animation) {
                mDragLayer.getViewTreeObserver().addOnDrawListener(
                        new ViewTreeObserver.OnDrawListener() {
                            boolean mHandled = false;

                            @Override
                            public void onDraw() {
                                if (mHandled) {
                                    return;
                                }
                                mHandled = true;

                                InteractionJankMonitorWrapper.begin(mDragLayer, cuj);

                                mDragLayer.post(() ->
                                        mDragLayer.getViewTreeObserver().removeOnDrawListener(
                                                this));
                            }
                        });
                super.onAnimationStart(animation);
            }