package O2;

import O1.C0225a;
import P2.C0253j;
import android.os.DeadObjectException;
import android.os.RemoteException;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.internal.measurement.B1;
import java.util.Map;

/* JADX INFO: loaded from: classes.dex */
public final class r extends m {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final B1 f5137b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final g3.h f5138c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final C0253j f5139d;

    public r(B1 b12, g3.h hVar, C0253j c0253j) {
        super(2);
        this.f5138c = hVar;
        this.f5137b = b12;
        this.f5139d = c0253j;
        if (b12.f9558a) {
            throw new IllegalArgumentException("Best-effort write calls cannot pass methods that should auto-resolve missing features.");
        }
    }

    @Override // O2.m
    public final boolean a(i iVar) {
        return this.f5137b.f9558a;
    }

    @Override // O2.m
    public final M2.d[] b(i iVar) {
        return (M2.d[]) this.f5137b.f9559b;
    }

    @Override // O2.m
    public final void c(Status status) {
        this.f5139d.getClass();
        this.f5138c.a(status.f9552s != null ? new N2.f(status) : new D0.q(status));
    }

    @Override // O2.m
    public final void d(RuntimeException runtimeException) {
        this.f5138c.a(runtimeException);
    }

    @Override // O2.m
    public final void e(i iVar) throws DeadObjectException {
        g3.h hVar = this.f5138c;
        try {
            this.f5137b.a(iVar.f5118f, hVar);
        } catch (DeadObjectException e8) {
            throw e8;
        } catch (RemoteException e9) {
            c(m.g(e9));
        } catch (RuntimeException e10) {
            hVar.a(e10);
        }
    }

    @Override // O2.m
    public final void f(C0225a c0225a, boolean z8) {
        Boolean boolValueOf = Boolean.valueOf(z8);
        Map map = (Map) c0225a.f5011s;
        g3.h hVar = this.f5138c;
        map.put(hVar, boolValueOf);
        C0225a c0225a2 = new C0225a(c0225a, 2, hVar);
        g3.o oVar = hVar.f12923a;
        oVar.getClass();
        oVar.f12944b.j(new g3.m(g3.i.f12924a, c0225a2));
        oVar.p();
    }
}
