正在查看: Aplazo v2.4.68 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Aplazo v2.4.68 应用的 d.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package nc;
import Nb.n;
import P9.p;
import android.net.TrafficStats;
import android.util.Log;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.android.gms.tasks.Tasks;
import h2.C1889c;
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.ExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern;
import oa.C2622m3;
import org.json.JSONException;
import org.json.JSONObject;
public final class d implements e {
public static final Object f29735m = new Object();
public final Kb.g f29736a;
public final pc.c f29737b;
public final hf.h f29738c;
public final k f29739d;
public final n f29740e;
public final i f29741f;
public final Object f29742g;
public final ExecutorService f29743h;
public final Ob.j f29744i;
public String f29745j;
public final HashSet k;
public final ArrayList f29746l;
static {
new AtomicInteger(1);
}
public d(Kb.g gVar, mc.b bVar, ExecutorService executorService, Ob.j jVar) {
gVar.a();
pc.c cVar = new pc.c(gVar.f7601a, bVar);
hf.h hVar = new hf.h();
hVar.d = gVar;
if (C1889c.f25333c == null) {
C1889c.f25333c = new C1889c();
}
C1889c c1889c = C1889c.f25333c;
if (k.f29754d == null) {
k.f29754d = new k(c1889c);
}
k kVar = k.f29754d;
n nVar = new n(new Nb.c(gVar, 2));
i iVar = new i();
this.f29742g = new Object();
this.k = new HashSet();
this.f29746l = new ArrayList();
this.f29736a = gVar;
this.f29737b = cVar;
this.f29738c = hVar;
this.f29739d = kVar;
this.f29740e = nVar;
this.f29741f = iVar;
this.f29743h = executorService;
this.f29744i = jVar;
}
public final void a() {
throw new UnsupportedOperationException("Method not decompiled: nc.d.a():void");
}
public final oc.a b(oc.a aVar) {
int responseCode;
pc.b f3;
Kb.g gVar = this.f29736a;
gVar.a();
String str = gVar.f7603c.f7611a;
String str2 = aVar.f30425a;
Kb.g gVar2 = this.f29736a;
gVar2.a();
String str3 = gVar2.f7603c.f7617g;
String str4 = aVar.f30428d;
pc.c cVar = this.f29737b;
pc.e eVar = cVar.f31024c;
if (!eVar.a()) {
throw new f("Firebase Installations Service is unavailable. Please try again later.");
}
URL a2 = pc.c.a("projects/" + str3 + "/installations/" + str2 + "/authTokens:generate");
for (int i10 = 0; i10 <= 1; i10++) {
TrafficStats.setThreadStatsTag(32771);
HttpURLConnection c4 = cVar.c(a2, str);
try {
try {
c4.setRequestMethod("POST");
c4.addRequestProperty("Authorization", "FIS_v2 " + str4);
c4.setDoOutput(true);
pc.c.h(c4);
responseCode = c4.getResponseCode();
eVar.b(responseCode);
} catch (IOException | AssertionError unused) {
}
if (responseCode >= 200 && responseCode < 300) {
f3 = pc.c.f(c4);
} else {
pc.c.b(c4, null, str, str3);
if (responseCode == 401 || responseCode == 404) {
C2622m3 a10 = pc.b.a();
a10.f30327f = pc.f.AUTH_ERROR;
f3 = a10.c();
} 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) {
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.");
C2622m3 a11 = pc.b.a();
a11.f30327f = pc.f.BAD_CONFIG;
f3 = a11.c();
}
c4.disconnect();
TrafficStats.clearThreadStatsTag();
}
}
c4.disconnect();
TrafficStats.clearThreadStatsTag();
int i11 = c.f29734b[f3.f31019c.ordinal()];
if (i11 == 1) {
k kVar = this.f29739d;
kVar.getClass();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
kVar.f29755a.getClass();
long seconds = timeUnit.toSeconds(System.currentTimeMillis());
Cb.a a12 = aVar.a();
a12.f2682e = f3.f31017a;
a12.f2684g = Long.valueOf(f3.f31018b);
a12.f2685h = Long.valueOf(seconds);
return a12.s();
}
if (i11 == 2) {
Cb.a a13 = aVar.a();
a13.f2686i = "BAD CONFIG";
a13.F(oc.c.REGISTER_ERROR);
return a13.s();
}
if (i11 != 3) {
throw new f("Firebase Installations Service is unavailable. Please try again later.");
}
synchronized (this) {
this.f29745j = null;
}
Cb.a a14 = aVar.a();
a14.F(oc.c.NOT_GENERATED);
return a14.s();
} catch (Throwable th) {
c4.disconnect();
TrafficStats.clearThreadStatsTag();
throw th;
}
}
throw new f("Firebase Installations Service is unavailable. Please try again later.");
}
public final Task c() {
String str;
e();
synchronized (this) {
str = this.f29745j;
}
if (str != null) {
return Tasks.forResult(str);
}
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
h hVar = new h(taskCompletionSource);
synchronized (this.f29742g) {
this.f29746l.add(hVar);
}
Task task = taskCompletionSource.getTask();
this.f29743h.execute(new b(this, 0));
return task;
}
public final Task d() {
e();
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
g gVar = new g(this.f29739d, taskCompletionSource);
synchronized (this.f29742g) {
this.f29746l.add(gVar);
}
Task task = taskCompletionSource.getTask();
this.f29743h.execute(new b(this, 1));
return task;
}
public final void e() {
Kb.g gVar = this.f29736a;
gVar.a();
p.e(gVar.f7603c.f7612b, "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();
p.e(gVar.f7603c.f7617g, "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();
p.e(gVar.f7603c.f7611a, "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.f7603c.f7612b;
Pattern pattern = k.f29753c;
p.a("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();
p.a("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.f29753c.matcher(gVar.f7603c.f7611a).matches());
}
public final java.lang.String f(oc.a r6) {
throw new UnsupportedOperationException("Method not decompiled: nc.d.f(oc.a):java.lang.String");
}
public final oc.a g(oc.a aVar) {
int responseCode;
pc.a e10;
String str = aVar.f30425a;
String str2 = null;
if (str != null && str.length() == 11) {
oc.b bVar = (oc.b) this.f29740e.get();
synchronized (bVar.f30433a) {
try {
String[] strArr = oc.b.f30432c;
int i10 = 0;
while (true) {
if (i10 < 4) {
String str3 = strArr[i10];
String string = bVar.f30433a.getString("|T|" + bVar.f30434b + "|" + str3, null);
if (string == null || string.isEmpty()) {
i10++;
} else if (string.startsWith("{")) {
try {
str2 = new JSONObject(string).getString("token");
} catch (JSONException unused) {
}
} else {
str2 = string;
}
}
}
} finally {
}
}
}
pc.c cVar = this.f29737b;
Kb.g gVar = this.f29736a;
gVar.a();
String str4 = gVar.f7603c.f7611a;
String str5 = aVar.f30425a;
Kb.g gVar2 = this.f29736a;
gVar2.a();
String str6 = gVar2.f7603c.f7617g;
Kb.g gVar3 = this.f29736a;
gVar3.a();
String str7 = gVar3.f7603c.f7612b;
pc.e eVar = cVar.f31024c;
if (!eVar.a()) {
throw new f("Firebase Installations Service is unavailable. Please try again later.");
}
URL a2 = pc.c.a("projects/" + str6 + "/installations");
for (int i11 = 0; i11 <= 1; i11++) {
TrafficStats.setThreadStatsTag(32769);
HttpURLConnection c4 = cVar.c(a2, str4);
try {
try {
c4.setRequestMethod("POST");
c4.setDoOutput(true);
if (str2 != null) {
c4.addRequestProperty("x-goog-fis-android-iid-migration-auth", str2);
}
pc.c.g(c4, str5, str7);
responseCode = c4.getResponseCode();
eVar.b(responseCode);
} finally {
c4.disconnect();
TrafficStats.clearThreadStatsTag();
}
} catch (IOException | AssertionError unused2) {
}
if (responseCode >= 200 && responseCode < 300) {
e10 = pc.c.e(c4);
c4.disconnect();
TrafficStats.clearThreadStatsTag();
} else {
pc.c.b(c4, 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) {
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.");
pc.a aVar2 = new pc.a(null, null, null, null, pc.d.BAD_CONFIG);
c4.disconnect();
TrafficStats.clearThreadStatsTag();
e10 = aVar2;
}
c4.disconnect();
TrafficStats.clearThreadStatsTag();
}
int i12 = c.f29733a[e10.f31016e.ordinal()];
if (i12 != 1) {
if (i12 != 2) {
throw new f("Firebase Installations Service is unavailable. Please try again later.");
}
Cb.a a10 = aVar.a();
a10.f2686i = "BAD CONFIG";
a10.F(oc.c.REGISTER_ERROR);
return a10.s();
}
String str8 = e10.f31013b;
String str9 = e10.f31014c;
k kVar = this.f29739d;
kVar.getClass();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
kVar.f29755a.getClass();
long seconds = timeUnit.toSeconds(System.currentTimeMillis());
pc.b bVar2 = e10.f31015d;
String str10 = bVar2.f31017a;
long j10 = bVar2.f31018b;
Cb.a a11 = aVar.a();
a11.f2681d = str8;
a11.F(oc.c.REGISTERED);
a11.f2682e = str10;
a11.f2683f = str9;
a11.f2684g = Long.valueOf(j10);
a11.f2685h = Long.valueOf(seconds);
return a11.s();
}
throw new f("Firebase Installations Service is unavailable. Please try again later.");
}
public final void h(Exception exc) {
synchronized (this.f29742g) {
try {
Iterator it = this.f29746l.iterator();
while (it.hasNext()) {
if (((j) it.next()).b(exc)) {
it.remove();
}
}
} catch (Throwable th) {
throw th;
}
}
}
public final void i(oc.a aVar) {
synchronized (this.f29742g) {
try {
Iterator it = this.f29746l.iterator();
while (it.hasNext()) {
if (((j) it.next()).a(aVar)) {
it.remove();
}
}
} catch (Throwable th) {
throw th;
}
}
}
}