package androidx.core.view;

import android.view.View;
import android.view.animation.Interpolator;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.lang.ref.WeakReference;

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

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final WeakReference f1872a;

    public z1(View view) {
        this.f1872a = new WeakReference(view);
    }

    public final void a(float f10) {
        View view = (View) this.f1872a.get();
        if (view != null) {
            view.animate().alpha(f10);
        }
    }

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

    public final void c(long j10) {
        View view = (View) this.f1872a.get();
        if (view != null) {
            view.animate().setDuration(j10);
        }
    }

    public final void d(float f10) {
        View view = (View) this.f1872a.get();
        if (view != null) {
            view.animate().translationY(f10);
        }
    }

    @Nullable
    public Interpolator getInterpolator() {
        View view = (View) this.f1872a.get();
        if (view != null) {
            return (Interpolator) view.animate().getInterpolator();
        }
        return null;
    }

    @NonNull
    public z1 setInterpolator(@Nullable Interpolator interpolator) {
        View view = (View) this.f1872a.get();
        if (view != null) {
            view.animate().setInterpolator(interpolator);
        }
        return this;
    }

    @NonNull
    public z1 setListener(@Nullable a2 a2Var) {
        View view = (View) this.f1872a.get();
        if (view != null) {
            if (a2Var != null) {
                view.animate().setListener(new y1(this, a2Var, view, 0));
            } else {
                view.animate().setListener(null);
            }
        }
        return this;
    }

    @NonNull
    public z1 setUpdateListener(@Nullable b2 b2Var) {
        View view = (View) this.f1872a.get();
        if (view != null) {
            view.animate().setUpdateListener(b2Var != null ? new x1(b2Var, view, 0) : null);
        }
        return this;
    }
}
