Flash Cleaner v1.0.14版本的 MD5 值为:afbed0179616af7c25ad332b251e759c
以下内容为反编译后的 c.java 源代码,内容仅作参考
package rd;
import android.net.TrafficStats;
import android.text.TextUtils;
import android.util.Log;
import androidx.appcompat.widget.g4;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.internal.measurement.m3;
import ib.s;
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 mb.q;
import org.json.JSONException;
import org.json.JSONObject;
import uc.o;
public final class c implements d {
public static final Object f15178m = new Object();
public final nc.g f15179a;
public final td.c f15180b;
public final m3 f15181c;
public final j f15182d;
public final o f15183e;
public final h f15184f;
public final Object f15185g;
public final ExecutorService f15186h;
public final Executor f15187i;
public String f15188j;
public final HashSet f15189k;
public final ArrayList f15190l;
static {
new AtomicInteger(1);
}
public c(nc.g gVar, qd.c cVar, ExecutorService executorService, vc.j jVar) {
gVar.a();
td.c cVar2 = new td.c(gVar.f13722a, cVar);
m3 m3Var = new m3(gVar);
if (s.f10721d == null) {
s.f10721d = new s();
}
s sVar = s.f10721d;
if (j.f15198d == null) {
j.f15198d = new j(sVar);
}
j jVar2 = j.f15198d;
o oVar = new o(new uc.d(2, gVar));
h hVar = new h();
this.f15185g = new Object();
this.f15189k = new HashSet();
this.f15190l = new ArrayList();
this.f15179a = gVar;
this.f15180b = cVar2;
this.f15181c = m3Var;
this.f15182d = jVar2;
this.f15183e = oVar;
this.f15184f = hVar;
this.f15186h = executorService;
this.f15187i = jVar;
}
public final void a(i iVar) {
synchronized (this.f15185g) {
this.f15190l.add(iVar);
}
}
public final void b(boolean z10) {
sd.a p10;
boolean z11;
synchronized (f15178m) {
nc.g gVar = this.f15179a;
gVar.a();
o6.c e10 = o6.c.e(gVar.f13722a);
p10 = this.f15181c.p();
sd.c cVar = sd.c.NOT_GENERATED;
sd.c cVar2 = p10.f15580b;
if (cVar2 != cVar && cVar2 != sd.c.ATTEMPT_MIGRATION) {
z11 = false;
if (z11) {
String h10 = h(p10);
m3 m3Var = this.f15181c;
g4 g4Var = new g4(p10);
g4Var.f840a = h10;
g4Var.j(sd.c.UNREGISTERED);
p10 = g4Var.g();
m3Var.n(p10);
}
if (e10 != null) {
e10.o();
}
}
z11 = true;
if (z11) {
}
if (e10 != null) {
}
}
if (z10) {
g4 g4Var2 = new g4(p10);
g4Var2.f842c = null;
p10 = g4Var2.g();
}
k(p10);
this.f15187i.execute(new b(this, z10, 0));
}
public final sd.a c(sd.a aVar) {
int responseCode;
boolean z10;
td.b f2;
ad.h a10;
td.f fVar;
nc.g gVar = this.f15179a;
gVar.a();
String str = gVar.f13724c.f13731a;
gVar.a();
String str2 = gVar.f13724c.f13737g;
String str3 = aVar.f15582d;
td.c cVar = this.f15180b;
td.e eVar = cVar.f16226c;
if (eVar.b()) {
URL a11 = td.c.a(String.format("projects/%s/installations/%s/authTokens:generate", str2, aVar.f15579a));
for (int i10 = 0; i10 <= 1; i10++) {
TrafficStats.setThreadStatsTag(32771);
HttpURLConnection c10 = cVar.c(a11, str);
try {
c10.setRequestMethod("POST");
c10.addRequestProperty("Authorization", "FIS_v2 " + str3);
c10.setDoOutput(true);
td.c.h(c10);
responseCode = c10.getResponseCode();
eVar.d(responseCode);
if (responseCode >= 200 && responseCode < 300) {
z10 = true;
} else {
z10 = false;
}
} catch (IOException | AssertionError unused) {
} catch (Throwable th) {
c10.disconnect();
TrafficStats.clearThreadStatsTag();
throw th;
}
if (z10) {
f2 = td.c.f(c10);
} else {
td.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.");
a10 = td.b.a();
fVar = td.f.BAD_CONFIG;
a10.f293c = fVar;
f2 = a10.g();
} 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.");
}
}
a10 = td.b.a();
fVar = td.f.AUTH_ERROR;
a10.f293c = fVar;
f2 = a10.g();
}
c10.disconnect();
TrafficStats.clearThreadStatsTag();
int ordinal = f2.f16221c.ordinal();
if (ordinal != 0) {
if (ordinal != 1) {
if (ordinal == 2) {
l(null);
g4 g4Var = new g4(aVar);
g4Var.j(sd.c.NOT_GENERATED);
return g4Var.g();
}
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
g4 g4Var2 = new g4(aVar);
g4Var2.f846g = "BAD CONFIG";
g4Var2.j(sd.c.REGISTER_ERROR);
return g4Var2.g();
}
j jVar = this.f15182d;
jVar.getClass();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
jVar.f15199a.getClass();
long seconds = timeUnit.toSeconds(System.currentTimeMillis());
g4 g4Var3 = new g4(aVar);
g4Var3.f842c = f2.f16219a;
g4Var3.f844e = Long.valueOf(f2.f16220b);
g4Var3.f845f = Long.valueOf(seconds);
return g4Var3.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 q d() {
String str;
g();
synchronized (this) {
str = this.f15188j;
}
if (str != null) {
return ad.f.S(str);
}
mb.j jVar = new mb.j();
a(new g(jVar));
q qVar = jVar.f13349a;
this.f15186h.execute(new androidx.activity.b(25, this));
return qVar;
}
public final q e() {
g();
mb.j jVar = new mb.j();
a(new f(this.f15182d, jVar));
this.f15186h.execute(new b(this, false, 1));
return jVar.f13349a;
}
public final void f(sd.a aVar) {
synchronized (f15178m) {
nc.g gVar = this.f15179a;
gVar.a();
o6.c e10 = o6.c.e(gVar.f13722a);
this.f15181c.n(aVar);
if (e10 != null) {
e10.o();
}
}
}
public final void g() {
nc.g gVar = this.f15179a;
gVar.a();
Preconditions.checkNotEmpty(gVar.f13724c.f13732b, "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.a();
Preconditions.checkNotEmpty(gVar.f13724c.f13737g, "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.a();
Preconditions.checkNotEmpty(gVar.f13724c.f13731a, "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.a();
String str = gVar.f13724c.f13732b;
Pattern pattern = j.f15197c;
Preconditions.checkArgument(str.contains(":"), "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.a();
Preconditions.checkArgument(j.f15197c.matcher(gVar.f13724c.f13731a).matches(), "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.");
}
public final String h(sd.a aVar) {
boolean z10;
String a10;
nc.g gVar = this.f15179a;
gVar.a();
if (!gVar.f13723b.equals("CHIME_ANDROID_SDK")) {
nc.g gVar2 = this.f15179a;
gVar2.a();
}
if (aVar.f15580b == sd.c.ATTEMPT_MIGRATION) {
z10 = true;
} else {
z10 = false;
}
if (z10) {
sd.b bVar = (sd.b) this.f15183e.get();
synchronized (bVar.f15587a) {
a10 = bVar.a();
if (a10 == null) {
a10 = bVar.b();
}
}
if (TextUtils.isEmpty(a10)) {
this.f15184f.getClass();
return h.a();
}
return a10;
}
this.f15184f.getClass();
return h.a();
}
public final sd.a i(sd.a aVar) {
String str;
td.e eVar;
HttpURLConnection httpURLConnection;
String str2;
URL url;
int i10;
td.e eVar2;
int responseCode;
boolean z10;
String str3 = aVar.f15579a;
if (str3 != null && str3.length() == 11) {
sd.b bVar = (sd.b) this.f15183e.get();
synchronized (bVar.f15587a) {
String[] strArr = sd.b.f15586c;
for (int i11 = 0; i11 < 4; i11++) {
String str4 = strArr[i11];
String string = bVar.f15587a.getString("|T|" + bVar.f15588b + "|" + str4, null);
if (string != null && !string.isEmpty()) {
if (string.startsWith("{")) {
try {
string = new JSONObject(string).getString("token");
} catch (JSONException unused) {
string = null;
}
}
str = string;
}
}
}
td.c cVar = this.f15180b;
nc.g gVar = this.f15179a;
gVar.a();
String str5 = gVar.f13724c.f13731a;
String str6 = aVar.f15579a;
nc.g gVar2 = this.f15179a;
gVar2.a();
String str7 = gVar2.f13724c.f13737g;
nc.g gVar3 = this.f15179a;
gVar3.a();
String str8 = gVar3.f13724c.f13732b;
eVar = cVar.f16226c;
String str9 = "Firebase Installations Service is unavailable. Please try again later.";
if (!eVar.b()) {
?? r72 = 1;
URL a10 = td.c.a(String.format("projects/%s/installations", str7));
int i12 = 0;
td.a aVar2 = str;
while (i12 <= r72) {
TrafficStats.setThreadStatsTag(32769);
HttpURLConnection c10 = cVar.c(a10, str5);
try {
c10.setRequestMethod("POST");
c10.setDoOutput(r72);
if (aVar2 != 0) {
c10.addRequestProperty("x-goog-fis-android-iid-migration-auth", aVar2);
}
td.c.g(c10, str6, str8);
responseCode = c10.getResponseCode();
eVar.d(responseCode);
if (responseCode >= 200 && responseCode < 300) {
z10 = true;
} else {
z10 = false;
}
} catch (IOException | AssertionError unused2) {
} catch (Throwable th) {
th = th;
httpURLConnection = c10;
}
if (z10) {
aVar2 = td.c.e(c10);
httpURLConnection = c10;
} else {
td.c.b(c10, str8, str5, str7);
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.");
httpURLConnection = c10;
i10 = i12;
url = a10;
str2 = str9;
eVar2 = eVar;
try {
try {
aVar2 = new td.a(null, null, null, null, td.d.BAD_CONFIG);
} catch (IOException | AssertionError unused3) {
}
} catch (Throwable th2) {
th = th2;
httpURLConnection.disconnect();
TrafficStats.clearThreadStatsTag();
throw th;
}
} else {
httpURLConnection = c10;
i10 = i12;
url = a10;
str2 = str9;
eVar2 = eVar;
httpURLConnection.disconnect();
TrafficStats.clearThreadStatsTag();
i12 = i10 + 1;
eVar = eVar2;
a10 = url;
str9 = str2;
r72 = 1;
aVar2 = aVar2;
}
} else {
httpURLConnection = c10;
i10 = i12;
url = a10;
str2 = str9;
eVar2 = eVar;
try {
throw new e("Firebase servers have received too many requests from this client in a short period of time. Please try again later.");
break;
} catch (IOException | AssertionError unused4) {
continue;
}
}
}
httpURLConnection.disconnect();
TrafficStats.clearThreadStatsTag();
int ordinal = aVar2.f16218e.ordinal();
if (ordinal != 0) {
if (ordinal == 1) {
g4 g4Var = new g4(aVar);
g4Var.f846g = "BAD CONFIG";
g4Var.j(sd.c.REGISTER_ERROR);
return g4Var.g();
}
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
String str10 = aVar2.f16215b;
String str11 = aVar2.f16216c;
j jVar = this.f15182d;
jVar.getClass();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
jVar.f15199a.getClass();
long seconds = timeUnit.toSeconds(System.currentTimeMillis());
td.b bVar2 = aVar2.f16217d;
String str12 = bVar2.f16219a;
long j9 = bVar2.f16220b;
g4 g4Var2 = new g4(aVar);
g4Var2.f840a = str10;
g4Var2.j(sd.c.REGISTERED);
g4Var2.f842c = str12;
g4Var2.f843d = str11;
g4Var2.f844e = Long.valueOf(j9);
g4Var2.f845f = Long.valueOf(seconds);
return g4Var2.g();
}
throw new e(str9);
}
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
str = null;
td.c cVar2 = this.f15180b;
nc.g gVar4 = this.f15179a;
gVar4.a();
String str52 = gVar4.f13724c.f13731a;
String str62 = aVar.f15579a;
nc.g gVar22 = this.f15179a;
gVar22.a();
String str72 = gVar22.f13724c.f13737g;
nc.g gVar32 = this.f15179a;
gVar32.a();
String str82 = gVar32.f13724c.f13732b;
eVar = cVar2.f16226c;
String str92 = "Firebase Installations Service is unavailable. Please try again later.";
if (!eVar.b()) {
}
}
public final void j(Exception exc) {
synchronized (this.f15185g) {
Iterator it = this.f15190l.iterator();
while (it.hasNext()) {
if (((i) it.next()).b(exc)) {
it.remove();
}
}
}
}
public final void k(sd.a aVar) {
synchronized (this.f15185g) {
Iterator it = this.f15190l.iterator();
while (it.hasNext()) {
if (((i) it.next()).a(aVar)) {
it.remove();
}
}
}
}
public final synchronized void l(String str) {
this.f15188j = str;
}
public final synchronized void m(sd.a aVar, sd.a aVar2) {
if (this.f15189k.size() != 0 && !TextUtils.equals(aVar.f15579a, aVar2.f15579a)) {
Iterator it = this.f15189k.iterator();
if (it.hasNext()) {
a4.b.y(it.next());
throw null;
}
}
}
}