package R2;

import A1.y;
import M2.e;
import O2.i;
import P.g;
import P2.AbstractC0248e;
import P2.H;
import P2.n;
import P2.w;
import android.accounts.Account;
import android.content.Context;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Looper;
import com.google.android.gms.common.api.Scope;
import java.util.Collections;
import java.util.Iterator;
import java.util.Set;

/* JADX INFO: loaded from: classes.dex */
public final class d extends AbstractC0248e implements N2.a {

    /* JADX INFO: renamed from: y, reason: collision with root package name */
    public final Set f6055y;

    /* JADX INFO: renamed from: z, reason: collision with root package name */
    public final n f6056z;

    /* JADX WARN: Illegal instructions before constructor call */
    public d(Context context, Looper looper, y yVar, n nVar, i iVar, i iVar2) {
        H hA = H.a(context);
        e eVar = e.f4165d;
        w.f(iVar);
        w.f(iVar2);
        super(context, looper, hA, eVar, 270, new g(3, iVar), new g(4, iVar2), (String) yVar.f364s);
        Set set = (Set) yVar.f363r;
        Iterator it = set.iterator();
        while (it.hasNext()) {
            if (!set.contains((Scope) it.next())) {
                throw new IllegalStateException("Expanding scopes is not permitted, use implied scopes instead");
            }
        }
        this.f6055y = set;
        this.f6056z = nVar;
    }

    @Override // N2.a
    public final Set g() {
        return l() ? this.f6055y : Collections.EMPTY_SET;
    }

    @Override // P2.AbstractC0248e, N2.a
    public final int n() {
        return 203400000;
    }

    @Override // P2.AbstractC0248e
    public final IInterface p(IBinder iBinder) {
        if (iBinder == null) {
            return null;
        }
        IInterface iInterfaceQueryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.common.internal.service.IClientTelemetryService");
        return iInterfaceQueryLocalInterface instanceof a ? (a) iInterfaceQueryLocalInterface : new a(iBinder, "com.google.android.gms.common.internal.service.IClientTelemetryService");
    }

    @Override // P2.AbstractC0248e
    public final Account q() {
        return null;
    }

    @Override // P2.AbstractC0248e
    public final M2.d[] r() {
        return Y2.c.f7312b;
    }

    @Override // P2.AbstractC0248e
    public final Bundle s() {
        n nVar = this.f6056z;
        nVar.getClass();
        Bundle bundle = new Bundle();
        String str = nVar.f5426a;
        if (str != null) {
            bundle.putString("api", str);
        }
        return bundle;
    }

    @Override // P2.AbstractC0248e
    public final Set t() {
        return this.f6055y;
    }

    @Override // P2.AbstractC0248e
    public final String v() {
        return "com.google.android.gms.common.internal.service.IClientTelemetryService";
    }

    @Override // P2.AbstractC0248e
    public final String w() {
        return "com.google.android.gms.common.telemetry.service.START";
    }

    @Override // P2.AbstractC0248e
    public final boolean x() {
        return true;
    }
}
