ZBZB Slots v1.0.0版本的 MD5 值为:81141cde9546bf134b1f45a76b103adb
以下内容为反编译后的 c.java 源代码,内容仅作参考
package y4;
import android.net.TrafficStats;
import android.text.TextUtils;
import android.util.Log;
import androidx.appcompat.widget.a0;
import androidx.appcompat.widget.f4;
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 n4.o;
import o4.k;
import org.json.JSONException;
import org.json.JSONObject;
import w5.p;
public final class c implements d {
public static final Object f5887m = new Object();
public final k4.g f5888a;
public final a5.c f5889b;
public final a0 f5890c;
public final j f5891d;
public final o f5892e;
public final h f5893f;
public final Object f5894g;
public final ExecutorService f5895h;
public final Executor f5896i;
public String f5897j;
public final HashSet f5898k;
public final ArrayList f5899l;
static {
new AtomicInteger(1);
}
public c(k4.g gVar, x4.a aVar, ExecutorService executorService, k kVar) {
gVar.a();
a5.c cVar = new a5.c(gVar.f4099a, aVar);
a0 a0Var = new a0(gVar);
j a6 = j.a();
o oVar = new o(new n4.d(2, gVar));
h hVar = new h();
this.f5894g = new Object();
this.f5898k = new HashSet();
this.f5899l = new ArrayList();
this.f5888a = gVar;
this.f5889b = cVar;
this.f5890c = a0Var;
this.f5891d = a6;
this.f5892e = oVar;
this.f5893f = hVar;
this.f5895h = executorService;
this.f5896i = kVar;
}
public final void a(boolean z6) {
z4.a n6;
boolean z7;
synchronized (f5887m) {
k4.g gVar = this.f5888a;
gVar.a();
a0 a6 = a0.a(gVar.f4099a);
n6 = this.f5890c.n();
z4.c cVar = z4.c.NOT_GENERATED;
z4.c cVar2 = n6.f5937b;
if (cVar2 != cVar && cVar2 != z4.c.ATTEMPT_MIGRATION) {
z7 = false;
if (z7) {
String f6 = f(n6);
a0 a0Var = this.f5890c;
f4 f4Var = new f4(n6);
f4Var.f567a = f6;
f4Var.h(z4.c.UNREGISTERED);
n6 = f4Var.g();
a0Var.j(n6);
}
if (a6 != null) {
a6.o();
}
}
z7 = true;
if (z7) {
}
if (a6 != null) {
}
}
if (z6) {
f4 f4Var2 = new f4(n6);
f4Var2.f569c = null;
n6 = f4Var2.g();
}
h(n6);
this.f5896i.execute(new b(1, this, z6));
}
public final z4.a b(z4.a aVar) {
boolean z6;
int responseCode;
boolean z7;
a5.b f6;
d.c a6;
a5.f fVar;
k4.g gVar = this.f5888a;
gVar.a();
String str = gVar.f4101c.f4117a;
String str2 = aVar.f5936a;
k4.g gVar2 = this.f5888a;
gVar2.a();
String str3 = gVar2.f4101c.f4123g;
String str4 = aVar.f5939d;
a5.c cVar = this.f5889b;
a5.e eVar = cVar.f184c;
synchronized (eVar) {
if (eVar.f192c != 0) {
eVar.f190a.f5908a.getClass();
if (System.currentTimeMillis() <= eVar.f191b) {
z6 = false;
}
}
z6 = true;
}
if (z6) {
URL a7 = a5.c.a(String.format("projects/%s/installations/%s/authTokens:generate", str3, str2));
for (int i6 = 0; i6 <= 1; i6++) {
TrafficStats.setThreadStatsTag(32771);
HttpURLConnection c2 = cVar.c(a7, str);
try {
c2.setRequestMethod("POST");
c2.addRequestProperty("Authorization", "FIS_v2 " + str4);
c2.setDoOutput(true);
a5.c.h(c2);
responseCode = c2.getResponseCode();
eVar.a(responseCode);
if (responseCode >= 200 && responseCode < 300) {
z7 = true;
} else {
z7 = false;
}
} catch (IOException | AssertionError unused) {
} catch (Throwable th) {
c2.disconnect();
TrafficStats.clearThreadStatsTag();
throw th;
}
if (z7) {
f6 = a5.c.f(c2);
} else {
a5.c.b(c2, null, str, str3);
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.");
a6 = a5.b.a();
fVar = a5.f.BAD_CONFIG;
a6.f2554d = fVar;
f6 = a6.g();
} else {
c2.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.");
}
}
a6 = a5.b.a();
fVar = a5.f.AUTH_ERROR;
a6.f2554d = fVar;
f6 = a6.g();
}
c2.disconnect();
TrafficStats.clearThreadStatsTag();
int ordinal = f6.f179c.ordinal();
if (ordinal != 0) {
if (ordinal != 1) {
if (ordinal == 2) {
synchronized (this) {
this.f5897j = null;
}
f4 f4Var = new f4(aVar);
f4Var.h(z4.c.NOT_GENERATED);
return f4Var.g();
}
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
f4 f4Var2 = new f4(aVar);
f4Var2.f573g = "BAD CONFIG";
f4Var2.h(z4.c.REGISTER_ERROR);
return f4Var2.g();
}
j jVar = this.f5891d;
jVar.getClass();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
jVar.f5908a.getClass();
long seconds = timeUnit.toSeconds(System.currentTimeMillis());
f4 f4Var3 = new f4(aVar);
f4Var3.f569c = f6.f177a;
f4Var3.f571e = Long.valueOf(f6.f178b);
f4Var3.f572f = Long.valueOf(seconds);
return f4Var3.g();
}
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 l3.o c() {
String str;
e();
synchronized (this) {
str = this.f5897j;
}
if (str != null) {
return i5.f.k(str);
}
l3.i iVar = new l3.i();
g gVar = new g(iVar);
synchronized (this.f5894g) {
this.f5899l.add(gVar);
}
l3.o oVar = iVar.f4234a;
this.f5895h.execute(new androidx.activity.d(14, this));
return oVar;
}
public final l3.o d() {
e();
l3.i iVar = new l3.i();
f fVar = new f(this.f5891d, iVar);
synchronized (this.f5894g) {
this.f5899l.add(fVar);
}
this.f5895h.execute(new b(0, this, false));
return iVar.f4234a;
}
public final void e() {
k4.g gVar = this.f5888a;
gVar.a();
p.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.", gVar.f4101c.f4118b);
gVar.a();
p.f("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.f4101c.f4123g);
gVar.a();
p.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.", gVar.f4101c.f4117a);
gVar.a();
String str = gVar.f4101c.f4118b;
Pattern pattern = j.f5906c;
if (str.contains(":")) {
gVar.a();
if (j.f5906c.matcher(gVar.f4101c.f4117a).matches()) {
return;
}
throw new IllegalArgumentException("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.");
}
throw new IllegalArgumentException("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.");
}
public final String f(z4.a aVar) {
boolean z6;
String string;
k4.g gVar = this.f5888a;
gVar.a();
if (!gVar.f4100b.equals("CHIME_ANDROID_SDK")) {
k4.g gVar2 = this.f5888a;
gVar2.a();
}
if (aVar.f5937b == z4.c.ATTEMPT_MIGRATION) {
z6 = true;
} else {
z6 = false;
}
if (z6) {
z4.b bVar = (z4.b) this.f5892e.get();
synchronized (bVar.f5944a) {
synchronized (bVar.f5944a) {
string = bVar.f5944a.getString("|S|id", null);
}
if (string == null) {
string = bVar.a();
}
}
if (TextUtils.isEmpty(string)) {
this.f5893f.getClass();
return h.a();
}
return string;
}
this.f5893f.getClass();
return h.a();
}
public final z4.a g(z4.a aVar) {
boolean z6;
int responseCode;
boolean z7;
a5.a e6;
String str = aVar.f5936a;
String str2 = null;
if (str != null && str.length() == 11) {
z4.b bVar = (z4.b) this.f5892e.get();
synchronized (bVar.f5944a) {
String[] strArr = z4.b.f5943c;
int i6 = 0;
while (true) {
if (i6 >= 4) {
break;
}
String str3 = strArr[i6];
String string = bVar.f5944a.getString("|T|" + bVar.f5945b + "|" + str3, null);
if (string != null && !string.isEmpty()) {
if (string.startsWith("{")) {
try {
str2 = new JSONObject(string).getString("token");
} catch (JSONException unused) {
}
} else {
str2 = string;
}
} else {
i6++;
}
}
}
}
a5.c cVar = this.f5889b;
k4.g gVar = this.f5888a;
gVar.a();
String str4 = gVar.f4101c.f4117a;
String str5 = aVar.f5936a;
k4.g gVar2 = this.f5888a;
gVar2.a();
String str6 = gVar2.f4101c.f4123g;
k4.g gVar3 = this.f5888a;
gVar3.a();
String str7 = gVar3.f4101c.f4118b;
a5.e eVar = cVar.f184c;
synchronized (eVar) {
if (eVar.f192c != 0) {
eVar.f190a.f5908a.getClass();
if (System.currentTimeMillis() <= eVar.f191b) {
z6 = false;
}
}
z6 = true;
}
if (z6) {
URL a6 = a5.c.a(String.format("projects/%s/installations", str6));
for (int i7 = 0; i7 <= 1; i7++) {
TrafficStats.setThreadStatsTag(32769);
HttpURLConnection c2 = cVar.c(a6, str4);
try {
c2.setRequestMethod("POST");
c2.setDoOutput(true);
if (str2 != null) {
c2.addRequestProperty("x-goog-fis-android-iid-migration-auth", str2);
}
a5.c.g(c2, str5, str7);
responseCode = c2.getResponseCode();
eVar.a(responseCode);
if (responseCode >= 200 && responseCode < 300) {
z7 = true;
} else {
z7 = false;
}
} catch (IOException | AssertionError unused2) {
} catch (Throwable th) {
c2.disconnect();
TrafficStats.clearThreadStatsTag();
throw th;
}
if (z7) {
e6 = a5.c.e(c2);
} else {
a5.c.b(c2, 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.");
e6 = new a5.a(null, null, null, null, a5.d.BAD_CONFIG);
} else {
c2.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.");
}
}
c2.disconnect();
TrafficStats.clearThreadStatsTag();
int ordinal = e6.f176e.ordinal();
if (ordinal != 0) {
if (ordinal == 1) {
f4 f4Var = new f4(aVar);
f4Var.f573g = "BAD CONFIG";
f4Var.h(z4.c.REGISTER_ERROR);
return f4Var.g();
}
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
String str8 = e6.f173b;
String str9 = e6.f174c;
j jVar = this.f5891d;
jVar.getClass();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
jVar.f5908a.getClass();
long seconds = timeUnit.toSeconds(System.currentTimeMillis());
a5.b bVar2 = e6.f175d;
String str10 = bVar2.f177a;
long j4 = bVar2.f178b;
f4 f4Var2 = new f4(aVar);
f4Var2.f567a = str8;
f4Var2.h(z4.c.REGISTERED);
f4Var2.f569c = str10;
f4Var2.f570d = str9;
f4Var2.f571e = Long.valueOf(j4);
f4Var2.f572f = Long.valueOf(seconds);
return f4Var2.g();
}
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 h(z4.a aVar) {
synchronized (this.f5894g) {
Iterator it = this.f5899l.iterator();
while (it.hasNext()) {
if (((i) it.next()).b(aVar)) {
it.remove();
}
}
}
}
}