Loading src/com/android/launcher3/anim/PendingAnimation.java +11 −0 Original line number Diff line number Diff line Loading @@ -22,8 +22,10 @@ import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.TimeInterpolator; import android.animation.ValueAnimator; import android.os.Trace; import android.util.FloatProperty; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatorPlaybackController.Holder; import java.util.ArrayList; Loading Loading @@ -82,6 +84,15 @@ public class PendingAnimation extends AnimatedPropertySetter { add(anim); } /** If trace is enabled, add counter to trace animation progress. */ public void logAnimationProgressToTrace(String counterName) { if (Utilities.ATLEAST_Q && Trace.isEnabled()) { super.addOnFrameListener( animation -> Trace.setCounter( counterName, (long) (animation.getAnimatedFraction() * 100))); } } /** * Creates and returns the underlying AnimatorSet */ Loading Loading
src/com/android/launcher3/anim/PendingAnimation.java +11 −0 Original line number Diff line number Diff line Loading @@ -22,8 +22,10 @@ import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.animation.TimeInterpolator; import android.animation.ValueAnimator; import android.os.Trace; import android.util.FloatProperty; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimatorPlaybackController.Holder; import java.util.ArrayList; Loading Loading @@ -82,6 +84,15 @@ public class PendingAnimation extends AnimatedPropertySetter { add(anim); } /** If trace is enabled, add counter to trace animation progress. */ public void logAnimationProgressToTrace(String counterName) { if (Utilities.ATLEAST_Q && Trace.isEnabled()) { super.addOnFrameListener( animation -> Trace.setCounter( counterName, (long) (animation.getAnimatedFraction() * 100))); } } /** * Creates and returns the underlying AnimatorSet */ Loading