package IMuAHx_6.KQgRr5e_0.KQgRr5e_0;

import IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.FSaI4_7.IMuAHx_6;
import android.net.Uri;
import androidx.recyclerview.widget.RecyclerView;
import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
/* compiled from: DownloadTask.java */
/* loaded from: classes.dex */
public class PGPF6hQ_2 extends IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0 implements Comparable<PGPF6hQ_2> {

    /* renamed from: IFxWkV_5  reason: collision with root package name */
    public final int f3041IFxWkV_5;

    /* renamed from: IMuAHx_6  reason: collision with root package name */
    public final int f3042IMuAHx_6;
    public final int KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public volatile IMuAHx_6.KQgRr5e_0.KQgRr5e_0.KQgRr5e_0 f11KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final IMuAHx_6.KQgRr5e_0 f12KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.Mqv2r_3.PGPF6hQ_2 f13KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Uri f14KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Boolean f15KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Integer f16KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final String f17KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final Map<String, List<String>> f18KQgRr5e_0;

    /* renamed from: KQgRr5e_0  reason: collision with other field name */
    public final AtomicLong f19KQgRr5e_0 = new AtomicLong();

    /* renamed from: Mqv2r_3  reason: collision with root package name */
    public final int f3043Mqv2r_3;

    /* renamed from: Mqv2r_3  reason: collision with other field name */
    public File f20Mqv2r_3;

    /* renamed from: Mqv2r_3  reason: collision with other field name */
    public final boolean f21Mqv2r_3;
    public final int PGPF6hQ_2;

    /* renamed from: PGPF6hQ_2  reason: collision with other field name */
    public final File f22PGPF6hQ_2;

    /* renamed from: PGPF6hQ_2  reason: collision with other field name */
    public final boolean f23PGPF6hQ_2;
    public final int QxJ9d_1;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public final File f24QxJ9d_1;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public String f25QxJ9d_1;

    /* renamed from: QxJ9d_1  reason: collision with other field name */
    public final boolean f26QxJ9d_1;

    /* renamed from: X6FRs_4  reason: collision with root package name */
    public final int f3044X6FRs_4;

    /* renamed from: X6FRs_4  reason: collision with other field name */
    public final boolean f27X6FRs_4;

    /* compiled from: DownloadTask.java */
    /* loaded from: classes.dex */
    public static class KQgRr5e_0 {
        public int KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final Uri f28KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public Boolean f29KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public Integer f30KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final String f31KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public volatile Map<String, List<String>> f32KQgRr5e_0;

        /* renamed from: QxJ9d_1  reason: collision with other field name */
        public Boolean f35QxJ9d_1;

        /* renamed from: QxJ9d_1  reason: collision with other field name */
        public String f36QxJ9d_1;
        public int QxJ9d_1 = RecyclerView.WGk6X_27.FLAG_APPEARED_IN_PRE_LAYOUT;
        public int PGPF6hQ_2 = RecyclerView.WGk6X_27.FLAG_SET_A11Y_ITEM_DELEGATE;

        /* renamed from: Mqv2r_3  reason: collision with root package name */
        public int f3046Mqv2r_3 = 65536;

        /* renamed from: X6FRs_4  reason: collision with root package name */
        public int f3047X6FRs_4 = RecyclerView.MAX_SCROLL_DURATION;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public boolean f33KQgRr5e_0 = true;

        /* renamed from: IFxWkV_5  reason: collision with root package name */
        public int f3045IFxWkV_5 = 3000;

        /* renamed from: QxJ9d_1  reason: collision with other field name */
        public boolean f37QxJ9d_1 = true;

        /* renamed from: PGPF6hQ_2  reason: collision with other field name */
        public boolean f34PGPF6hQ_2 = false;

        public KQgRr5e_0(String str, File file) {
            this.f31KQgRr5e_0 = str;
            this.f28KQgRr5e_0 = Uri.fromFile(file);
        }

        public KQgRr5e_0 KQgRr5e_0(boolean z) {
            this.f33KQgRr5e_0 = z;
            return this;
        }

        public KQgRr5e_0 QxJ9d_1(boolean z) {
            this.f37QxJ9d_1 = z;
            return this;
        }

