package p023h0;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.os.Build;
import android.view.View;
import android.view.ViewPropertyAnimator;
import android.view.animation.Interpolator;
import java.lang.ref.WeakReference;

/* renamed from: h0.k4 */
/* loaded from: classes.dex */
public final class C0875k4 {

    /* renamed from: a */
    public final WeakReference<View> f2453a;

    /* renamed from: b */
    public Runnable f2454b = null;

    /* renamed from: c */
    public Runnable f2455c = null;

    /* renamed from: d */
    public int f2456d = -1;

    /* renamed from: h0.k4$a */
    /* loaded from: classes.dex */
    public class C0876a extends AnimatorListenerAdapter {

        /* renamed from: a */
        public final /* synthetic */ InterfaceC0891m4 f2457a;

        /* renamed from: b */
        public final /* synthetic */ View f2458b;

        public C0876a(InterfaceC0891m4 interfaceC0891m4, View view) {
            this.f2457a = interfaceC0891m4;
            this.f2458b = view;
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationCancel(Animator animator) {
            this.f2457a.mo2291c(this.f2458b);
        }

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

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationStart(Animator animator) {
            this.f2457a.mo2292b(this.f2458b);
        }
    }

    /* renamed from: h0.k4$b */
    /* loaded from: classes.dex */
    public static class C0877b {
        /* renamed from: a */
        public static ViewPropertyAnimator m2639a(ViewPropertyAnimator viewPropertyAnimator, ValueAnimator.AnimatorUpdateListener animatorUpdateListener) {
            ViewPropertyAnimator updateListener;
            updateListener = viewPropertyAnimator.setUpdateListener(animatorUpdateListener);
            return updateListener;
        }
    }

    public C0875k4(View view) {
        this.f2453a = new WeakReference<>(view);
    }

    /* renamed from: b */
    public C0875k4 m2651b(float f) {
        View view = this.f2453a.get();
        if (view != null) {
            view.animate().alpha(f);
        }
        return this;
    }

    /* renamed from: c */
    public void m2650c() {
        View view = this.f2453a.get();
        if (view != null) {
            view.animate().cancel();
        }
    }

    /* renamed from: d */
    public long m2649d() {
        View view = this.f2453a.get();
        if (view != null) {
            return view.animate().getDuration();
        }
        return 0L;
    }

    /* renamed from: f */
    public C0875k4 m2647f(long j) {
        View view = this.f2453a.get();
        if (view != null) {
            view.animate().setDuration(j);
        }
        return this;
    }

    /* renamed from: g */
    public C0875k4 m2646g(Interpolator interpolator) {
        View view = this.f2453a.get();
        if (view != null) {
            view.animate().setInterpolator(interpolator);
        }
        return this;
    }

    /* renamed from: h */
    public C0875k4 m2645h(InterfaceC0891m4 interfaceC0891m4) {
        View view = this.f2453a.get();
        if (view != null) {
            m2644i(view, interfaceC0891m4);
        }
        return this;
    }

    /* renamed from: i */
    public final void m2644i(View view, InterfaceC0891m4 interfaceC0891m4) {
        if (interfaceC0891m4 != null) {
            view.animate().setListener(new C0876a(interfaceC0891m4, view));
        } else {
            view.animate().setListener(null);
        }
    }

    /* renamed from: j */
    public C0875k4 m2643j(long j) {
        View view = this.f2453a.get();
        if (view != null) {
            view.animate().setStartDelay(j);
        }
        return this;
    }

    /* renamed from: k */
    public C0875k4 m2642k(final InterfaceC0905o4 interfaceC0905o4) {
        final View view = this.f2453a.get();
        if (view != null && Build.VERSION.SDK_INT >= 19) {
            C0877b.m2639a(view.animate(), interfaceC0905o4 != null ? new ValueAnimator.AnimatorUpdateListener() { // from class: h0.j4
                @Override // android.animation.ValueAnimator.AnimatorUpdateListener
                public final void onAnimationUpdate(ValueAnimator valueAnimator) {
                    InterfaceC0905o4.this.mo2613a(view);
                }
            } : null);
        }
        return this;
    }

    /* renamed from: l */
    public void m2641l() {
        View view = this.f2453a.get();
        if (view != null) {
            view.animate().start();
        }
    }

    /* renamed from: m */
    public C0875k4 m2640m(float f) {
        View view = this.f2453a.get();
        if (view != null) {
            view.animate().translationY(f);
        }
        return this;
    }
}