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

Commit 6478fa64 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Winson Chung
Browse files

Migrate FrameTracker to use ST Jank information (2/2)

Test: FrameTrackerTest
Test: Systrace, perform CUJ
Bug: 174755489
Change-Id: I6abecbd9b244f443c9df389938d82427f9584037
parent 992ab433
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -316,12 +316,4 @@ public abstract class BaseQuickstepLauncher extends Launcher
    public void setHintUserWillBeActive() {
        addActivityFlags(ACTIVITY_STATE_USER_WILL_BE_ACTIVE);
    }

    @Override
    public void onAttachedToWindow() {
        super.onAttachedToWindow();
        if (Utilities.ATLEAST_R) {
            InteractionJankMonitorWrapper.init(getWindow().getDecorView());
        }
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -763,7 +763,7 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
        anim.addListener(new AnimationSuccessListener() {
            @Override
            public void onAnimationStart(Animator animation) {
                InteractionJankMonitorWrapper.begin(cuj);
                InteractionJankMonitorWrapper.begin(mDragLayer, cuj);
                super.onAnimationStart(animation);
            }

+6 −4
Original line number Diff line number Diff line
@@ -721,9 +721,9 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<?>, Q extends

    @UiThread
    public void onGestureStarted(boolean isLikelyToStartNewTask) {
        InteractionJankMonitorWrapper.begin(
        InteractionJankMonitorWrapper.begin(mRecentsView,
                InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH, 2000 /* ms timeout */);
        InteractionJankMonitorWrapper.begin(
        InteractionJankMonitorWrapper.begin(mRecentsView,
                InteractionJankMonitorWrapper.CUJ_APP_CLOSE_TO_HOME);
        notifyGestureStartedAsync();
        setIsLikelyToStartNewTask(isLikelyToStartNewTask, false /* animate */);
@@ -805,7 +805,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<?>, Q extends
        maybeUpdateRecentsAttachedState(false);
        final GestureEndTarget endTarget = mGestureState.getEndTarget();
        if (endTarget != NEW_TASK) {
            InteractionJankMonitorWrapper.cancel(InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH);
            InteractionJankMonitorWrapper.cancel(
                    InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH);
        }
        if (endTarget != HOME) {
            InteractionJankMonitorWrapper.cancel(
@@ -1165,7 +1166,8 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<?>, Q extends
                TaskInfoCompat.getPipSourceRectHint(runningTaskTarget.pictureInPictureParams),
                TaskInfoCompat.getWindowConfigurationBounds(taskInfo),
                startBounds,
                destinationBounds);
                destinationBounds,
                mRecentsView);
        // We would assume home and app window always in the same rotation While homeRotation
        // is not ROTATION_0 (which implies the rotation is turned on in launcher settings).
        if (homeRotation == ROTATION_0
+3 −1
Original line number Diff line number Diff line
@@ -175,7 +175,9 @@ public class OverviewCommandHelper {
                return;
            }

            InteractionJankMonitorWrapper.begin(InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH);
            InteractionJankMonitorWrapper.begin(
                    mActivityInterface.getCreatedActivity().getRootView(),
                    InteractionJankMonitorWrapper.CUJ_QUICK_SWITCH);

            // Otherwise, start overview.
            mListener = mActivityInterface.createActivityInitListener(this::onActivityReady);
+4 −2
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.graphics.RectF;
import android.util.Log;
import android.view.Surface;
import android.view.SurfaceControl;
import android.view.View;

import androidx.annotation.NonNull;

@@ -91,7 +92,8 @@ public class SwipePipToHomeAnimator extends ValueAnimator implements
            @NonNull Rect sourceRectHint,
            @NonNull Rect appBounds,
            @NonNull Rect startBounds,
            @NonNull Rect destinationBounds) {
            @NonNull Rect destinationBounds,
            @NonNull View view) {
        mTaskId = taskId;
        mComponentName = componentName;
        mLeash = leash;
@@ -110,7 +112,7 @@ public class SwipePipToHomeAnimator extends ValueAnimator implements
        addListener(new AnimationSuccessListener() {
            @Override
            public void onAnimationStart(Animator animation) {
                InteractionJankMonitorWrapper.begin(CUJ_APP_CLOSE_TO_PIP);
                InteractionJankMonitorWrapper.begin(view, CUJ_APP_CLOSE_TO_PIP);
                super.onAnimationStart(animation);
            }