package c.k.b;

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: compiled from: FragmentAnim.java */
/* JADX INFO: loaded from: classes.dex */
public class q extends AnimationSet implements Runnable {

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

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

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

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

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

    public q(Animation animation, ViewGroup viewGroup, View view) {
        super(false);
        this.f1717h = true;
        this.f1713b = viewGroup;
        this.f1714e = view;
        addAnimation(animation);
        viewGroup.post(this);
    }

    @Override // android.view.animation.AnimationSet, android.view.animation.Animation
    public boolean getTransformation(long j2, Transformation transformation) {
        this.f1717h = true;
        if (this.f1715f) {
            return !this.f1716g;
        }
        if (!super.getTransformation(j2, transformation)) {
            this.f1715f = true;
            c.f.j.v.a(this.f1713b, this);
        }
        return true;
    }

    @Override // java.lang.Runnable
    public void run() {
        if (this.f1715f || !this.f1717h) {
            this.f1713b.endViewTransition(this.f1714e);
            this.f1716g = true;
        } else {
            this.f1717h = false;
            this.f1713b.post(this);
        }
    }

    @Override // android.view.animation.Animation
    public boolean getTransformation(long j2, Transformation transformation, float f2) {
        this.f1717h = true;
        if (this.f1715f) {
            return !this.f1716g;
        }
        if (!super.getTransformation(j2, transformation, f2)) {
            this.f1715f = true;
            c.f.j.v.a(this.f1713b, this);
        }
        return true;
    }
}
