package v2;

import F1.F;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.view.View;
import android.view.ViewGroup;
import com.debridstream.tv.R;

/* JADX INFO: renamed from: v2.D, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C3100D extends AnimatorListenerAdapter implements InterfaceC3116o {

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final View f25304c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public boolean f25305d = true;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ C3108g f25306e;

    public C3100D(C3108g c3108g, ViewGroup viewGroup, View view, View view2) {
        this.f25306e = c3108g;
        this.f25302a = viewGroup;
        this.f25303b = view;
        this.f25304c = view2;
    }

    @Override // v2.InterfaceC3116o
    public final void c(AbstractC3118q abstractC3118q) {
        if (this.f25305d) {
            g();
        }
    }

    @Override // v2.InterfaceC3116o
    public final void d(AbstractC3118q abstractC3118q) {
        abstractC3118q.y(this);
    }

    public final void g() {
        this.f25304c.setTag(R.id.save_overlay_view, null);
        this.f25302a.getOverlay().remove(this.f25303b);
        this.f25305d = false;
    }

    @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorListener
    public final void onAnimationEnd(Animator animator) {
        g();
    }

    @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorPauseListener
    public final void onAnimationPause(Animator animator) {
        this.f25302a.getOverlay().remove(this.f25303b);
    }

    @Override // android.animation.AnimatorListenerAdapter, android.animation.Animator.AnimatorPauseListener
    public final void onAnimationResume(Animator animator) {
        View view = this.f25303b;
        if (view.getParent() == null) {
            F.a(this.f25302a, view);
        } else {
            this.f25306e.cancel();
        }
    }

    @Override // android.animation.Animator.AnimatorListener
    public final void onAnimationStart(Animator animator, boolean z6) {
        if (z6) {
            View view = this.f25304c;
            View view2 = this.f25303b;
            view.setTag(R.id.save_overlay_view, view2);
            F.a(this.f25302a, view2);
            this.f25305d = true;
        }
    }

    @Override // android.animation.Animator.AnimatorListener
    public final void onAnimationEnd(Animator animator, boolean z6) {
        if (z6) {
            return;
        }
        g();
    }

    @Override // v2.InterfaceC3116o
    public final void a() {
    }

    @Override // v2.InterfaceC3116o
    public final void f() {
    }

    @Override // v2.InterfaceC3116o
    public final void b(AbstractC3118q abstractC3118q) {
    }
}
