package h4;

import androidx.datastore.preferences.protobuf.h0;
import androidx.datastore.preferences.protobuf.i0;
import androidx.datastore.preferences.protobuf.p0;
import androidx.datastore.preferences.protobuf.q1;
import androidx.datastore.preferences.protobuf.w;
import androidx.datastore.preferences.protobuf.w0;
import java.io.InputStream;
import java.util.Collections;
import java.util.Map;

/* loaded from: classes.dex */
public final class f extends w implements p0 {
    private static final f DEFAULT_INSTANCE;
    private static volatile w0 PARSER = null;
    public static final int PREFERENCES_FIELD_NUMBER = 1;
    private i0 preferences_ = i0.d();

    /* loaded from: classes.dex */
    public static final class a extends w.a implements p0 {
        /* synthetic */ a(e eVar) {
            this();
        }

        public a s(String str, h hVar) {
            str.getClass();
            hVar.getClass();
            l();
            ((f) this.f4215q).E().put(str, hVar);
            return this;
        }

        private a() {
            super(f.DEFAULT_INSTANCE);
        }
    }

    /* loaded from: classes.dex */
    private static final class b {

        /* renamed from: a, reason: collision with root package name */
        static final h0 f20827a = h0.d(q1.b.STRING, "", q1.b.MESSAGE, h.L());
    }

    static {
        f fVar = new f();
        DEFAULT_INSTANCE = fVar;
        w.A(f.class, fVar);
    }

    private f() {
    }

    /* JADX INFO: Access modifiers changed from: private */
    public Map E() {
        return G();
    }

    private i0 G() {
        if (!this.preferences_.p()) {
            this.preferences_ = this.preferences_.y();
        }
        return this.preferences_;
    }

    private i0 H() {
        return this.preferences_;
    }

    public static a I() {
        return (a) DEFAULT_INSTANCE.j();
    }

    public static f J(InputStream inputStream) {
        return (f) w.y(DEFAULT_INSTANCE, inputStream);
    }

    public Map F() {
        return Collections.unmodifiableMap(H());
    }

    @Override // androidx.datastore.preferences.protobuf.w
    protected final Object m(w.d dVar, Object obj, Object obj2) {
        int i10 = e.f20826a[dVar.ordinal()];
        e eVar = null;
        switch (i10) {
            case 1:
                return new f();
            case 2:
                return new a(eVar);
            case 3:
                return w.x(DEFAULT_INSTANCE, "\u0001\u0001\u0000\u0000\u0001\u0001\u0001\u0001\u0000\u0000\u00012", new Object[]{"preferences_", b.f20827a});
            case 4:
                return DEFAULT_INSTANCE;
            case 5:
                w0 w0Var = PARSER;
                if (w0Var == null) {
                    synchronized (f.class) {
                        w0Var = PARSER;
                        if (w0Var == null) {
                            w0Var = new w.b(DEFAULT_INSTANCE);
                            PARSER = w0Var;
                        }
                    }
                }
                return w0Var;
            case 6:
                return (byte) 1;
            case 7:
                return null;
            default:
                throw new UnsupportedOperationException();
        }
    }
}
