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

Commit d1514239 authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Do not invoke JankMonitor for unit test." into main

parents 90baa2bd 6829077d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ import android.view.RemoteAnimationTarget;
import android.window.IBackAnimationRunner;
import android.window.IOnBackInvokedCallback;

import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.jank.Cuj.CujType;
import com.android.wm.shell.common.InteractionJankMonitorUtils;

@@ -108,7 +109,8 @@ public class BackAnimationRunner {
        }
    }

    private boolean shouldMonitorCUJ(RemoteAnimationTarget[] apps) {
    @VisibleForTesting
    boolean shouldMonitorCUJ(RemoteAnimationTarget[] apps) {
        return apps.length > 0 && mCujType != NO_CUJ;
    }

+1 −0
Original line number Diff line number Diff line
@@ -596,6 +596,7 @@ public class BackAnimationControllerTest extends ShellTestCase {

        // Set up the monitoring objects.
        doNothing().when(runner).onAnimationStart(anyInt(), any(), any(), any(), any());
        doReturn(false).when(animationRunner).shouldMonitorCUJ(any());
        doReturn(runner).when(animationRunner).getRunner();
        doReturn(callback).when(animationRunner).getCallback();