package b.f.j;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.view.View;
import java.lang.ref.WeakReference;

/* JADX INFO: loaded from: classes.dex */
public final class s {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public WeakReference<View> f1016a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public int f1017b = -1;

    public class a extends AnimatorListenerAdapter {

        /* JADX INFO: renamed from: a, reason: collision with root package name */
        public final /* synthetic */ t f1018a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final /* synthetic */ View f1019b;

        public a(s sVar, t tVar, View view) {
            this.f1018a = tVar;
            this.f1019b = view;
        }

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationCancel(Animator animator) {
            this.f1018a.c(this.f1019b);
        }

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

        @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
        public void onAnimationStart(Animator animator) {
            this.f1018a.b(this.f1019b);
        }
    }

    public class b implements ValueAnimator.AnimatorUpdateListener {

        /* JADX INFO: renamed from: a, reason: collision with root package name */
        public final /* synthetic */ v f1020a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public final /* synthetic */ View f1021b;

        public b(s sVar, v vVar, View view) {
            this.f1020a = vVar;
            this.f1021b = view;
        }

        @Override // android.animation.ValueAnimator.AnimatorUpdateListener
        public void onAnimationUpdate(ValueAnimator valueAnimator) {
            ((View) b.b.c.s.this.f284f.getParent()).invalidate();
        }
    }

    public s(View view) {
        this.f1016a = new WeakReference<>(view);
    }

    public s a(float f2) {
        View view = this.f1016a.get();
        if (view != null) {
            view.animate().alpha(f2);
        }
        return this;
    }

    public void b() {
        View view = this.f1016a.get();
        if (view != null) {
            view.animate().cancel();
        }
    }

    public s c(long j) {
        View view = this.f1016a.get();
        if (view != null) {
            view.animate().setDuration(j);
        }
        return this;
    }

    public s d(t tVar) {
        View view = this.f1016a.get();
        if (view != null) {
            e(view, tVar);
        }
        return this;
    }

    public final void e(View view, t tVar) {
        if (tVar != null) {
            view.animate().setListener(new a(this, tVar, view));
        } else {
            view.animate().setListener(null);
        }
    }

    public s f(v vVar) {
        View view = this.f1016a.get();
        if (view != null) {
            view.animate().setUpdateListener(vVar != null ? new b(this, vVar, view) : null);
        }
        return this;
    }

    public s g(float f2) {
        View view = this.f1016a.get();
        if (view != null) {
            view.animate().translationY(f2);
        }
        return this;
    }
}
