package androidx.core.view; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; import android.view.View; import android.view.ViewPropertyAnimator; import android.view.animation.Interpolator; import java.lang.ref.WeakReference; import o.InterfaceC1065Uvb; import o.InterfaceC15687hkl; /* loaded from: classes.dex */ public final class ViewPropertyAnimatorCompat { private final WeakReference d; Runnable c = null; Runnable b = null; int e = -1; /* JADX INFO: Access modifiers changed from: package-private */ public ViewPropertyAnimatorCompat(View view) { this.d = new WeakReference<>(view); } public final ViewPropertyAnimatorCompat b(long j) { View view = this.d.get(); if (view != null) { view.animate().setDuration(j); } return this; } public final ViewPropertyAnimatorCompat b(float f) { View view = this.d.get(); if (view != null) { view.animate().alpha(f); } return this; } public final ViewPropertyAnimatorCompat e(float f) { View view = this.d.get(); if (view != null) { view.animate().translationX(f); } return this; } public final ViewPropertyAnimatorCompat j(float f) { View view = this.d.get(); if (view != null) { view.animate().translationY(f); } return this; } public final long e() { View view = this.d.get(); if (view != null) { return view.animate().getDuration(); } return 0L; } public final ViewPropertyAnimatorCompat tp_(Interpolator interpolator) { View view = this.d.get(); if (view != null) { view.animate().setInterpolator(interpolator); } return this; } public final ViewPropertyAnimatorCompat c(long j) { View view = this.d.get(); if (view != null) { view.animate().setStartDelay(j); } return this; } public final ViewPropertyAnimatorCompat a(float f) { View view = this.d.get(); if (view != null) { view.animate().rotation(f); } return this; } public final ViewPropertyAnimatorCompat c(float f) { View view = this.d.get(); if (view != null) { view.animate().scaleX(f); } return this; } public final ViewPropertyAnimatorCompat d(float f) { View view = this.d.get(); if (view != null) { view.animate().scaleY(f); } return this; } public final void d() { View view = this.d.get(); if (view != null) { view.animate().cancel(); } } public final ViewPropertyAnimatorCompat g(float f) { View view = this.d.get(); if (view != null) { RVV.tr_(view.animate(), f); } return this; } public final void c() { View view = this.d.get(); if (view != null) { view.animate().start(); } } public final ViewPropertyAnimatorCompat b(InterfaceC15687hkl interfaceC15687hkl) { View view = this.d.get(); if (view != null) { e(view, interfaceC15687hkl); } return this; } private void e(View view, InterfaceC15687hkl interfaceC15687hkl) { if (interfaceC15687hkl != null) { view.animate().setListener(new AnimatorListenerAdapter(this, interfaceC15687hkl, view) { // from class: androidx.core.view.ViewPropertyAnimatorCompat.5 final InterfaceC15687hkl b; final View c; final ViewPropertyAnimatorCompat d; { this.d = this; this.b = interfaceC15687hkl; this.c = view; } @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener public void onAnimationCancel(Animator animator) { this.b.b(this.c); } @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener public void onAnimationEnd(Animator animator) { this.b.d(this.c); } @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener public void onAnimationStart(Animator animator) { this.b.e(this.c); } }); } else { view.animate().setListener(null); } } public final ViewPropertyAnimatorCompat e(final InterfaceC1065Uvb interfaceC1065Uvb) { final View view = this.d.get(); if (view != null) { Sts.tq_(view.animate(), interfaceC1065Uvb != null ? new ValueAnimator.AnimatorUpdateListener(interfaceC1065Uvb, view) { // from class: o.UZg public final InterfaceC1065Uvb b; public final View c; @Override // android.animation.ValueAnimator.AnimatorUpdateListener public final void onAnimationUpdate(ValueAnimator valueAnimator) { InterfaceC1065Uvb interfaceC1065Uvb2 = this.b; View view2 = this.c; interfaceC1065Uvb2.e(); } { this.b = interfaceC1065Uvb; this.c = view; } } : null); } return this; } /* loaded from: classes.dex */ static class RVV { static ViewPropertyAnimator tr_(ViewPropertyAnimator viewPropertyAnimator, float f) { return viewPropertyAnimator.translationZ(f); } } /* loaded from: classes.dex */ static class Sts { static ViewPropertyAnimator tq_(ViewPropertyAnimator viewPropertyAnimator, ValueAnimator.AnimatorUpdateListener animatorUpdateListener) { return viewPropertyAnimator.setUpdateListener(animatorUpdateListener); } } }