package p138.p145.p146.p151.p160.p161;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.ParcelFileDescriptor;
import com.bumptech.glide.load.ImageHeaderParser;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import p000.p001.p002.p003.p004.C0567;
import p138.p145.p146.p151.p152.C2869;
import p138.p145.p146.p151.p152.C2872;
import p138.p145.p146.p151.p154.p155.InterfaceC2940;

/* JADX INFO: renamed from: ދ.ؠ.֏.ތ.ތ.ހ.ޏ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public interface InterfaceC3104 {

    /* JADX INFO: renamed from: ދ.ؠ.֏.ތ.ތ.ހ.ޏ$֏, reason: contains not printable characters */
    public static final class C3105 implements InterfaceC3104 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final C2869 f9326;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final InterfaceC2940 f9327;

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public final List<ImageHeaderParser> f9328;

        public C3105(InputStream inputStream, List<ImageHeaderParser> list, InterfaceC2940 interfaceC2940) {
            C0567.m1858(interfaceC2940, "Argument must not be null");
            this.f9327 = interfaceC2940;
            C0567.m1858(list, "Argument must not be null");
            this.f9328 = list;
            this.f9326 = new C2869(inputStream, interfaceC2940);
        }

        @Override // p138.p145.p146.p151.p160.p161.InterfaceC3104
        /* JADX INFO: renamed from: ֏ */
        public Bitmap mo5188(BitmapFactory.Options options) {
            return BitmapFactory.decodeStream(this.f9326.mo4991(), null, options);
        }

        @Override // p138.p145.p146.p151.p160.p161.InterfaceC3104
        /* JADX INFO: renamed from: ֏ */
        public void mo5189() {
            this.f9326.f8842.m5195();
        }

        @Override // p138.p145.p146.p151.p160.p161.InterfaceC3104
        /* JADX INFO: renamed from: ؠ */
        public int mo5190() {
            return C0567.m1845(this.f9328, this.f9326.mo4991(), this.f9327);
        }

        @Override // p138.p145.p146.p151.p160.p161.InterfaceC3104
        /* JADX INFO: renamed from: ހ */
        public ImageHeaderParser.ImageType mo5191() {
            return C0567.m1909(this.f9328, this.f9326.mo4991(), this.f9327);
        }
    }

    /* JADX INFO: renamed from: ދ.ؠ.֏.ތ.ތ.ހ.ޏ$ؠ, reason: contains not printable characters */
    public static final class C3106 implements InterfaceC3104 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final InterfaceC2940 f9329;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final List<ImageHeaderParser> f9330;

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public final C2872 f9331;

        public C3106(ParcelFileDescriptor parcelFileDescriptor, List<ImageHeaderParser> list, InterfaceC2940 interfaceC2940) {
            C0567.m1858(interfaceC2940, "Argument must not be null");
            this.f9329 = interfaceC2940;
            C0567.m1858(list, "Argument must not be null");
            this.f9330 = list;
            this.f9331 = new C2872(parcelFileDescriptor);
        }

        @Override // p138.p145.p146.p151.p160.p161.InterfaceC3104
        /* JADX INFO: renamed from: ֏ */
        public Bitmap mo5188(BitmapFactory.Options options) {
            return BitmapFactory.decodeFileDescriptor(this.f9331.mo4991().getFileDescriptor(), null, options);
        }

        @Override // p138.p145.p146.p151.p160.p161.InterfaceC3104
        /* JADX INFO: renamed from: ֏ */
        public void mo5189() {
        }

        @Override // p138.p145.p146.p151.p160.p161.InterfaceC3104
        /* JADX INFO: renamed from: ؠ */
        public int mo5190() throws Throwable {
            List<ImageHeaderParser> list = this.f9330;
            C2872 c2872 = this.f9331;
            InterfaceC2940 interfaceC2940 = this.f9329;
            int size = list.size();
            for (int i = 0; i < size; i++) {
                ImageHeaderParser imageHeaderParser = list.get(i);
                C3110 c3110 = null;
                try {
                    C3110 c31102 = new C3110(new FileInputStream(c2872.mo4991().getFileDescriptor()), interfaceC2940);
                    try {
                        int iMo1036 = imageHeaderParser.mo1036(c31102, interfaceC2940);
                        try {
                            c31102.close();
                        } catch (IOException unused) {
                        }
                        c2872.mo4991();
                        if (iMo1036 != -1) {
                            return iMo1036;
                        }
                    } catch (Throwable th) {
                        th = th;
                        c3110 = c31102;
                        if (c3110 != null) {
                            try {
                                c3110.close();
                            } catch (IOException unused2) {
                            }
                        }
                        c2872.mo4991();
                        throw th;
                    }
                } catch (Throwable th2) {
                    th = th2;
                }
            }
            return -1;
        }

        @Override // p138.p145.p146.p151.p160.p161.InterfaceC3104
        /* JADX INFO: renamed from: ހ */
        public ImageHeaderParser.ImageType mo5191() throws Throwable {
            List<ImageHeaderParser> list = this.f9330;
            C2872 c2872 = this.f9331;
            InterfaceC2940 interfaceC2940 = this.f9329;
            int size = list.size();
            for (int i = 0; i < size; i++) {
                ImageHeaderParser imageHeaderParser = list.get(i);
                C3110 c3110 = null;
                try {
                    C3110 c31102 = new C3110(new FileInputStream(c2872.mo4991().getFileDescriptor()), interfaceC2940);
                    try {
                        ImageHeaderParser.ImageType imageTypeMo1037 = imageHeaderParser.mo1037(c31102);
                        try {
                            c31102.close();
                        } catch (IOException unused) {
                        }
                        c2872.mo4991();
                        if (imageTypeMo1037 != ImageHeaderParser.ImageType.UNKNOWN) {
                            return imageTypeMo1037;
                        }
                    } catch (Throwable th) {
                        th = th;
                        c3110 = c31102;
                        if (c3110 != null) {
                            try {
                                c3110.close();
                            } catch (IOException unused2) {
                            }
                        }
                        c2872.mo4991();
                        throw th;
                    }
                } catch (Throwable th2) {
                    th = th2;
                }
            }
            return ImageHeaderParser.ImageType.UNKNOWN;
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    Bitmap mo5188(BitmapFactory.Options options);

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    void mo5189();

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    int mo5190();

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    ImageHeaderParser.ImageType mo5191();
}
