Merge "Removing condition for CUJ tracing/metrics" into ub-launcher3-master

This commit is contained in:
TreeHugger Robot 2020-10-19 18:42:05 +00:00 committed by Android (Google) Code Review
commit 29c79947ec
1 changed files with 22 additions and 24 deletions

View File

@ -802,33 +802,31 @@ public abstract class QuickstepAppTransitionManagerImpl extends LauncherAppTrans
} }
private void addCujInstrumentation(Animator anim, int cuj, String transition) { private void addCujInstrumentation(Animator anim, int cuj, String transition) {
if (Trace.isEnabled()) { anim.addListener(new AnimationSuccessListener() {
anim.addListener(new AnimationSuccessListener() { @Override
@Override public void onAnimationStart(Animator animation) {
public void onAnimationStart(Animator animation) { Trace.beginAsyncSection(transition, 0);
Trace.beginAsyncSection(transition, 0); InteractionJankMonitorWrapper.begin(cuj);
InteractionJankMonitorWrapper.begin(cuj); super.onAnimationStart(animation);
super.onAnimationStart(animation); }
}
@Override @Override
public void onAnimationCancel(Animator animation) { public void onAnimationCancel(Animator animation) {
super.onAnimationCancel(animation); super.onAnimationCancel(animation);
InteractionJankMonitorWrapper.cancel(cuj); InteractionJankMonitorWrapper.cancel(cuj);
} }
@Override @Override
public void onAnimationSuccess(Animator animator) { public void onAnimationSuccess(Animator animator) {
InteractionJankMonitorWrapper.end(cuj); InteractionJankMonitorWrapper.end(cuj);
} }
@Override @Override
public void onAnimationEnd(Animator animation) { public void onAnimationEnd(Animator animation) {
super.onAnimationEnd(animation); super.onAnimationEnd(animation);
Trace.endAsyncSection(TRANSITION_OPEN_LAUNCHER, 0); Trace.endAsyncSection(TRANSITION_OPEN_LAUNCHER, 0);
} }
}); });
}
} }
/** /**