package defpackage;

import androidx.datastore.preferences.protobuf.AbstractC0004;
import androidx.datastore.preferences.protobuf.C0003;
import androidx.datastore.preferences.protobuf.C0010;
import androidx.datastore.preferences.protobuf.InvalidProtocolBufferException;
import androidx.datastore.preferences.protobuf.UninitializedMessageException;
import j$.util.DesugarCollections;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Map;

/* JADX INFO: renamed from: ˎʻ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C1681 extends AbstractC0004 {
    private static final C1681 DEFAULT_INSTANCE;
    private static volatile InterfaceC3660 PARSER = null;
    public static final int PREFERENCES_FIELD_NUMBER = 1;
    private C2317 preferences_ = C2317.f9113;

    static {
        C1681 c1681 = new C1681();
        DEFAULT_INSTANCE = c1681;
        AbstractC0004.m152(C1681.class, c1681);
    }

    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public static C4483 m4553() {
        return (C4483) ((AbstractC2524) DEFAULT_INSTANCE.mo157(5));
    }

    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    public static C1681 m4554(FileInputStream fileInputStream) throws InvalidProtocolBufferException {
        C1681 c1681 = DEFAULT_INSTANCE;
        C0003 c0003 = new C0003(fileInputStream);
        C2927 c2927M6989 = C2927.m6989();
        AbstractC0004 abstractC0004M161 = c1681.m161();
        try {
            C3914 c3914 = C3914.f14941;
            c3914.getClass();
            InterfaceC3990 interfaceC3990M8637 = c3914.m8637(abstractC0004M161.getClass());
            C0010 c0010 = (C0010) c0003.f10241;
            if (c0010 == null) {
                c0010 = new C0010(c0003);
            }
            interfaceC3990M8637.mo133(abstractC0004M161, c0010, c2927M6989);
            interfaceC3990M8637.mo130(abstractC0004M161);
            if (AbstractC0004.m154(abstractC0004M161, true)) {
                return (C1681) abstractC0004M161;
            }
            throw new InvalidProtocolBufferException(new UninitializedMessageException().getMessage());
        } catch (InvalidProtocolBufferException e) {
            if (e.f329) {
                throw new InvalidProtocolBufferException(e.getMessage(), e);
            }
            throw e;
        } catch (UninitializedMessageException e2) {
            throw new InvalidProtocolBufferException(e2.getMessage());
        } catch (IOException e3) {
            if (e3.getCause() instanceof InvalidProtocolBufferException) {
                throw ((InvalidProtocolBufferException) e3.getCause());
            }
            throw new InvalidProtocolBufferException(e3.getMessage(), e3);
        } catch (RuntimeException e4) {
            if (e4.getCause() instanceof InvalidProtocolBufferException) {
                throw ((InvalidProtocolBufferException) e4.getCause());
            }
            throw e4;
        }
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public static C2317 m4555(C1681 c1681) {
        C2317 c2317 = c1681.preferences_;
        if (!c2317.f9114) {
            c1681.preferences_ = c2317.m5961();
        }
        return c1681.preferences_;
    }

    @Override // androidx.datastore.preferences.protobuf.AbstractC0004
    /* JADX INFO: renamed from: ːˏᵟᵯ */
    public final Object mo157(int i) {
        InterfaceC3660 c1023;
        switch (AbstractC3653.m8218(i)) {
            case 0:
                return (byte) 1;
            case 1:
                return null;
            case 2:
                return new C5566(DEFAULT_INSTANCE, "\u0001\u0001\u0000\u0000\u0001\u0001\u0001\u0001\u0000\u0000\u00012", new Object[]{"preferences_", AbstractC1049.f4528});
            case 3:
                return new C1681();
            case 4:
                return new C4483(DEFAULT_INSTANCE);
            case 5:
                return DEFAULT_INSTANCE;
            case C5224.STRING_SET_FIELD_NUMBER /* 6 */:
                InterfaceC3660 interfaceC3660 = PARSER;
                if (interfaceC3660 != null) {
                    return interfaceC3660;
                }
                synchronized (C1681.class) {
                    try {
                        c1023 = PARSER;
                        if (c1023 == null) {
                            c1023 = new C1023();
                            PARSER = c1023;
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                    break;
                }
                return c1023;
            default:
                C1390.m3978();
                return null;
        }
    }

    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    public final Map m4556() {
        return DesugarCollections.unmodifiableMap(this.preferences_);
    }
}
