package X6FRs_4.IMuAHx_6.EuDEkJe_12;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.os.Build;
import android.view.View;
import android.view.animation.Interpolator;
import java.lang.ref.WeakReference;
/* compiled from: ViewPropertyAnimatorCompat.java */
/* loaded from: classes.dex */
public final class G83uNX_24 {

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public WeakReference<View> f370KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public Runnable f369KQgRr5e_0 = null;
    public Runnable QxJ9d_1 = null;
    public int KQgRr5e_0 = -1;

    /* compiled from: ViewPropertyAnimatorCompat.java */
    /* loaded from: classes.dex */
    public class KQgRr5e_0 extends AnimatorListenerAdapter {
        public final /* synthetic */ KVtv3R_25 KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final /* synthetic */ View f371KQgRr5e_0;

        public KQgRr5e_0(G83uNX_24 g83uNX_24, KVtv3R_25 kVtv3R_25, View view) {
            this.KQgRr5e_0 = kVtv3R_25;
            this.f371KQgRr5e_0 = view;
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationCancel(Animator animator) {
            this.KQgRr5e_0.QxJ9d_1(this.f371KQgRr5e_0);
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationEnd(Animator animator) {
            this.KQgRr5e_0.KQgRr5e_0(this.f371KQgRr5e_0);
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationStart(Animator animator) {
            this.KQgRr5e_0.PGPF6hQ_2(this.f371KQgRr5e_0);
        }
    }

    /* compiled from: ViewPropertyAnimatorCompat.java */
    /* loaded from: classes.dex */
    public static class PGPF6hQ_2 implements KVtv3R_25 {
        public G83uNX_24 KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public boolean f372KQgRr5e_0;

        public PGPF6hQ_2(G83uNX_24 g83uNX_24) {
            this.KQgRr5e_0 = g83uNX_24;
        }

        @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.KVtv3R_25
        public void KQgRr5e_0(View view) {
            int i = this.KQgRr5e_0.KQgRr5e_0;
            if (i > -1) {
                view.setLayerType(i, null);
                this.KQgRr5e_0.KQgRr5e_0 = -1;
            }
            if (Build.VERSION.SDK_INT >= 16 || !this.f372KQgRr5e_0) {
                G83uNX_24 g83uNX_24 = this.KQgRr5e_0;
                Runnable runnable = g83uNX_24.QxJ9d_1;
                if (runnable != null) {
                    g83uNX_24.QxJ9d_1 = null;
                    runnable.run();
                }
                Object tag = view.getTag(2113929216);
                KVtv3R_25 kVtv3R_25 = tag instanceof KVtv3R_25 ? (KVtv3R_25) tag : null;
                if (kVtv3R_25 != null) {
                    kVtv3R_25.KQgRr5e_0(view);
                }
                this.f372KQgRr5e_0 = true;
            }
        }

        @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.KVtv3R_25
        public void PGPF6hQ_2(View view) {
            this.f372KQgRr5e_0 = false;
            if (this.KQgRr5e_0.KQgRr5e_0 > -1) {
                view.setLayerType(2, null);
            }
            G83uNX_24 g83uNX_24 = this.KQgRr5e_0;
            Runnable runnable = g83uNX_24.f369KQgRr5e_0;
            if (runnable != null) {
                g83uNX_24.f369KQgRr5e_0 = null;
                runnable.run();
            }
            Object tag = view.getTag(2113929216);
            KVtv3R_25 kVtv3R_25 = tag instanceof KVtv3R_25 ? (KVtv3R_25) tag : null;
            if (kVtv3R_25 != null) {
                kVtv3R_25.PGPF6hQ_2(view);
            }
        }

        @Override // X6FRs_4.IMuAHx_6.EuDEkJe_12.KVtv3R_25
        public void QxJ9d_1(View view) {
            Object tag = view.getTag(2113929216);
            KVtv3R_25 kVtv3R_25 = tag instanceof KVtv3R_25 ? (KVtv3R_25) tag : null;
            if (kVtv3R_25 != null) {
                kVtv3R_25.QxJ9d_1(view);
            }
        }
    }

    /* compiled from: ViewPropertyAnimatorCompat.java */
    /* loaded from: classes.dex */
    public class QxJ9d_1 implements ValueAnimator.AnimatorUpdateListener {
        public final /* synthetic */ WGk6X_27 KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final /* synthetic */ View f373KQgRr5e_0;

        public QxJ9d_1(G83uNX_24 g83uNX_24, WGk6X_27 wGk6X_27, View view) {
            this.KQgRr5e_0 = wGk6X_27;
            this.f373KQgRr5e_0 = view;
        }

        @Override // android.animation.ValueAnimator.AnimatorUpdateListener
        public void onAnimationUpdate(ValueAnimator valueAnimator) {
            this.KQgRr5e_0.KQgRr5e_0(this.f373KQgRr5e_0);
        }
    }

    public G83uNX_24(View view) {
        this.f370KQgRr5e_0 = new WeakReference<>(view);
    }

    public G83uNX_24 KQgRr5e_0(long j) {
        View view = this.f370KQgRr5e_0.get();
        if (view != null) {
            view.animate().setDuration(j);
        }
        return this;
    }

    public G83uNX_24 QxJ9d_1(float f) {
        View view = this.f370KQgRr5e_0.get();
        if (view != null) {
            view.animate().translationY(f);
        }
        return this;
    }

    public G83uNX_24 KQgRr5e_0(float f) {
        View view = this.f370KQgRr5e_0.get();
        if (view != null) {
            view.animate().alpha(f);
        }
        return this;
    }

    public G83uNX_24 QxJ9d_1(long j) {
        View view = this.f370KQgRr5e_0.get();
        if (view != null) {
            view.animate().setStartDelay(j);
        }
        return this;
    }

    public long KQgRr5e_0() {
        View view = this.f370KQgRr5e_0.get();
        if (view != null) {
            return view.animate().getDuration();
        }
        return 0L;
    }

    public void QxJ9d_1() {
        View view = this.f370KQgRr5e_0.get();
        if (view != null) {
            view.animate().start();
        }
    }

    public G83uNX_24 KQgRr5e_0(Interpolator interpolator) {
        View view = this.f370KQgRr5e_0.get();
        if (view != null) {
            view.animate().setInterpolator(interpolator);
        }
        return this;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public void m216KQgRr5e_0() {
        View view = this.f370KQgRr5e_0.get();
        if (view != null) {
            view.animate().cancel();
        }
    }

    public G83uNX_24 KQgRr5e_0(KVtv3R_25 kVtv3R_25) {
        View view = this.f370KQgRr5e_0.get();
        if (view != null) {
            if (Build.VERSION.SDK_INT >= 16) {
                KQgRr5e_0(view, kVtv3R_25);
            } else {
                view.setTag(2113929216, kVtv3R_25);
                KQgRr5e_0(view, new PGPF6hQ_2(this));
            }
        }
        return this;
    }

    public final void KQgRr5e_0(View view, KVtv3R_25 kVtv3R_25) {
        if (kVtv3R_25 != null) {
            view.animate().setListener(new KQgRr5e_0(this, kVtv3R_25, view));
        } else {
            view.animate().setListener(null);
        }
    }

    public G83uNX_24 KQgRr5e_0(WGk6X_27 wGk6X_27) {
        View view = this.f370KQgRr5e_0.get();
        if (view != null && Build.VERSION.SDK_INT >= 19) {
            view.animate().setUpdateListener(wGk6X_27 != null ? new QxJ9d_1(this, wGk6X_27, view) : null);
        }
        return this;
    }
}