        public KQgRr5e_0 KQgRr5e_0(int i) {
            this.f3045IFxWkV_5 = i;
            return this;
        }

        public KQgRr5e_0 KQgRr5e_0(String str) {
            this.f36QxJ9d_1 = str;
            return this;
        }

        public PGPF6hQ_2 KQgRr5e_0() {
            return new PGPF6hQ_2(this.f31KQgRr5e_0, this.f28KQgRr5e_0, this.KQgRr5e_0, this.QxJ9d_1, this.PGPF6hQ_2, this.f3046Mqv2r_3, this.f3047X6FRs_4, this.f33KQgRr5e_0, this.f3045IFxWkV_5, this.f32KQgRr5e_0, this.f36QxJ9d_1, this.f37QxJ9d_1, this.f34PGPF6hQ_2, this.f29KQgRr5e_0, this.f30KQgRr5e_0, this.f35QxJ9d_1);
        }
    }

    /* compiled from: DownloadTask.java */
    /* renamed from: IMuAHx_6.KQgRr5e_0.KQgRr5e_0.PGPF6hQ_2$PGPF6hQ_2  reason: collision with other inner class name */
    /* loaded from: classes.dex */
    public static class C0001PGPF6hQ_2 {
        public static long KQgRr5e_0(PGPF6hQ_2 pGPF6hQ_2) {
            return pGPF6hQ_2.KQgRr5e_0();
        }

        public static void KQgRr5e_0(PGPF6hQ_2 pGPF6hQ_2, long j) {
            pGPF6hQ_2.KQgRr5e_0(j);
        }

        public static void KQgRr5e_0(PGPF6hQ_2 pGPF6hQ_2, IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.Mqv2r_3.PGPF6hQ_2 pGPF6hQ_22) {
            pGPF6hQ_2.KQgRr5e_0(pGPF6hQ_22);
        }
    }

    /* compiled from: DownloadTask.java */
    /* loaded from: classes.dex */
    public static class QxJ9d_1 extends IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0 {
        public final int KQgRr5e_0;

        /* renamed from: KQgRr5e_0  reason: collision with other field name */
        public final String f38KQgRr5e_0;
        public final File PGPF6hQ_2;
        public final File QxJ9d_1;

        /* renamed from: QxJ9d_1  reason: collision with other field name */
        public final String f39QxJ9d_1;

        public QxJ9d_1(int i, PGPF6hQ_2 pGPF6hQ_2) {
            this.KQgRr5e_0 = i;
            this.f38KQgRr5e_0 = pGPF6hQ_2.f17KQgRr5e_0;
            this.PGPF6hQ_2 = pGPF6hQ_2.KQgRr5e_0();
            this.QxJ9d_1 = pGPF6hQ_2.f24QxJ9d_1;
            this.f39QxJ9d_1 = pGPF6hQ_2.KQgRr5e_0();
        }

        @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
        public int KQgRr5e_0() {
            return this.KQgRr5e_0;
        }

        @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
        public String QxJ9d_1() {
            return this.f38KQgRr5e_0;
        }

        @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
        public File KQgRr5e_0() {
            return this.PGPF6hQ_2;
        }

        @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
        public File QxJ9d_1() {
            return this.QxJ9d_1;
        }

        @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
        public String KQgRr5e_0() {
            return this.f39QxJ9d_1;
        }
    }

