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

Commit e70e6a3b authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

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

parents 7a5a96ea ca383ffd
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());
                }
            });
        }
@@ -1216,7 +1218,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);
            }