正在查看: Baubap v3.9.7 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Baubap v3.9.7 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package dz;
import android.net.TrafficStats;
import android.text.TextUtils;
import androidx.appcompat.widget.j4;
import c0.n;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.android.gms.tasks.Tasks;
import d0.l;
import f0.q;
import fy.o;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
import org.json.JSONException;
import org.json.JSONObject;
public final class d implements e {
public static final Object m = new Object();
public final tx.h a;
public final fz.c b;
public final ea.e c;
public final k d;
public final o e;
public final i f;
public final Object g;
public final ExecutorService h;
public final Executor i;
public String j;
public final HashSet k;
public final ArrayList l;
static {
new n(1);
}
public d(tx.h hVar, cz.c cVar, ExecutorService executorService, gy.k kVar) {
hVar.a();
fz.c cVar2 = new fz.c(hVar.a, cVar);
ea.e eVar = new ea.e(hVar);
if (lj.a.b == null) {
lj.a.b = new lj.a();
}
lj.a aVar = lj.a.b;
if (k.d == null) {
k.d = new k(aVar);
}
k kVar2 = k.d;
o oVar = new o(new fy.c(hVar, 2));
i iVar = new i();
this.g = new Object();
this.k = new HashSet();
this.l = new ArrayList();
this.a = hVar;
this.b = cVar2;
this.c = eVar;
this.d = kVar2;
this.e = oVar;
this.f = iVar;
this.h = executorService;
this.i = kVar;
}
public final void a(j jVar) {
synchronized (this.g) {
this.l.add(jVar);
}
}
public final void b(boolean z) {
ez.a u;
synchronized (m) {
try {
tx.h hVar = this.a;
hVar.a();
ea.c p = ea.c.p(hVar.a);
try {
u = this.c.u();
ez.c cVar = ez.c.c;
ez.c cVar2 = u.b;
if (cVar2 == cVar || cVar2 == ez.c.b) {
String h = h(u);
ea.e eVar = this.c;
j4 a = u.a();
a.a = h;
a.m(ez.c.d);
u = a.g();
eVar.p(u);
}
if (p != null) {
p.D();
}
} catch (Throwable th) {
if (p != null) {
p.D();
}
throw th;
}
} catch (Throwable th2) {
throw th2;
}
}
if (z) {
j4 a2 = u.a();
a2.c = null;
u = a2.g();
}
k(u);
this.i.execute(new c(this, z, 1));
}
public final ez.a c(ez.a aVar) {
int responseCode;
fz.b f;
tx.h hVar = this.a;
hVar.a();
String str = hVar.c.a;
hVar.a();
String str2 = hVar.c.g;
String str3 = aVar.d;
fz.c cVar = this.b;
fz.e eVar = cVar.c;
if (!eVar.b()) {
throw new f("Firebase Installations Service is unavailable. Please try again later.");
}
URL a = fz.c.a(String.format("projects/%s/installations/%s/authTokens:generate", str2, aVar.a));
for (int i = 0; i <= 1; i++) {
TrafficStats.setThreadStatsTag(32771);
HttpURLConnection c = cVar.c(a, str);
try {
try {
c.setRequestMethod("POST");
c.addRequestProperty("Authorization", "FIS_v2 " + str3);
c.setDoOutput(true);
fz.c.h(c);
responseCode = c.getResponseCode();
eVar.d(responseCode);
} catch (IOException | AssertionError unused) {
}
if (responseCode >= 200 && responseCode < 300) {
f = fz.c.f(c);
} else {
fz.c.b(c, null, str, str2);
if (responseCode == 401 || responseCode == 404) {
yy.h a2 = fz.b.a();
a2.e = fz.f.d;
f = a2.b();
} else {
if (responseCode == 429) {
throw new f("Firebase servers have received too many requests from this client in a short period of time. Please try again later.");
}
if (responseCode < 500 || responseCode >= 600) {
io.sentry.android.core.c.c("Firebase-Installations", "Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase.");
yy.h a3 = fz.b.a();
a3.e = fz.f.c;
f = a3.b();
}
c.disconnect();
TrafficStats.clearThreadStatsTag();
}
}
c.disconnect();
TrafficStats.clearThreadStatsTag();
int ordinal = f.c.ordinal();
if (ordinal == 0) {
k kVar = this.d;
kVar.getClass();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
kVar.a.getClass();
long seconds = timeUnit.toSeconds(System.currentTimeMillis());
j4 a4 = aVar.a();
a4.c = f.a;
a4.e = Long.valueOf(f.b);
a4.f = Long.valueOf(seconds);
return a4.g();
}
if (ordinal == 1) {
j4 a5 = aVar.a();
a5.g = "BAD CONFIG";
a5.m(ez.c.f);
return a5.g();
}
if (ordinal != 2) {
throw new f("Firebase Installations Service is unavailable. Please try again later.");
}
l(null);
j4 a6 = aVar.a();
a6.m(ez.c.c);
return a6.g();
} catch (Throwable th) {
c.disconnect();
TrafficStats.clearThreadStatsTag();
throw th;
}
}
throw new f("Firebase Installations Service is unavailable. Please try again later.");
}
public final Task d() {
String str;
g();
synchronized (this) {
str = this.j;
}
if (str != null) {
return Tasks.forResult(str);
}
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
a(new h(taskCompletionSource));
Task task = taskCompletionSource.getTask();
this.h.execute(new gx.a(this, 3));
return task;
}
public final Task e() {
g();
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
a(new g(this.d, taskCompletionSource));
Task task = taskCompletionSource.getTask();
this.h.execute(new c(this, false, 0 == true ? 1 : 0));
return task;
}
public final void f(ez.a aVar) {
synchronized (m) {
try {
tx.h hVar = this.a;
hVar.a();
ea.c p = ea.c.p(hVar.a);
try {
this.c.p(aVar);
if (p != null) {
p.D();
}
} catch (Throwable th) {
if (p != null) {
p.D();
}
throw th;
}
} catch (Throwable th2) {
throw th2;
}
}
}
public final void g() {
tx.h hVar = this.a;
hVar.a();
q.C("Please set your Application ID. A valid Firebase App ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.", hVar.c.b);
hVar.a();
q.C("Please set your Project ID. A valid Firebase Project ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.", hVar.c.g);
hVar.a();
q.C("Please set a valid API key. A Firebase API key is required to communicate with Firebase server APIs: It authenticates your project with Google.Please refer to https://firebase.google.com/support/privacy/init-options.", hVar.c.a);
hVar.a();
String str = hVar.c.b;
Pattern pattern = k.c;
q.v("Please set your Application ID. A valid Firebase App ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.", str.contains(":"));
hVar.a();
q.v("Please set a valid API key. A Firebase API key is required to communicate with Firebase server APIs: It authenticates your project with Google.Please refer to https://firebase.google.com/support/privacy/init-options.", k.c.matcher(hVar.c.a).matches());
}
public final java.lang.String h(ez.a r3) {
throw new UnsupportedOperationException("Method not decompiled: dz.d.h(ez.a):java.lang.String");
}
public final ez.a i(ez.a aVar) {
int responseCode;
fz.a aVar2;
String str = aVar.a;
int i = 0;
String str2 = null;
if (str != null && str.length() == 11) {
ez.b bVar = (ez.b) this.e.get();
synchronized (bVar.a) {
try {
String[] strArr = ez.b.c;
int i2 = 0;
while (true) {
if (i2 < 4) {
String str3 = strArr[i2];
String string = bVar.a.getString("|T|" + bVar.b + "|" + str3, null);
if (string == null || string.isEmpty()) {
i2++;
} else if (string.startsWith("{")) {
try {
str2 = new JSONObject(string).getString("token");
} catch (JSONException unused) {
}
} else {
str2 = string;
}
}
}
} finally {
}
}
}
fz.c cVar = this.b;
tx.h hVar = this.a;
hVar.a();
String str4 = hVar.c.a;
String str5 = aVar.a;
tx.h hVar2 = this.a;
hVar2.a();
String str6 = hVar2.c.g;
tx.h hVar3 = this.a;
hVar3.a();
String str7 = hVar3.c.b;
fz.e eVar = cVar.c;
if (!eVar.b()) {
throw new f("Firebase Installations Service is unavailable. Please try again later.");
}
?? r10 = 1;
URL a = fz.c.a(String.format("projects/%s/installations", str6));
while (i <= r10) {
TrafficStats.setThreadStatsTag(32769);
HttpURLConnection c = cVar.c(a, str4);
try {
try {
c.setRequestMethod("POST");
c.setDoOutput(r10);
if (str2 != null) {
c.addRequestProperty("x-goog-fis-android-iid-migration-auth", str2);
}
fz.c.g(c, str5, str7);
responseCode = c.getResponseCode();
eVar.d(responseCode);
} catch (IOException | AssertionError unused2) {
}
if (responseCode < 200 || responseCode >= 300) {
fz.c.b(c, str7, str4, str6);
if (responseCode == 429) {
throw new f("Firebase servers have received too many requests from this client in a short period of time. Please try again later.");
}
if (responseCode < 500 || responseCode >= 600) {
io.sentry.android.core.c.c("Firebase-Installations", "Firebase Installations can not communicate with Firebase server APIs due to invalid configuration. Please update your Firebase initialization process and set valid Firebase options (API key, Project ID, Application ID) when initializing Firebase.");
l lVar = new l(15);
fz.d dVar = fz.d.c;
lVar.e = dVar;
try {
fz.a aVar3 = new fz.a((String) lVar.a, (String) lVar.b, (String) lVar.c, (fz.b) lVar.d, dVar);
c.disconnect();
TrafficStats.clearThreadStatsTag();
aVar2 = aVar3;
} catch (IOException | AssertionError unused3) {
r10 = 1;
}
}
c.disconnect();
TrafficStats.clearThreadStatsTag();
i++;
r10 = r10;
} else {
aVar2 = fz.c.e(c);
c.disconnect();
TrafficStats.clearThreadStatsTag();
}
int ordinal = aVar2.e.ordinal();
if (ordinal != 0) {
if (ordinal != 1) {
throw new f("Firebase Installations Service is unavailable. Please try again later.");
}
j4 a2 = aVar.a();
a2.g = "BAD CONFIG";
a2.m(ez.c.f);
return a2.g();
}
String str8 = aVar2.b;
String str9 = aVar2.c;
k kVar = this.d;
kVar.getClass();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
kVar.a.getClass();
long seconds = timeUnit.toSeconds(System.currentTimeMillis());
fz.b bVar2 = aVar2.d;
String str10 = bVar2.a;
long j = bVar2.b;
j4 a3 = aVar.a();
a3.a = str8;
a3.m(ez.c.e);
a3.c = str10;
a3.d = str9;
a3.e = Long.valueOf(j);
a3.f = Long.valueOf(seconds);
return a3.g();
} finally {
c.disconnect();
TrafficStats.clearThreadStatsTag();
}
}
throw new f("Firebase Installations Service is unavailable. Please try again later.");
}
public final void j(Exception exc) {
synchronized (this.g) {
try {
Iterator it = this.l.iterator();
while (it.hasNext()) {
if (((j) it.next()).a(exc)) {
it.remove();
}
}
} catch (Throwable th) {
throw th;
}
}
}
public final void k(ez.a aVar) {
synchronized (this.g) {
try {
Iterator it = this.l.iterator();
while (it.hasNext()) {
if (((j) it.next()).b(aVar)) {
it.remove();
}
}
} catch (Throwable th) {
throw th;
}
}
}
public final synchronized void l(String str) {
this.j = str;
}
public final synchronized void m(ez.a aVar, ez.a aVar2) {
if (this.k.size() != 0 && !TextUtils.equals(aVar.a, aVar2.a)) {
Iterator it = this.k.iterator();
if (it.hasNext()) {
a0.a.z(it.next());
throw null;
}
}
}
}