package com.google.android.gms.internal.ads;

import android.os.RemoteException;
import java.util.Objects;

/* JADX INFO: loaded from: classes2.dex */
public final class tk implements com.google.android.gms.common.internal.c, kc0, uq1 {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final /* synthetic */ int f16923a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ Object f16924b;

    public /* synthetic */ tk(Object obj, int i10) {
        this.f16923a = i10;
        this.f16924b = obj;
    }

    @Override // com.google.android.gms.common.internal.c
    public void onConnectionFailed(e8.b bVar) {
        switch (this.f16923a) {
            case 0:
                uk ukVar = (uk) this.f16924b;
                synchronized (ukVar.f17291c) {
                    try {
                        ukVar.g(null);
                        if (ukVar.e() != null) {
                            ukVar.f();
                        }
                        ukVar.f17291c.notifyAll();
                    } catch (Throwable th) {
                        throw th;
                    }
                    break;
                }
                return;
            default:
                ((e30) this.f16924b).a(new RuntimeException("Connection failed."));
                return;
        }
    }

    @Override // com.google.android.gms.internal.ads.uq1
    public /* synthetic */ Object zza() {
        int i10 = this.f16923a;
        Object obj = this.f16924b;
        switch (i10) {
            case 0:
                return (j) obj;
            case 1:
                return (fi2) obj;
            default:
                return (m50) obj;
        }
    }

    public /* synthetic */ tk(uk ukVar) {
        this.f16923a = 0;
        Objects.requireNonNull(ukVar);
        this.f16924b = ukVar;
    }

    @Override // com.google.android.gms.internal.ads.kc0, com.google.android.gms.internal.ads.uq1
    public n7.p2 zza() throws zzfjr {
        int i10 = this.f16923a;
        Object obj = this.f16924b;
        switch (i10) {
            case 0:
                return ((x50) obj).zzh();
            case 1:
                qb1 qb1Var = (qb1) obj;
                qb1Var.getClass();
                try {
                    return qb1Var.f15686a.zzB();
                } finally {
                    zzfjr zzfjrVar = new zzfjr(e);
                }
            default:
                try {
                    return ((ex) ((yw0) obj).f18990b).zzh();
                } catch (RemoteException e10) {
                    throw new zzfjr(e10);
                }
        }
    }

    public /* synthetic */ tk(yt ytVar, e30 e30Var) {
        this.f16923a = 1;
        this.f16924b = e30Var;
        Objects.requireNonNull(ytVar);
    }
}
