package androidx.fragment.app;

import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import android.view.animation.AnimationSet;
import android.view.animation.Transformation;

/* JADX INFO: loaded from: classes.dex */
public final class j0 extends AnimationSet implements Runnable {

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public boolean f2482c;

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public boolean f2484e;

    public j0(Animation animation, ViewGroup viewGroup, View view) {
        super(false);
        this.f2484e = true;
        this.f2480a = viewGroup;
        this.f2481b = view;
        addAnimation(animation);
        viewGroup.post(this);
    }

    @Override // android.view.animation.AnimationSet, android.view.animation.Animation
    public final boolean getTransformation(long j10, Transformation transformation) {
        this.f2484e = true;
        if (this.f2482c) {
            return !this.f2483d;
        }
        if (!super.getTransformation(j10, transformation)) {
            this.f2482c = true;
            androidx.core.view.o0.a(this.f2480a, this);
        }
        return true;
    }

    @Override // java.lang.Runnable
    public final void run() {
        boolean z10 = this.f2482c;
        ViewGroup viewGroup = this.f2480a;
        if (z10 || !this.f2484e) {
            viewGroup.endViewTransition(this.f2481b);
            this.f2483d = true;
        } else {
            this.f2484e = false;
            viewGroup.post(this);
        }
    }

    @Override // android.view.animation.Animation
    public final boolean getTransformation(long j10, Transformation transformation, float f10) {
        this.f2484e = true;
        if (this.f2482c) {
            return !this.f2483d;
        }
        if (!super.getTransformation(j10, transformation, f10)) {
            this.f2482c = true;
            androidx.core.view.o0.a(this.f2480a, this);
        }
        return true;
    }
}
