正在查看: Share Any v2.1.7 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Share Any v2.1.7 应用的 b.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package z8;
import a9.a;
import android.annotation.SuppressLint;
import android.net.TrafficStats;
import android.text.TextUtils;
import b9.a;
import b9.c;
import b9.d;
import c9.b;
import c9.d;
import c9.f;
import com.google.android.gms.common.internal.Preconditions;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.android.gms.tasks.Tasks;
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.List;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern;
import t8.p;
public class b implements c {
public static final Object f24332m = new Object();
public final p8.f f24333a;
public final c9.c f24334b;
public final b9.c f24335c;
public final h f24336d;
public final p<b9.b> f24337e;
public final f f24338f;
public final Object f24339g;
public final ExecutorService f24340h;
public final Executor f24341i;
public String f24342j;
public Set<a> f24343k;
public final List<g> f24344l;
static {
new AtomicInteger(1);
}
@SuppressLint({"ThreadPoolCreation"})
public b(p8.f fVar, y8.a<x8.f> aVar, ExecutorService executorService, Executor executor) {
fVar.a();
c9.c cVar = new c9.c(fVar.f17977a, aVar);
b9.c cVar2 = new b9.c(fVar);
h c10 = h.c();
p<b9.b> pVar = new p<>(new t8.e(fVar));
f fVar2 = new f();
this.f24339g = new Object();
this.f24343k = new HashSet();
this.f24344l = new ArrayList();
this.f24333a = fVar;
this.f24334b = cVar;
this.f24335c = cVar2;
this.f24336d = c10;
this.f24337e = pVar;
this.f24338f = fVar2;
this.f24340h = executorService;
this.f24341i = executor;
}
public static b e() {
p8.f b10 = p8.f.b();
Preconditions.checkArgument(true, "Null is not a valid value of FirebaseApp.");
b10.a();
return (b) b10.f17980d.a(c.class);
}
public final b9.d a(b9.d dVar) {
int responseCode;
c9.f f10;
f.a a10;
f.b bVar;
c9.c cVar = this.f24334b;
String b10 = b();
b9.a aVar = (b9.a) dVar;
String str = aVar.f3153b;
String f11 = f();
String str2 = aVar.f3156e;
if (!cVar.f3655c.a()) {
throw new d("Firebase Installations Service is unavailable. Please try again later.", 2);
}
URL a11 = cVar.a(String.format("projects/%s/installations/%s/authTokens:generate", f11, str));
for (int i10 = 0; i10 <= 1; i10++) {
TrafficStats.setThreadStatsTag(32771);
HttpURLConnection c10 = cVar.c(a11, b10);
try {
c10.setRequestMethod("POST");
c10.addRequestProperty("Authorization", "FIS_v2 " + str2);
c10.setDoOutput(true);
cVar.h(c10);
responseCode = c10.getResponseCode();
cVar.f3655c.b(responseCode);
} catch (IOException | AssertionError unused) {
} catch (Throwable th) {
c10.disconnect();
TrafficStats.clearThreadStatsTag();
throw th;
}
if (responseCode >= 200 && responseCode < 300) {
f10 = cVar.f(c10);
} else {
c9.c.b(c10, null, b10, f11);
if (responseCode != 401 && responseCode != 404) {
if (responseCode == 429) {
throw new d("Firebase servers have received too many requests from this client in a short period of time. Please try again later.", 3);
}
if (responseCode < 500 || responseCode >= 600) {
a10 = c9.f.a();
bVar = f.b.BAD_CONFIG;
b.C0048b c0048b = (b.C0048b) a10;
c0048b.f3650c = bVar;
f10 = c0048b.a();
} else {
c10.disconnect();
TrafficStats.clearThreadStatsTag();
}
}
a10 = c9.f.a();
bVar = f.b.AUTH_ERROR;
b.C0048b c0048b2 = (b.C0048b) a10;
c0048b2.f3650c = bVar;
f10 = c0048b2.a();
}
c10.disconnect();
TrafficStats.clearThreadStatsTag();
c9.b bVar2 = (c9.b) f10;
int ordinal = bVar2.f3647c.ordinal();
if (ordinal == 0) {
String str3 = bVar2.f3645a;
long j10 = bVar2.f3646b;
long b11 = this.f24336d.b();
a.b bVar3 = (a.b) dVar.j();
bVar3.f3162c = str3;
bVar3.f3164e = Long.valueOf(j10);
bVar3.f3165f = Long.valueOf(b11);
return bVar3.a();
}
if (ordinal == 1) {
a.b bVar4 = (a.b) dVar.j();
bVar4.f3166g = "BAD CONFIG";
bVar4.b(c.a.REGISTER_ERROR);
return bVar4.a();
}
if (ordinal != 2) {
throw new d("Firebase Installations Service is unavailable. Please try again later.", 2);
}
synchronized (this) {
this.f24342j = null;
}
d.a j11 = dVar.j();
j11.b(c.a.NOT_GENERATED);
return j11.a();
}
throw new d("Firebase Installations Service is unavailable. Please try again later.", 2);
}
public String b() {
p8.f fVar = this.f24333a;
fVar.a();
return fVar.f17979c.f17989a;
}
public String c() {
p8.f fVar = this.f24333a;
fVar.a();
return fVar.f17979c.f17990b;
}
public Task<String> d() {
String str;
Preconditions.checkNotEmpty(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.");
Preconditions.checkNotEmpty(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.");
Preconditions.checkNotEmpty(b(), "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.");
String c10 = c();
Pattern pattern = h.f24349c;
Preconditions.checkArgument(c10.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.");
Preconditions.checkArgument(h.f24349c.matcher(b()).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.");
synchronized (this) {
str = this.f24342j;
}
if (str != null) {
return Tasks.forResult(str);
}
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
e eVar = new e(taskCompletionSource);
synchronized (this.f24339g) {
this.f24344l.add(eVar);
}
Task<String> task = taskCompletionSource.getTask();
this.f24340h.execute(new androidx.activity.c(this));
return task;
}
public String f() {
p8.f fVar = this.f24333a;
fVar.a();
return fVar.f17979c.f17995g;
}
public final String g(b9.d dVar) {
String string;
p8.f fVar = this.f24333a;
fVar.a();
if (fVar.f17978b.equals("CHIME_ANDROID_SDK") || this.f24333a.f()) {
if (((b9.a) dVar).f3154c == c.a.ATTEMPT_MIGRATION) {
b9.b bVar = this.f24337e.get();
synchronized (bVar.f3168a) {
synchronized (bVar.f3168a) {
string = bVar.f3168a.getString("|S|id", null);
}
if (string == null) {
string = bVar.a();
}
}
return TextUtils.isEmpty(string) ? this.f24338f.a() : string;
}
}
return this.f24338f.a();
}
public final b9.d h(b9.d dVar) {
int responseCode;
c9.d e10;
b9.a aVar = (b9.a) dVar;
String str = aVar.f3153b;
String str2 = null;
if (str != null && str.length() == 11) {
b9.b bVar = this.f24337e.get();
synchronized (bVar.f3168a) {
String[] strArr = b9.b.f3167c;
int length = strArr.length;
int i10 = 0;
while (true) {
if (i10 >= length) {
break;
}
String str3 = strArr[i10];
String string = bVar.f3168a.getString("|T|" + bVar.f3169b + "|" + str3, null);
if (string == null || string.isEmpty()) {
i10++;
} else if (string.startsWith("{")) {
try {
str2 = new je.c(string).h("token");
} catch (je.b unused) {
}
} else {
str2 = string;
}
}
}
}
c9.c cVar = this.f24334b;
String b10 = b();
String str4 = aVar.f3153b;
String f10 = f();
String c10 = c();
if (!cVar.f3655c.a()) {
throw new d("Firebase Installations Service is unavailable. Please try again later.", 2);
}
URL a10 = cVar.a(String.format("projects/%s/installations", f10));
for (int i11 = 0; i11 <= 1; i11++) {
TrafficStats.setThreadStatsTag(32769);
HttpURLConnection c11 = cVar.c(a10, b10);
try {
try {
c11.setRequestMethod("POST");
c11.setDoOutput(true);
if (str2 != null) {
c11.addRequestProperty("x-goog-fis-android-iid-migration-auth", str2);
}
cVar.g(c11, str4, c10);
responseCode = c11.getResponseCode();
cVar.f3655c.b(responseCode);
} catch (IOException | AssertionError unused2) {
}
if (responseCode >= 200 && responseCode < 300) {
e10 = cVar.e(c11);
} else {
c9.c.b(c11, c10, b10, f10);
if (responseCode == 429) {
throw new d("Firebase servers have received too many requests from this client in a short period of time. Please try again later.", 3);
}
if (responseCode < 500 || responseCode >= 600) {
c9.a aVar2 = new c9.a(null, null, null, null, d.a.BAD_CONFIG, null);
c11.disconnect();
TrafficStats.clearThreadStatsTag();
e10 = aVar2;
} else {
c11.disconnect();
TrafficStats.clearThreadStatsTag();
}
}
c9.a aVar3 = (c9.a) e10;
int ordinal = aVar3.f3644e.ordinal();
if (ordinal != 0) {
if (ordinal != 1) {
throw new d("Firebase Installations Service is unavailable. Please try again later.", 2);
}
a.b bVar2 = (a.b) dVar.j();
bVar2.f3166g = "BAD CONFIG";
bVar2.b(c.a.REGISTER_ERROR);
return bVar2.a();
}
String str5 = aVar3.f3641b;
String str6 = aVar3.f3642c;
long b11 = this.f24336d.b();
String c12 = aVar3.f3643d.c();
long d10 = aVar3.f3643d.d();
a.b bVar3 = (a.b) dVar.j();
bVar3.f3160a = str5;
bVar3.b(c.a.REGISTERED);
bVar3.f3162c = c12;
bVar3.f3163d = str6;
bVar3.f3164e = Long.valueOf(d10);
bVar3.f3165f = Long.valueOf(b11);
return bVar3.a();
} finally {
c11.disconnect();
TrafficStats.clearThreadStatsTag();
}
}
throw new d("Firebase Installations Service is unavailable. Please try again later.", 2);
}
public final void i(Exception exc) {
synchronized (this.f24339g) {
Iterator<g> it = this.f24344l.iterator();
while (it.hasNext()) {
if (it.next().b(exc)) {
it.remove();
}
}
}
}
public final void j(b9.d dVar) {
synchronized (this.f24339g) {
Iterator<g> it = this.f24344l.iterator();
while (it.hasNext()) {
if (it.next().a(dVar)) {
it.remove();
}
}
}
}
}