package t0; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.view.View; import android.view.ViewGroup; import t0.l; /* loaded from: classes.dex */ public abstract class n0 extends l { private static final String[] K = {"android:visibility:visibility", "android:visibility:parent"}; private int J = 3; class a extends m { /* renamed from: a, reason: collision with root package name */ final /* synthetic */ ViewGroup f14236a; /* renamed from: b, reason: collision with root package name */ final /* synthetic */ View f14237b; /* renamed from: c, reason: collision with root package name */ final /* synthetic */ View f14238c; a(ViewGroup viewGroup, View view, View view2) { this.f14236a = viewGroup; this.f14237b = view; this.f14238c = view2; } @Override // t0.m, t0.l.f public void a(l lVar) { x.a(this.f14236a).d(this.f14237b); } @Override // t0.l.f public void b(l lVar) { this.f14238c.setTag(i.f14186a, null); x.a(this.f14236a).d(this.f14237b); lVar.R(this); } @Override // t0.m, t0.l.f public void c(l lVar) { if (this.f14237b.getParent() == null) { x.a(this.f14236a).c(this.f14237b); } else { n0.this.cancel(); } } } private static class b extends AnimatorListenerAdapter implements l.f { /* renamed from: a, reason: collision with root package name */ private final View f14240a; /* renamed from: b, reason: collision with root package name */ private final int f14241b; /* renamed from: c, reason: collision with root package name */ private final ViewGroup f14242c; /* renamed from: d, reason: collision with root package name */ private final boolean f14243d; /* renamed from: e, reason: collision with root package name */ private boolean f14244e; /* renamed from: f, reason: collision with root package name */ boolean f14245f = false; b(View view, int i10, boolean z10) { this.f14240a = view; this.f14241b = i10; this.f14242c = (ViewGroup) view.getParent(); this.f14243d = z10; g(true); } private void f() { if (!this.f14245f) { a0.h(this.f14240a, this.f14241b); ViewGroup viewGroup = this.f14242c; if (viewGroup != null) { viewGroup.invalidate(); } } g(false); } private void g(boolean z10) { ViewGroup viewGroup; if (!this.f14243d || this.f14244e == z10 || (viewGroup = this.f14242c) == null) { return; } this.f14244e = z10; x.c(viewGroup, z10); } @Override // t0.l.f public void a(l lVar) { g(false); } @Override // t0.l.f public void b(l lVar) { f(); lVar.R(this); } @Override // t0.l.f public void c(l lVar) { g(true); } @Override // t0.l.f public void d(l lVar) { } @Override // t0.l.f public void e(l lVar) { } @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener public void onAnimationCancel(Animator animator) { this.f14245f = true; } @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener public void onAnimationEnd(Animator animator) { f(); } @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorPauseListener public void onAnimationPause(Animator animator) { if (this.f14245f) { return; } a0.h(this.f14240a, this.f14241b); } @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener public void onAnimationRepeat(Animator animator) { } @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorPauseListener public void onAnimationResume(Animator animator) { if (this.f14245f) { return; } a0.h(this.f14240a, 0); } @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener public void onAnimationStart(Animator animator) { } } private static class c { /* renamed from: a, reason: collision with root package name */ boolean f14246a; /* renamed from: b, reason: collision with root package name */ boolean f14247b; /* renamed from: c, reason: collision with root package name */ int f14248c; /* renamed from: d, reason: collision with root package name */ int f14249d; /* renamed from: e, reason: collision with root package name */ ViewGroup f14250e; /* renamed from: f, reason: collision with root package name */ ViewGroup f14251f; c() { } } private void e0(s sVar) { sVar.f14259a.put("android:visibility:visibility", Integer.valueOf(sVar.f14260b.getVisibility())); sVar.f14259a.put("android:visibility:parent", sVar.f14260b.getParent()); int[] iArr = new int[2]; sVar.f14260b.getLocationOnScreen(iArr); sVar.f14259a.put("android:visibility:screenLocation", iArr); } private c f0(s sVar, s sVar2) { c cVar = new c(); cVar.f14246a = false; cVar.f14247b = false; if (sVar == null || !sVar.f14259a.containsKey("android:visibility:visibility")) { cVar.f14248c = -1; cVar.f14250e = null; } else { cVar.f14248c = ((Integer) sVar.f14259a.get("android:visibility:visibility")).intValue(); cVar.f14250e = (ViewGroup) sVar.f14259a.get("android:visibility:parent"); } if (sVar2 == null || !sVar2.f14259a.containsKey("android:visibility:visibility")) { cVar.f14249d = -1; cVar.f14251f = null; } else { cVar.f14249d = ((Integer) sVar2.f14259a.get("android:visibility:visibility")).intValue(); cVar.f14251f = (ViewGroup) sVar2.f14259a.get("android:visibility:parent"); } if (sVar != null && sVar2 != null) { int i10 = cVar.f14248c; int i11 = cVar.f14249d; if (i10 == i11 && cVar.f14250e == cVar.f14251f) { return cVar; } if (i10 != i11) { if (i10 == 0) { cVar.f14247b = false; cVar.f14246a = true; } else if (i11 == 0) { cVar.f14247b = true; cVar.f14246a = true; } } else if (cVar.f14251f == null) { cVar.f14247b = false; cVar.f14246a = true; } else if (cVar.f14250e == null) { cVar.f14247b = true; cVar.f14246a = true; } } else if (sVar == null && cVar.f14249d == 0) { cVar.f14247b = true; cVar.f14246a = true; } else if (sVar2 == null && cVar.f14248c == 0) { cVar.f14247b = false; cVar.f14246a = true; } return cVar; } @Override // t0.l public String[] E() { return K; } @Override // t0.l public boolean H(s sVar, s sVar2) { if (sVar == null && sVar2 == null) { return false; } if (sVar != null && sVar2 != null && sVar2.f14259a.containsKey("android:visibility:visibility") != sVar.f14259a.containsKey("android:visibility:visibility")) { return false; } c f02 = f0(sVar, sVar2); if (f02.f14246a) { return f02.f14248c == 0 || f02.f14249d == 0; } return false; } @Override // t0.l public void g(s sVar) { e0(sVar); } public abstract Animator g0(ViewGroup viewGroup, View view, s sVar, s sVar2); public Animator h0(ViewGroup viewGroup, s sVar, int i10, s sVar2, int i11) { if ((this.J & 1) != 1 || sVar2 == null) { return null; } if (sVar == null) { View view = (View) sVar2.f14260b.getParent(); if (f0(t(view, false), F(view, false)).f14246a) { return null; } } return g0(viewGroup, sVar2.f14260b, sVar, sVar2); } public abstract Animator i0(ViewGroup viewGroup, View view, s sVar, s sVar2); @Override // t0.l public void j(s sVar) { e0(sVar); } /* JADX WARN: Code restructure failed: missing block: B:51:0x0089, code lost: if (r17.f14213w != false) goto L43; */ /* JADX WARN: Removed duplicated region for block: B:37:0x004a */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct code enable 'Show inconsistent code' option in preferences */ public android.animation.Animator j0(android.view.ViewGroup r18, t0.s r19, int r20, t0.s r21, int r22) { /* Method dump skipped, instructions count: 264 To view this dump change 'Code comments level' option to 'DEBUG' */ throw new UnsupportedOperationException("Method not decompiled: t0.n0.j0(android.view.ViewGroup, t0.s, int, t0.s, int):android.animation.Animator"); } public void k0(int i10) { if ((i10 & (-4)) != 0) { throw new IllegalArgumentException("Only MODE_IN and MODE_OUT flags are allowed"); } this.J = i10; } @Override // t0.l public Animator n(ViewGroup viewGroup, s sVar, s sVar2) { c f02 = f0(sVar, sVar2); if (!f02.f14246a) { return null; } if (f02.f14250e == null && f02.f14251f == null) { return null; } return f02.f14247b ? h0(viewGroup, sVar, f02.f14248c, sVar2, f02.f14249d) : j0(viewGroup, sVar, f02.f14248c, sVar2, f02.f14249d); } }