AutoTagger v3.4.1版本的 MD5 值为:a384f1d3927c61eef47ac4a8b3d71389
以下内容为反编译后的 qhDAZ0No1w3X4Nw6ue.java 源代码,内容仅作参考
package fcku;
import android.content.Context;
import android.content.pm.PackageManager;
import android.text.TextUtils;
import android.util.JsonReader;
import android.util.Log;
import com.google.firebase.installations.FirebaseInstallationsException;
import com.yandex.metrica.YandexMetricaDefaultValues;
import fcku.RoGQRNASqwBX;
import fcku.ZXVRC12YsK;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.nio.charset.Charset;
import java.util.concurrent.ExecutionException;
import java.util.regex.Pattern;
import java.util.zip.GZIPOutputStream;
import org.jaudiotagger.tag.id3.framebody.FrameBodyCOMM;
import org.jaudiotagger.tag.mp4.atom.Mp4NameBox;
import org.json.JSONException;
public class qhDAZ0No1w3X4Nw6ue {
public static final Pattern IQgUonnCRDBu0LH = Pattern.compile("[0-9]+s");
public static final Charset jKhqHBqbRsXQ7c1 = Charset.forName("UTF-8");
public final ahBjpkyHBvPXOGN<xhrWNRTZbT58dwYuvbt> A8oxFMwUNLNF;
public final KMbLYWYdqygkOwPH CgNSGVIfezzyuR = new KMbLYWYdqygkOwPH();
public final Context a1OLiUMlyR0knNZCYyD;
public qhDAZ0No1w3X4Nw6ue(Context context, ahBjpkyHBvPXOGN<xhrWNRTZbT58dwYuvbt> ahbjpkyhbvpxogn) {
this.a1OLiUMlyR0knNZCYyD = context;
this.A8oxFMwUNLNF = ahbjpkyhbvpxogn;
}
public static void A8oxFMwUNLNF(HttpURLConnection httpURLConnection, String str, String str2, String str3) {
InputStream errorStream = httpURLConnection.getErrorStream();
String str4 = null;
if (errorStream != null) {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(errorStream, jKhqHBqbRsXQ7c1));
try {
StringBuilder sb = new StringBuilder();
while (true) {
String readLine = bufferedReader.readLine();
if (readLine == null) {
break;
}
sb.append(readLine);
sb.append('\n');
}
str4 = String.format("Error when communicating with the Firebase Installations server API. HTTP response: [%d %s: %s]", Integer.valueOf(httpURLConnection.getResponseCode()), httpURLConnection.getResponseMessage(), sb);
} catch (IOException unused) {
} catch (Throwable th) {
try {
bufferedReader.close();
} catch (IOException unused2) {
}
throw th;
}
try {
bufferedReader.close();
} catch (IOException unused3) {
}
}
if (TextUtils.isEmpty(str4)) {
return;
}
Log.w("Firebase-Installations", str4);
Object[] objArr = new Object[3];
objArr[0] = str2;
objArr[1] = str3;
objArr[2] = TextUtils.isEmpty(str) ? FrameBodyCOMM.DEFAULT : D2jNaA692gdeNd23NnI.uk37ZXPHgT2GevstUL(", ", str);
Log.w("Firebase-Installations", String.format("Firebase options used while communicating with Firebase server APIs: %s, %s%s", objArr));
}
public static long IQgUonnCRDBu0LH(String str) {
VdhyXdX5nCQt.Fld2Qlc0itlPMuI0z(IQgUonnCRDBu0LH.matcher(str).matches(), "Invalid Expiration Timestamp.");
if (str == null || str.length() == 0) {
return 0L;
}
return Long.parseLong(str.substring(0, str.length() - 1));
}
public static void sN05x3HSOqocsuPp(URLConnection uRLConnection, byte[] bArr) {
OutputStream outputStream = uRLConnection.getOutputStream();
if (outputStream != null) {
GZIPOutputStream gZIPOutputStream = new GZIPOutputStream(outputStream);
try {
gZIPOutputStream.write(bArr);
try {
return;
} catch (IOException unused) {
return;
}
} finally {
try {
gZIPOutputStream.close();
outputStream.close();
} catch (IOException unused2) {
}
}
}
throw new IOException("Cannot send request to FIS servers. No OutputStream available.");
}
public final HttpURLConnection CgNSGVIfezzyuR(URL url, String str) {
try {
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();
httpURLConnection.setConnectTimeout(YandexMetricaDefaultValues.DEFAULT_MAX_REPORTS_COUNT_UPPER_BOUND);
httpURLConnection.setUseCaches(false);
httpURLConnection.setReadTimeout(YandexMetricaDefaultValues.DEFAULT_MAX_REPORTS_COUNT_UPPER_BOUND);
httpURLConnection.addRequestProperty("Content-Type", "application/json");
httpURLConnection.addRequestProperty("Accept", "application/json");
httpURLConnection.addRequestProperty("Content-Encoding", "gzip");
httpURLConnection.addRequestProperty("Cache-Control", "no-cache");
httpURLConnection.addRequestProperty("X-Android-Package", this.a1OLiUMlyR0knNZCYyD.getPackageName());
xhrWNRTZbT58dwYuvbt xhrwnrtzbt58dwyuvbt = this.A8oxFMwUNLNF.get();
if (xhrwnrtzbt58dwyuvbt != null) {
try {
httpURLConnection.addRequestProperty("x-firebase-client", (String) MEYmq60sSMK.a1OLiUMlyR0knNZCYyD(xhrwnrtzbt58dwyuvbt.a1OLiUMlyR0knNZCYyD()));
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
Log.w("ContentValues", "Failed to get heartbeats header", e);
} catch (ExecutionException e2) {
Log.w("ContentValues", "Failed to get heartbeats header", e2);
}
}
String str2 = null;
try {
Context context = this.a1OLiUMlyR0knNZCYyD;
byte[] a1OLiUMlyR0knNZCYyD = wzwjaAfIdpYRB3.a1OLiUMlyR0knNZCYyD(context, context.getPackageName());
if (a1OLiUMlyR0knNZCYyD == null) {
Log.e("ContentValues", "Could not get fingerprint hash for package: " + this.a1OLiUMlyR0knNZCYyD.getPackageName());
} else {
str2 = yHRcqIB7YXjP.uk37ZXPHgT2GevstUL(a1OLiUMlyR0knNZCYyD, false);
}
} catch (PackageManager.NameNotFoundException e3) {
StringBuilder uk37ZXPHgT2GevstUL = UynOIsBSG6B.uk37ZXPHgT2GevstUL("No such package: ");
uk37ZXPHgT2GevstUL.append(this.a1OLiUMlyR0knNZCYyD.getPackageName());
Log.e("ContentValues", uk37ZXPHgT2GevstUL.toString(), e3);
}
httpURLConnection.addRequestProperty("X-Android-Cert", str2);
httpURLConnection.addRequestProperty("x-goog-api-key", str);
return httpURLConnection;
} catch (IOException unused) {
throw new FirebaseInstallationsException("Firebase Installations Service is unavailable. Please try again later.", 2);
}
}
public final void Fld2Qlc0itlPMuI0z(HttpURLConnection httpURLConnection) {
try {
jetQp9Lncho jetqp9lncho = new jetQp9Lncho();
jetqp9lncho.put("sdkVersion", "a:17.0.1");
jetQp9Lncho jetqp9lncho2 = new jetQp9Lncho();
jetqp9lncho2.put("installation", jetqp9lncho);
sN05x3HSOqocsuPp(httpURLConnection, jetqp9lncho2.toString().getBytes("UTF-8"));
} catch (JSONException e) {
throw new IllegalStateException(e);
}
}
public final void L0IXHLmtTvx1(HttpURLConnection httpURLConnection, String str, String str2) {
try {
jetQp9Lncho jetqp9lncho = new jetQp9Lncho();
jetqp9lncho.put("fid", str);
jetqp9lncho.put("appId", str2);
jetqp9lncho.put("authVersion", "FIS_v2");
jetqp9lncho.put("sdkVersion", "a:17.0.1");
sN05x3HSOqocsuPp(httpURLConnection, jetqp9lncho.toString().getBytes("UTF-8"));
} catch (JSONException e) {
throw new IllegalStateException(e);
}
}
public final URL a1OLiUMlyR0knNZCYyD(String str) {
try {
return new URL(String.format("https://%s/%s/%s", "firebaseinstallations.googleapis.com", "v1", str));
} catch (MalformedURLException e) {
throw new FirebaseInstallationsException(e.getMessage(), 2);
}
}
public final rmjMyhA2Ci9IojQs24 jKhqHBqbRsXQ7c1(HttpURLConnection httpURLConnection) {
InputStream inputStream = httpURLConnection.getInputStream();
JsonReader jsonReader = new JsonReader(new InputStreamReader(inputStream, jKhqHBqbRsXQ7c1));
ZXVRC12YsK.iz4YueIqNR a1OLiUMlyR0knNZCYyD = ZXVRC12YsK.a1OLiUMlyR0knNZCYyD();
jsonReader.beginObject();
String str = null;
String str2 = null;
String str3 = null;
ZXVRC12YsK zXVRC12YsK = null;
while (jsonReader.hasNext()) {
String nextName = jsonReader.nextName();
if (nextName.equals(Mp4NameBox.IDENTIFIER)) {
str = jsonReader.nextString();
} else if (nextName.equals("fid")) {
str2 = jsonReader.nextString();
} else if (nextName.equals("refreshToken")) {
str3 = jsonReader.nextString();
} else if (nextName.equals("authToken")) {
jsonReader.beginObject();
while (jsonReader.hasNext()) {
String nextName2 = jsonReader.nextName();
if (nextName2.equals("token")) {
((RoGQRNASqwBX.uCGyeTchtPtR) a1OLiUMlyR0knNZCYyD).a1OLiUMlyR0knNZCYyD = jsonReader.nextString();
} else if (nextName2.equals("expiresIn")) {
a1OLiUMlyR0knNZCYyD.A8oxFMwUNLNF(IQgUonnCRDBu0LH(jsonReader.nextString()));
} else {
jsonReader.skipValue();
}
}
zXVRC12YsK = a1OLiUMlyR0knNZCYyD.a1OLiUMlyR0knNZCYyD();
jsonReader.endObject();
} else {
jsonReader.skipValue();
}
}
jsonReader.endObject();
jsonReader.close();
inputStream.close();
return new uyIbmSUvTqkwdY(str, str2, str3, zXVRC12YsK, 1, null);
}
public final ZXVRC12YsK rMdnDFHejPH(HttpURLConnection httpURLConnection) {
InputStream inputStream = httpURLConnection.getInputStream();
JsonReader jsonReader = new JsonReader(new InputStreamReader(inputStream, jKhqHBqbRsXQ7c1));
ZXVRC12YsK.iz4YueIqNR a1OLiUMlyR0knNZCYyD = ZXVRC12YsK.a1OLiUMlyR0knNZCYyD();
jsonReader.beginObject();
while (jsonReader.hasNext()) {
String nextName = jsonReader.nextName();
if (nextName.equals("token")) {
((RoGQRNASqwBX.uCGyeTchtPtR) a1OLiUMlyR0knNZCYyD).a1OLiUMlyR0knNZCYyD = jsonReader.nextString();
} else if (nextName.equals("expiresIn")) {
a1OLiUMlyR0knNZCYyD.A8oxFMwUNLNF(IQgUonnCRDBu0LH(jsonReader.nextString()));
} else {
jsonReader.skipValue();
}
}
jsonReader.endObject();
jsonReader.close();
inputStream.close();
RoGQRNASqwBX.uCGyeTchtPtR ucgyetchtptr = (RoGQRNASqwBX.uCGyeTchtPtR) a1OLiUMlyR0knNZCYyD;
ucgyetchtptr.CgNSGVIfezzyuR = 1;
return ucgyetchtptr.a1OLiUMlyR0knNZCYyD();
}
}