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

Commit e24cf32d authored by Jian-Syuan (Shane) Wong's avatar Jian-Syuan (Shane) Wong Committed by Android (Google) Code Review
Browse files

Merge "Create a changeId for using expectedPresentationTime"

parents cd2f51f5 8bff0180
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -19,6 +19,9 @@ package android.view.animation;
import android.annotation.AnimRes;
import android.annotation.InterpolatorRes;
import android.annotation.TestApi;
import android.compat.annotation.ChangeId;
import android.compat.annotation.EnabledSince;
import android.compat.annotation.Overridable;
import android.compat.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Resources;
@@ -47,6 +50,18 @@ public class AnimationUtils {
    private static final int TOGETHER = 0;
    private static final int SEQUENTIALLY = 1;

     /**
     * For apps targeting {@link Build.VERSION_CODES#VANILLA_ICE_CREAM} and above,
     * this change ID enables to use expectedPresentationTime instead of the frameTime
     * for the frame start time .
     *
     * @hide
     */
    @ChangeId
    @EnabledSince(targetSdkVersion = android.os.Build.VERSION_CODES.VANILLA_ICE_CREAM)
    @Overridable
    public static final long OVERRIDE_ENABLE_EXPECTED_PRSENTATION_TIME = 278730197L;

    private static class AnimationState {
        boolean animationClockLocked;
        long currentVsyncTimeMillis;