mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Adding tracing for app-to-overview
It will help finding jank in the quick switch scenario. Also removing tracing for cases when it's done by the jank monitor. Test: manual Bug: 174892351 Change-Id: I16fc784ddb52203dba54eab2700b5a04a10088ff
This commit is contained in:
@@ -25,6 +25,7 @@ import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.os.Build;
|
||||
import android.os.SystemClock;
|
||||
import android.os.Trace;
|
||||
import android.view.ViewConfiguration;
|
||||
|
||||
import androidx.annotation.BinderThread;
|
||||
@@ -141,6 +142,7 @@ public class OverviewCommandHelper {
|
||||
|
||||
private class RecentsActivityCommand<T extends StatefulActivity<?>> implements Runnable {
|
||||
|
||||
private static final String TRANSITION_NAME = "Transition:toOverview";
|
||||
protected final BaseActivityInterface<?, T> mActivityInterface;
|
||||
private final long mCreateTime;
|
||||
private final AppToOverviewAnimationProvider<T> mAnimationProvider;
|
||||
@@ -223,9 +225,16 @@ public class OverviewCommandHelper {
|
||||
AnimatorSet animatorSet = mAnimationProvider.createWindowAnimation(appTargets,
|
||||
wallpaperTargets);
|
||||
animatorSet.addListener(new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
Trace.beginAsyncSection(TRANSITION_NAME, 0);
|
||||
super.onAnimationStart(animation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
onTransitionComplete();
|
||||
Trace.endAsyncSection(TRANSITION_NAME, 0);
|
||||
}
|
||||
});
|
||||
return animatorSet;
|
||||
|
||||
Reference in New Issue
Block a user