package IMuAHx_6.KQgRr5e_0.KQgRr5e_0;

import java.io.File;
/* compiled from: StatusUtil.java */
/* loaded from: classes.dex */
public class FSaI4_7 {

    /* compiled from: StatusUtil.java */
    /* loaded from: classes.dex */
    public enum KQgRr5e_0 {
        PENDING,
        RUNNING,
        COMPLETED,
        IDLE,
        UNKNOWN
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public static boolean m11KQgRr5e_0(PGPF6hQ_2 pGPF6hQ_2) {
        return KQgRr5e_0(pGPF6hQ_2) == KQgRr5e_0.COMPLETED;
    }

    public static KQgRr5e_0 KQgRr5e_0(PGPF6hQ_2 pGPF6hQ_2) {
        IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.Mqv2r_3.IFxWkV_5 m28KQgRr5e_0 = X6FRs_4.KQgRr5e_0().m28KQgRr5e_0();
        IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.Mqv2r_3.PGPF6hQ_2 QxJ9d_1 = m28KQgRr5e_0.QxJ9d_1(pGPF6hQ_2.KQgRr5e_0());
        String KQgRr5e_02 = pGPF6hQ_2.KQgRr5e_0();
        File KQgRr5e_03 = pGPF6hQ_2.KQgRr5e_0();
        File m20PGPF6hQ_2 = pGPF6hQ_2.m20PGPF6hQ_2();
        if (QxJ9d_1 != null) {
            if (!QxJ9d_1.m93KQgRr5e_0() && QxJ9d_1.m87KQgRr5e_0() <= 0) {
                return KQgRr5e_0.UNKNOWN;
            }
            if (m20PGPF6hQ_2 != null && m20PGPF6hQ_2.equals(QxJ9d_1.m90KQgRr5e_0()) && m20PGPF6hQ_2.exists() && QxJ9d_1.m94QxJ9d_1() == QxJ9d_1.m87KQgRr5e_0()) {
                return KQgRr5e_0.COMPLETED;
            }
            if (KQgRr5e_02 == null && QxJ9d_1.m90KQgRr5e_0() != null && QxJ9d_1.m90KQgRr5e_0().exists()) {
                return KQgRr5e_0.IDLE;
            }
            if (m20PGPF6hQ_2 != null && m20PGPF6hQ_2.equals(QxJ9d_1.m90KQgRr5e_0()) && m20PGPF6hQ_2.exists()) {
                return KQgRr5e_0.IDLE;
            }
        } else if (!m28KQgRr5e_0.KQgRr5e_0() && !m28KQgRr5e_0.PGPF6hQ_2(pGPF6hQ_2.KQgRr5e_0())) {
            if (m20PGPF6hQ_2 != null && m20PGPF6hQ_2.exists()) {
                return KQgRr5e_0.COMPLETED;
            }
            String KQgRr5e_04 = m28KQgRr5e_0.KQgRr5e_0(pGPF6hQ_2.QxJ9d_1());
            if (KQgRr5e_04 != null && new File(KQgRr5e_03, KQgRr5e_04).exists()) {
                return KQgRr5e_0.COMPLETED;
            }
        } else {
            return KQgRr5e_0.UNKNOWN;
        }
        return KQgRr5e_0.UNKNOWN;
    }
}