    public PGPF6hQ_2(String str, Uri uri, int i, int i2, int i3, int i4, int i5, boolean z, int i6, Map<String, List<String>> map, String str2, boolean z2, boolean z3, Boolean bool, Integer num, Boolean bool2) {
        Boolean bool3;
        String str3 = str2;
        this.f17KQgRr5e_0 = str;
        this.f14KQgRr5e_0 = uri;
        this.QxJ9d_1 = i;
        this.PGPF6hQ_2 = i2;
        this.f3043Mqv2r_3 = i3;
        this.f3044X6FRs_4 = i4;
        this.f3041IFxWkV_5 = i5;
        this.f23PGPF6hQ_2 = z;
        this.f3042IMuAHx_6 = i6;
        this.f18KQgRr5e_0 = map;
        this.f26QxJ9d_1 = z2;
        this.f21Mqv2r_3 = z3;
        this.f16KQgRr5e_0 = num;
        this.f15KQgRr5e_0 = bool2;
        if (IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.PGPF6hQ_2.QxJ9d_1(uri)) {
            File file = new File(uri.getPath());
            if (bool != null) {
                if (bool.booleanValue()) {
                    if (file.exists() && file.isFile()) {
                        throw new IllegalArgumentException("If you want filename from response please make sure you provide path is directory " + file.getPath());
                    }
                    if (!IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.PGPF6hQ_2.KQgRr5e_0((CharSequence) str2)) {
                        IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.PGPF6hQ_2.QxJ9d_1("DownloadTask", "Discard filename[" + str3 + "] because you set filenameFromResponse=true");
                        str3 = null;
                    }
                    this.f22PGPF6hQ_2 = file;
                } else if (file.exists() && file.isDirectory() && IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.PGPF6hQ_2.KQgRr5e_0((CharSequence) str2)) {
                    throw new IllegalArgumentException("If you don't want filename from response please make sure you have already provided valid filename or not directory path " + file.getPath());
                } else if (IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.PGPF6hQ_2.KQgRr5e_0((CharSequence) str2)) {
                    str3 = file.getName();
                    this.f22PGPF6hQ_2 = IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.PGPF6hQ_2.KQgRr5e_0(file);
                } else {
                    this.f22PGPF6hQ_2 = file;
                }
                bool3 = bool;
            } else if (file.exists() && file.isDirectory()) {
                bool3 = true;
                this.f22PGPF6hQ_2 = file;
            } else {
                bool3 = false;
                if (file.exists()) {
                    if (!IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.PGPF6hQ_2.KQgRr5e_0((CharSequence) str2) && !file.getName().equals(str3)) {
                        throw new IllegalArgumentException("Uri already provided filename!");
                    }
                    str3 = file.getName();
                    this.f22PGPF6hQ_2 = IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.PGPF6hQ_2.KQgRr5e_0(file);
                } else if (IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.PGPF6hQ_2.KQgRr5e_0((CharSequence) str2)) {
                    str3 = file.getName();
                    this.f22PGPF6hQ_2 = IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.PGPF6hQ_2.KQgRr5e_0(file);
                } else {
                    this.f22PGPF6hQ_2 = file;
                }
            }
            this.f27X6FRs_4 = bool3.booleanValue();
        } else {
            this.f27X6FRs_4 = false;
            this.f22PGPF6hQ_2 = new File(uri.getPath());
        }
        if (IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.PGPF6hQ_2.KQgRr5e_0((CharSequence) str3)) {
            this.f12KQgRr5e_0 = new IMuAHx_6.KQgRr5e_0();
            this.f24QxJ9d_1 = this.f22PGPF6hQ_2;
        } else {
            this.f12KQgRr5e_0 = new IMuAHx_6.KQgRr5e_0(str3);
            File file2 = new File(this.f22PGPF6hQ_2, str3);
            this.f20Mqv2r_3 = file2;
            this.f24QxJ9d_1 = file2;
        }
        this.KQgRr5e_0 = X6FRs_4.KQgRr5e_0().m28KQgRr5e_0().KQgRr5e_0(this);
    }

    public int IFxWkV_5() {
        return this.f3041IFxWkV_5;
    }

    public int IMuAHx_6() {
        return this.f3044X6FRs_4;
    }

    /* renamed from: Mqv2r_3  reason: collision with other method in class */
    public boolean m19Mqv2r_3() {
        return this.f21Mqv2r_3;
    }

