package o;

import java.io.FileInputStream;
import java.io.IOException;
import java.util.Collections;
import java.util.Map;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.qY, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C2245qY extends DD {
    private static final C2245qY DEFAULT_INSTANCE;
    private static volatile PV PARSER = null;
    public static final int PREFERENCES_FIELD_NUMBER = 1;
    private BN preferences_ = BN.m;

    static {
        C2245qY c2245qY = new C2245qY();
        DEFAULT_INSTANCE = c2245qY;
        DD.j(C2245qY.class, c2245qY);
    }

    public static BN l(C2245qY c2245qY) {
        BN bn = c2245qY.preferences_;
        if (!bn.l) {
            c2245qY.preferences_ = bn.b();
        }
        return c2245qY.preferences_;
    }

    public static C2055oY n() {
        return (C2055oY) ((BD) DEFAULT_INSTANCE.c(5));
    }

    public static C2245qY o(FileInputStream fileInputStream) {
        C2245qY c2245qY = DEFAULT_INSTANCE;
        C2547ti c2547ti = new C2547ti(fileInputStream);
        C2481sx c2481sxA = C2481sx.a();
        DD ddI = c2245qY.i();
        try {
            C2530tZ c2530tZ = C2530tZ.c;
            c2530tZ.getClass();
            I40 i40A = c2530tZ.a(ddI.getClass());
            C2642ui c2642ui = (C2642ui) c2547ti.m;
            if (c2642ui == null) {
                c2642ui = new C2642ui(c2547ti);
            }
            i40A.f(ddI, c2642ui, c2481sxA);
            i40A.c(ddI);
            if (DD.f(ddI, true)) {
                return (C2245qY) ddI;
            }
            throw new EI(new Lh0().getMessage());
        } catch (EI e) {
            if (e.l) {
                throw new EI(e.getMessage(), e);
            }
            throw e;
        } catch (IOException e2) {
            if (e2.getCause() instanceof EI) {
                throw ((EI) e2.getCause());
            }
            throw new EI(e2.getMessage(), e2);
        } catch (Lh0 e3) {
            throw new EI(e3.getMessage());
        } catch (RuntimeException e4) {
            if (e4.getCause() instanceof EI) {
                throw ((EI) e4.getCause());
            }
            throw e4;
        }
    }

    @Override // o.DD
    public final Object c(int i) {
        PV cd;
        switch (AbstractC2462sn.w(i)) {
            case 0:
                return (byte) 1;
            case 1:
                return null;
            case 2:
                return new C1059e00(DEFAULT_INSTANCE, "\u0001\u0001\u0000\u0000\u0001\u0001\u0001\u0001\u0000\u0000\u00012", new Object[]{"preferences_", AbstractC2150pY.a});
            case 3:
                return new C2245qY();
            case 4:
                return new C2055oY(DEFAULT_INSTANCE);
            case 5:
                return DEFAULT_INSTANCE;
            case 6:
                PV pv = PARSER;
                if (pv != null) {
                    return pv;
                }
                synchronized (C2245qY.class) {
                    try {
                        cd = PARSER;
                        if (cd == null) {
                            cd = new CD();
                            PARSER = cd;
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                }
                return cd;
            default:
                throw new UnsupportedOperationException();
        }
    }

    public final Map m() {
        return Collections.unmodifiableMap(this.preferences_);
    }
}
