package p138.p145.p146.p151.p154;

import java.io.File;
import java.util.List;
import p138.p145.p146.p151.EnumC2840;
import p138.p145.p146.p151.InterfaceC2844;
import p138.p145.p146.p151.p152.InterfaceC2856;
import p138.p145.p146.p151.p154.InterfaceC2892;
import p138.p145.p146.p151.p158.InterfaceC3028;

/* JADX INFO: renamed from: ދ.ؠ.֏.ތ.ފ.ށ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C2889 implements InterfaceC2892, InterfaceC2856.InterfaceC2857<Object> {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final List<InterfaceC2844> f8872;

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final C2894<?> f8873;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    public final InterfaceC2892.InterfaceC2893 f8874;

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public int f8875;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public InterfaceC2844 f8876;

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public List<InterfaceC3028<File, ?>> f8877;

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public int f8878;

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public volatile InterfaceC3028.C3029<?> f8879;

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public File f8880;

    public C2889(List<InterfaceC2844> list, C2894<?> c2894, InterfaceC2892.InterfaceC2893 interfaceC2893) {
        this.f8875 = -1;
        this.f8872 = list;
        this.f8873 = c2894;
        this.f8874 = interfaceC2893;
    }

    public C2889(C2894<?> c2894, InterfaceC2892.InterfaceC2893 interfaceC2893) {
        List<InterfaceC2844> listM5010 = c2894.m5010();
        this.f8875 = -1;
        this.f8872 = listM5010;
        this.f8873 = c2894;
        this.f8874 = interfaceC2893;
    }

    @Override // p138.p145.p146.p151.p154.InterfaceC2892
    public void cancel() {
        InterfaceC3028.C3029<?> c3029 = this.f8879;
        if (c3029 != null) {
            c3029.f9201.cancel();
        }
    }

    @Override // p138.p145.p146.p151.p152.InterfaceC2856.InterfaceC2857
    /* JADX INFO: renamed from: ֏ */
    public void mo4989(Exception exc) {
        this.f8874.mo5007(this.f8876, exc, this.f8879.f9201, EnumC2840.DATA_DISK_CACHE);
    }

    @Override // p138.p145.p146.p151.p152.InterfaceC2856.InterfaceC2857
    /* JADX INFO: renamed from: ֏ */
    public void mo4990(Object obj) {
        this.f8874.mo5008(this.f8876, obj, this.f8879.f9201, EnumC2840.DATA_DISK_CACHE, this.f8876);
    }

    @Override // p138.p145.p146.p151.p154.InterfaceC2892
    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public boolean mo5006() {
        while (true) {
            List<InterfaceC3028<File, ?>> list = this.f8877;
            if (list != null) {
                if (this.f8878 < list.size()) {
                    this.f8879 = null;
                    boolean z = false;
                    while (!z) {
                        if (!(this.f8878 < this.f8877.size())) {
                            break;
                        }
                        List<InterfaceC3028<File, ?>> list2 = this.f8877;
                        int i = this.f8878;
                        this.f8878 = i + 1;
                        InterfaceC3028<File, ?> interfaceC3028 = list2.get(i);
                        File file = this.f8880;
                        C2894<?> c2894 = this.f8873;
                        this.f8879 = interfaceC3028.mo2519(file, c2894.f8890, c2894.f8891, c2894.f8894);
                        if (this.f8879 != null && this.f8873.m5015(this.f8879.f9201.mo4969())) {
                            this.f8879.f9201.mo4970(this.f8873.f8900, this);
                            z = true;
                        }
                    }
                    return z;
                }
            }
            int i2 = this.f8875 + 1;
            this.f8875 = i2;
            if (i2 >= this.f8872.size()) {
                return false;
            }
            InterfaceC2844 interfaceC2844 = this.f8872.get(this.f8875);
            File fileMo5115 = this.f8873.m5013().mo5115(new C2890(interfaceC2844, this.f8873.f8899));
            this.f8880 = fileMo5115;
            if (fileMo5115 != null) {
                this.f8876 = interfaceC2844;
                this.f8877 = this.f8873.f8888.f8659.m1035(fileMo5115);
                this.f8878 = 0;
            }
        }
    }
}
