package defpackage;

import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import java.io.InputStream;
import java.util.ArrayDeque;

/* JADX INFO: renamed from: ᵡᵘˎʽ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C3213 implements InterfaceC5086 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final Object f12243;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final Object f12244;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final /* synthetic */ int f12245;

    public C3213(Resources resources, InterfaceC5086 interfaceC5086) {
        this.f12245 = 0;
        this.f12244 = resources;
        this.f12243 = interfaceC5086;
    }

    public /* synthetic */ C3213(Object obj, int i, Object obj2) {
        this.f12245 = i;
        this.f12243 = obj;
        this.f12244 = obj2;
    }

    @Override // defpackage.InterfaceC5086
    /* JADX INFO: renamed from: ʽˈˋ */
    public final InterfaceC1364 mo4805(Object obj, int i, int i2, C2220 c2220) {
        boolean z;
        C1645 c1645;
        C5578 c5578;
        switch (this.f12245) {
            case 0:
                InterfaceC1364 interfaceC1364Mo4805 = ((InterfaceC5086) this.f12243).mo4805(obj, i, i2, c2220);
                Resources resources = (Resources) this.f12244;
                if (interfaceC1364Mo4805 == null) {
                    return null;
                }
                return new C4278(resources, interfaceC1364Mo4805);
            case 1:
                InterfaceC1364 interfaceC1364M9327 = ((C4342) this.f12243).m9327((Uri) obj, c2220);
                if (interfaceC1364M9327 == null) {
                    return null;
                }
                return AbstractC0803.m2916((InterfaceC5397) this.f12244, (Drawable) ((C0634) interfaceC1364M9327).get(), i, i2);
            default:
                InputStream inputStream = (InputStream) obj;
                if (inputStream instanceof C1645) {
                    c1645 = (C1645) inputStream;
                    z = false;
                } else {
                    z = true;
                    c1645 = new C1645(inputStream, (C5540) this.f12244);
                }
                ArrayDeque arrayDeque = C5578.f21037;
                synchronized (arrayDeque) {
                    c5578 = (C5578) arrayDeque.poll();
                    break;
                }
                if (c5578 == null) {
                    c5578 = new C5578();
                }
                C5578 c55782 = c5578;
                c55782.f21038 = c1645;
                C5269 c5269 = new C5269(c55782);
                C3714 c3714 = new C3714(c1645, 28, c55782);
                try {
                    C3297 c3297 = (C3297) this.f12243;
                    C4278 c4278M7554 = c3297.m7554(new ᵣˊˈᵪ(c5269, c3297.f12690, c3297.f12687), i, i2, c2220, c3714);
                    c55782.m11215();
                    if (z) {
                        c1645.m4540();
                    }
                    return c4278M7554;
                } finally {
                }
        }
    }

    @Override // defpackage.InterfaceC5086
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final boolean mo4807(Object obj, C2220 c2220) {
        switch (this.f12245) {
            case 0:
                return ((InterfaceC5086) this.f12243).mo4807(obj, c2220);
            case 1:
                return "android.resource".equals(((Uri) obj).getScheme());
            default:
                return true;
        }
    }
}
