Banesco VE v1.23.11版本的 MD5 值为:a4aa3f1f54e4fbb4921e2e1235e636aa
以下内容为反编译后的 c.java 源代码,内容仅作参考
package r6;
import android.net.TrafficStats;
import android.text.TextUtils;
import android.util.Log;
import androidx.appcompat.widget.n4;
import g6.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.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern;
import org.json.JSONException;
import org.json.JSONObject;
import x4.n;
public final class c implements d {
public static final Object f9856m = new Object();
public final z5.g f9857a;
public final t6.c f9858b;
public final z2.a f9859c;
public final j f9860d;
public final o f9861e;
public final h f9862f;
public final Object f9863g;
public final ExecutorService f9864h;
public final Executor f9865i;
public String f9866j;
public final HashSet f9867k;
public final ArrayList f9868l;
static {
new AtomicInteger(1);
}
public c(z5.g gVar, q6.a aVar, ExecutorService executorService, h6.j jVar) {
gVar.a();
t6.c cVar = new t6.c(gVar.f13001a, aVar);
z2.a aVar2 = new z2.a(gVar, 29);
j a8 = j.a();
o oVar = new o(new g6.d(2, gVar));
h hVar = new h();
this.f9863g = new Object();
this.f9867k = new HashSet();
this.f9868l = new ArrayList();
this.f9857a = gVar;
this.f9858b = cVar;
this.f9859c = aVar2;
this.f9860d = a8;
this.f9861e = oVar;
this.f9862f = hVar;
this.f9864h = executorService;
this.f9865i = jVar;
}
public final void a(i iVar) {
synchronized (this.f9863g) {
this.f9868l.add(iVar);
}
}
public final void b(boolean z6) {
s6.a m8;
boolean z10;
synchronized (f9856m) {
z5.g gVar = this.f9857a;
gVar.a();
z2.a c10 = z2.a.c(gVar.f13001a);
m8 = this.f9859c.m();
s6.c cVar = s6.c.NOT_GENERATED;
s6.c cVar2 = m8.f10212b;
if (cVar2 != cVar && cVar2 != s6.c.ATTEMPT_MIGRATION) {
z10 = false;
if (z10) {
String h10 = h(m8);
z2.a aVar = this.f9859c;
n4 n4Var = new n4(m8);
n4Var.f954a = h10;
n4Var.h(s6.c.UNREGISTERED);
m8 = n4Var.f();
aVar.k(m8);
}
if (c10 != null) {
c10.n();
}
}
z10 = true;
if (z10) {
}
if (c10 != null) {
}
}
if (z6) {
n4 n4Var2 = new n4(m8);
n4Var2.f956c = null;
m8 = n4Var2.f();
}
k(m8);
this.f9865i.execute(new b(this, z6, 0));
}
public final s6.a c(s6.a aVar) {
int responseCode;
boolean z6;
t6.b f10;
z5.g gVar = this.f9857a;
gVar.a();
String str = gVar.f13003c.f13010a;
gVar.a();
String str2 = gVar.f13003c.f13016g;
String str3 = aVar.f10214d;
t6.c cVar = this.f9858b;
t6.e eVar = cVar.f11127c;
if (eVar.b()) {
URL a8 = t6.c.a(String.format("projects/%s/installations/%s/authTokens:generate", str2, aVar.f10211a));
for (int i10 = 0; i10 <= 1; i10++) {
TrafficStats.setThreadStatsTag(32771);
HttpURLConnection c10 = cVar.c(a8, str);
try {
c10.setRequestMethod("POST");
c10.addRequestProperty("Authorization", "FIS_v2 " + str3);
c10.setDoOutput(true);
t6.c.h(c10);
responseCode = c10.getResponseCode();
eVar.d(responseCode);
if (responseCode >= 200 && responseCode < 300) {
z6 = true;
} else {
z6 = false;
}
} catch (IOException | AssertionError unused) {
} catch (Throwable th) {
c10.disconnect();
TrafficStats.clearThreadStatsTag();
throw th;
}
if (z6) {
f10 = t6.c.f(c10);
} else {
t6.c.b(c10, null, str, str2);
if (responseCode != 401 && responseCode != 404) {
if (responseCode != 429) {
if (responseCode < 500 || responseCode >= 600) {
Log.e("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.");
d.c a10 = t6.b.a();
a10.f4015n = t6.f.BAD_CONFIG;
f10 = a10.l();
} else {
c10.disconnect();
TrafficStats.clearThreadStatsTag();
}
} else {
throw new e("Firebase servers have received too many requests from this client in a short period of time. Please try again later.");
}
}
d.c a11 = t6.b.a();
a11.f4015n = t6.f.AUTH_ERROR;
f10 = a11.l();
}
c10.disconnect();
TrafficStats.clearThreadStatsTag();
int ordinal = f10.f11122c.ordinal();
if (ordinal != 0) {
if (ordinal != 1) {
if (ordinal == 2) {
l(null);
n4 n4Var = new n4(aVar);
n4Var.h(s6.c.NOT_GENERATED);
return n4Var.f();
}
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
n4 n4Var2 = new n4(aVar);
n4Var2.f960g = "BAD CONFIG";
n4Var2.h(s6.c.REGISTER_ERROR);
return n4Var2.f();
}
j jVar = this.f9860d;
jVar.getClass();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
jVar.f9877a.getClass();
long seconds = timeUnit.toSeconds(System.currentTimeMillis());
n4 n4Var3 = new n4(aVar);
n4Var3.f956c = f10.f11120a;
n4Var3.f958e = Long.valueOf(f10.f11121b);
n4Var3.f959f = Long.valueOf(seconds);
return n4Var3.f();
}
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
public final n d() {
String str;
g();
synchronized (this) {
str = this.f9866j;
}
if (str != null) {
return com.bumptech.glide.e.T(str);
}
x4.i iVar = new x4.i();
a(new g(iVar));
n nVar = iVar.f12459a;
this.f9864h.execute(new androidx.activity.b(9, this));
return nVar;
}
public final n e() {
g();
x4.i iVar = new x4.i();
a(new f(this.f9860d, iVar));
this.f9864h.execute(new b(this, false, 1));
return iVar.f12459a;
}
public final void f(s6.a aVar) {
synchronized (f9856m) {
z5.g gVar = this.f9857a;
gVar.a();
z2.a c10 = z2.a.c(gVar.f13001a);
this.f9859c.k(aVar);
if (c10 != null) {
c10.n();
}
}
}
public final void g() {
z5.g gVar = this.f9857a;
gVar.a();
com.bumptech.glide.e.l("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.", gVar.f13003c.f13011b);
gVar.a();
com.bumptech.glide.e.l("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.", gVar.f13003c.f13016g);
gVar.a();
com.bumptech.glide.e.l("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.", gVar.f13003c.f13010a);
gVar.a();
String str = gVar.f13003c.f13011b;
Pattern pattern = j.f9875c;
com.bumptech.glide.e.f("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(":"));
gVar.a();
com.bumptech.glide.e.f("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.", j.f9875c.matcher(gVar.f13003c.f13010a).matches());
}
public final String h(s6.a aVar) {
boolean z6;
String a8;
z5.g gVar = this.f9857a;
gVar.a();
if (!gVar.f13002b.equals("CHIME_ANDROID_SDK")) {
z5.g gVar2 = this.f9857a;
gVar2.a();
}
if (aVar.f10212b == s6.c.ATTEMPT_MIGRATION) {
z6 = true;
} else {
z6 = false;
}
if (z6) {
s6.b bVar = (s6.b) this.f9861e.get();
synchronized (bVar.f10219a) {
a8 = bVar.a();
if (a8 == null) {
a8 = bVar.b();
}
}
if (TextUtils.isEmpty(a8)) {
this.f9862f.getClass();
return h.a();
}
return a8;
}
this.f9862f.getClass();
return h.a();
}
public final s6.a i(s6.a aVar) {
int responseCode;
boolean z6;
t6.a e10;
String str = aVar.f10211a;
String str2 = null;
if (str != null && str.length() == 11) {
s6.b bVar = (s6.b) this.f9861e.get();
synchronized (bVar.f10219a) {
String[] strArr = s6.b.f10218c;
int i10 = 0;
while (true) {
if (i10 >= 4) {
break;
}
String str3 = strArr[i10];
String string = bVar.f10219a.getString("|T|" + bVar.f10220b + "|" + str3, null);
if (string != null && !string.isEmpty()) {
if (string.startsWith("{")) {
try {
str2 = new JSONObject(string).getString("token");
} catch (JSONException unused) {
}
} else {
str2 = string;
}
} else {
i10++;
}
}
}
}
t6.c cVar = this.f9858b;
z5.g gVar = this.f9857a;
gVar.a();
String str4 = gVar.f13003c.f13010a;
String str5 = aVar.f10211a;
z5.g gVar2 = this.f9857a;
gVar2.a();
String str6 = gVar2.f13003c.f13016g;
z5.g gVar3 = this.f9857a;
gVar3.a();
String str7 = gVar3.f13003c.f13011b;
t6.e eVar = cVar.f11127c;
if (eVar.b()) {
URL a8 = t6.c.a(String.format("projects/%s/installations", str6));
for (int i11 = 0; i11 <= 1; i11++) {
TrafficStats.setThreadStatsTag(32769);
HttpURLConnection c10 = cVar.c(a8, str4);
try {
c10.setRequestMethod("POST");
c10.setDoOutput(true);
if (str2 != null) {
c10.addRequestProperty("x-goog-fis-android-iid-migration-auth", str2);
}
t6.c.g(c10, str5, str7);
responseCode = c10.getResponseCode();
eVar.d(responseCode);
if (responseCode >= 200 && responseCode < 300) {
z6 = true;
} else {
z6 = false;
}
} catch (IOException | AssertionError unused2) {
} catch (Throwable th) {
c10.disconnect();
TrafficStats.clearThreadStatsTag();
throw th;
}
if (z6) {
e10 = t6.c.e(c10);
} else {
t6.c.b(c10, str7, str4, str6);
if (responseCode != 429) {
if (responseCode < 500 || responseCode >= 600) {
Log.e("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.");
e10 = new t6.a(null, null, null, null, t6.d.BAD_CONFIG);
} else {
c10.disconnect();
TrafficStats.clearThreadStatsTag();
}
} else {
throw new e("Firebase servers have received too many requests from this client in a short period of time. Please try again later.");
}
}
c10.disconnect();
TrafficStats.clearThreadStatsTag();
int ordinal = e10.f11119e.ordinal();
if (ordinal != 0) {
if (ordinal == 1) {
n4 n4Var = new n4(aVar);
n4Var.f960g = "BAD CONFIG";
n4Var.h(s6.c.REGISTER_ERROR);
return n4Var.f();
}
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
String str8 = e10.f11116b;
String str9 = e10.f11117c;
j jVar = this.f9860d;
jVar.getClass();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
jVar.f9877a.getClass();
long seconds = timeUnit.toSeconds(System.currentTimeMillis());
t6.b bVar2 = e10.f11118d;
String str10 = bVar2.f11120a;
long j10 = bVar2.f11121b;
n4 n4Var2 = new n4(aVar);
n4Var2.f954a = str8;
n4Var2.h(s6.c.REGISTERED);
n4Var2.f956c = str10;
n4Var2.f957d = str9;
n4Var2.f958e = Long.valueOf(j10);
n4Var2.f959f = Long.valueOf(seconds);
return n4Var2.f();
}
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
public final void j(Exception exc) {
synchronized (this.f9863g) {
Iterator it = this.f9868l.iterator();
while (it.hasNext()) {
if (((i) it.next()).b(exc)) {
it.remove();
}
}
}
}
public final void k(s6.a aVar) {
synchronized (this.f9863g) {
Iterator it = this.f9868l.iterator();
while (it.hasNext()) {
if (((i) it.next()).a(aVar)) {
it.remove();
}
}
}
}
public final synchronized void l(String str) {
this.f9866j = str;
}
public final synchronized void m(s6.a aVar, s6.a aVar2) {
if (this.f9867k.size() != 0 && !TextUtils.equals(aVar.f10211a, aVar2.f10211a)) {
Iterator it = this.f9867k.iterator();
if (it.hasNext()) {
androidx.activity.f.w(it.next());
throw null;
}
}
}
}