    /* renamed from: PGPF6hQ_2  reason: collision with other method in class */
    public boolean m22PGPF6hQ_2() {
        return this.f26QxJ9d_1;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public boolean QxJ9d_1() {
        return this.f27X6FRs_4;
    }

    public int X6FRs_4() {
        return this.PGPF6hQ_2;
    }

    public boolean equals(Object obj) {
        if (super.equals(obj)) {
            return true;
        }
        if (obj instanceof PGPF6hQ_2) {
            PGPF6hQ_2 pGPF6hQ_2 = (PGPF6hQ_2) obj;
            if (pGPF6hQ_2.KQgRr5e_0 == this.KQgRr5e_0) {
                return true;
            }
            return KQgRr5e_0((IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0) pGPF6hQ_2);
        }
        return false;
    }

    public int hashCode() {
        return (this.f17KQgRr5e_0 + this.f24QxJ9d_1.toString() + this.f12KQgRr5e_0.KQgRr5e_0()).hashCode();
    }

    public String toString() {
        return super.toString() + "@" + this.KQgRr5e_0 + "@" + this.f17KQgRr5e_0 + "@" + this.f22PGPF6hQ_2.toString() + "/" + this.f12KQgRr5e_0.KQgRr5e_0();
    }

    public int Mqv2r_3() {
        return this.QxJ9d_1;
    }

    /* renamed from: PGPF6hQ_2  reason: collision with other method in class */
    public String m21PGPF6hQ_2() {
        return this.f25QxJ9d_1;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public String QxJ9d_1() {
        return this.f17KQgRr5e_0;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public Map<String, List<String>> KQgRr5e_0() {
        return this.f18KQgRr5e_0;
    }

    /* renamed from: PGPF6hQ_2  reason: collision with other method in class */
    public File m20PGPF6hQ_2() {
        String KQgRr5e_02 = this.f12KQgRr5e_0.KQgRr5e_0();
        if (KQgRr5e_02 == null) {
            return null;
        }
        if (this.f20Mqv2r_3 == null) {
            this.f20Mqv2r_3 = new File(this.f22PGPF6hQ_2, KQgRr5e_02);
        }
        return this.f20Mqv2r_3;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public File QxJ9d_1() {
        return this.f24QxJ9d_1;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public int KQgRr5e_0() {
        return this.KQgRr5e_0;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public int QxJ9d_1() {
        return this.f3043Mqv2r_3;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public String KQgRr5e_0() {
        return this.f12KQgRr5e_0.KQgRr5e_0();
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public IMuAHx_6.KQgRr5e_0 KQgRr5e_0() {
        return this.f12KQgRr5e_0;
    }

    public int PGPF6hQ_2() {
        return this.f3042IMuAHx_6;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public Uri KQgRr5e_0() {
        return this.f14KQgRr5e_0;
    }

    public void KQgRr5e_0(String str) {
        this.f25QxJ9d_1 = str;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public File KQgRr5e_0() {
        return this.f22PGPF6hQ_2;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public boolean KQgRr5e_0() {
        return this.f23PGPF6hQ_2;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public Integer KQgRr5e_0() {
        return this.f16KQgRr5e_0;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public Boolean KQgRr5e_0() {
        return this.f15KQgRr5e_0;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.Mqv2r_3.PGPF6hQ_2 KQgRr5e_0() {
        if (this.f13KQgRr5e_0 == null) {
            this.f13KQgRr5e_0 = X6FRs_4.KQgRr5e_0().m28KQgRr5e_0().QxJ9d_1(this.KQgRr5e_0);
        }
        return this.f13KQgRr5e_0;
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public long KQgRr5e_0() {
        return this.f19KQgRr5e_0.get();
    }

    public void KQgRr5e_0(long j) {
        this.f19KQgRr5e_0.set(j);
    }

    public void KQgRr5e_0(IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.Mqv2r_3.PGPF6hQ_2 pGPF6hQ_2) {
        this.f13KQgRr5e_0 = pGPF6hQ_2;
    }

    public void KQgRr5e_0(IMuAHx_6.KQgRr5e_0.KQgRr5e_0.KQgRr5e_0 kQgRr5e_0) {
        this.f11KQgRr5e_0 = kQgRr5e_0;
        X6FRs_4.KQgRr5e_0().m27KQgRr5e_0().KQgRr5e_0(this);
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public void KQgRr5e_0() {
        X6FRs_4.KQgRr5e_0().m27KQgRr5e_0().KQgRr5e_0((IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0) this);
    }

    @Override // IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.KQgRr5e_0
    public IMuAHx_6.KQgRr5e_0.KQgRr5e_0.KQgRr5e_0 KQgRr5e_0() {
        return this.f11KQgRr5e_0;
    }

    @Override // java.lang.Comparable
    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public int compareTo(PGPF6hQ_2 pGPF6hQ_2) {
        return pGPF6hQ_2.Mqv2r_3() - Mqv2r_3();
    }

    public QxJ9d_1 KQgRr5e_0(int i) {
        return new QxJ9d_1(i, this);
    }
}
