what-the-bank/sources/com/google/android/gms/internal/firebase_ml/zzga.java

61 lines
2.1 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.firebase_ml;
import io.grpc.internal.GrpcUtil;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.URL;
import java.util.Arrays;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.SSLSocketFactory;
/* loaded from: classes2.dex */
public final class zzga extends zzfo {
private static final String[] zzvf;
private final HostnameVerifier hostnameVerifier;
private final zzfv zzwd;
private final SSLSocketFactory zzwe;
public zzga() {
this(null, null, null);
}
private zzga(zzfv zzfvVar, SSLSocketFactory sSLSocketFactory, HostnameVerifier hostnameVerifier) {
zzfw zzfwVar;
if (System.getProperty("com.google.api.client.should_use_proxy") != null) {
zzfwVar = new zzfw(new Proxy(Proxy.Type.HTTP, new InetSocketAddress(System.getProperty("https.proxyHost"), Integer.parseInt(System.getProperty("https.proxyPort")))));
} else {
zzfwVar = new zzfw();
}
this.zzwd = zzfwVar;
this.zzwe = null;
this.hostnameVerifier = null;
}
@Override // com.google.android.gms.internal.firebase_ml.zzfo
public final boolean zzaj(String str) {
return Arrays.binarySearch(zzvf, str) >= 0;
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.google.android.gms.internal.firebase_ml.zzfo
public final /* synthetic */ zzfp zzc(String str, String str2) throws IOException {
Object[] objArr = {str};
if (!zzaj(str)) {
throw new IllegalArgumentException(zzla.zzb("HTTP method %s not supported", objArr));
}
HttpURLConnection zza = this.zzwd.zza(new URL(str2));
zza.setRequestMethod(str);
boolean z = zza instanceof HttpsURLConnection;
return new zzfx(zza);
}
static {
String[] strArr = {"DELETE", "GET", "HEAD", "OPTIONS", GrpcUtil.HTTP_METHOD, "PUT", "TRACE"};
zzvf = strArr;
Arrays.sort(strArr);
}
}