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

Commit 8be0b882 authored by Chet Haase's avatar Chet Haase Committed by Android (Google) Code Review
Browse files

Merge "Optimize calls to Trace for animators"

parents e3b8d7fd 9b80ca81
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -1024,17 +1024,21 @@ public class ValueAnimator extends Animator {
        mStarted = false;
        mStartListenersCalled = false;
        mPlayingBackwards = false;
        if (Trace.isTagEnabled(Trace.TRACE_TAG_VIEW)) {
            Trace.asyncTraceEnd(Trace.TRACE_TAG_VIEW, getNameForTrace(),
                    System.identityHashCode(this));
        }
    }

    /**
     * Called internally to start an animation by adding it to the active animations list. Must be
     * called on the UI thread.
     */
    private void startAnimation(AnimationHandler handler) {
        if (Trace.isTagEnabled(Trace.TRACE_TAG_VIEW)) {
            Trace.asyncTraceBegin(Trace.TRACE_TAG_VIEW, getNameForTrace(),
                    System.identityHashCode(this));
        }
        initAnimation();
        handler.mAnimations.add(this);
        if (mStartDelay > 0 && mListeners != null) {