正在查看: Fancy Optimizer v4.6.3 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Fancy Optimizer v4.6.3 应用的 c.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package vh;
import android.annotation.SuppressLint;
import android.net.TrafficStats;
import android.text.TextUtils;
import android.util.Log;
import androidx.annotation.GuardedBy;
import androidx.annotation.NonNull;
import c0.u;
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 com.ironsource.mediationsdk.utils.IronSourceConstants;
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 wg.o;
import xg.n;
import xh.a;
public final class c implements d {
public static final Object m = new Object();
public final pg.e a;
public final yh.c b;
public final xh.c c;
public final k d;
public final o<xh.b> e;
public final i f;
public final Object g;
public final ExecutorService h;
public final Executor i;
@GuardedBy("this")
public String j;
@GuardedBy("FirebaseInstallations.this")
public final HashSet k;
@GuardedBy("lock")
public final ArrayList l;
static {
new AtomicInteger(1);
}
@SuppressLint({"ThreadPoolCreation"})
public c() {
throw null;
}
@SuppressLint({"ThreadPoolCreation"})
public c(pg.e eVar, @NonNull uh.b bVar, @NonNull ExecutorService executorService, @NonNull n nVar) {
eVar.a();
yh.c cVar = new yh.c(eVar.a, bVar);
xh.c cVar2 = new xh.c(eVar);
if (b0.a.c == null) {
b0.a.c = new b0.a();
}
b0.a aVar = b0.a.c;
if (k.d == null) {
k.d = new k(aVar);
}
k kVar = k.d;
o<xh.b> oVar = new o<>(new wg.g(eVar, 1));
i iVar = new i();
this.g = new Object();
this.k = new HashSet();
this.l = new ArrayList();
this.a = eVar;
this.b = cVar;
this.c = cVar2;
this.d = kVar;
this.e = oVar;
this.f = iVar;
this.h = executorService;
this.i = nVar;
}
public final void a(j jVar) {
synchronized (this.g) {
this.l.add(jVar);
}
}
public final void b(final boolean r7) {
throw new UnsupportedOperationException("Method not decompiled: vh.c.b(boolean):void");
}
public final xh.a c(@NonNull xh.a aVar) throws e {
String str;
char c;
String str2;
boolean z;
int responseCode;
pg.e eVar = this.a;
eVar.a();
String str3 = eVar.c.a;
eVar.a();
String str4 = eVar.c.g;
String str5 = aVar.e;
yh.c cVar = this.b;
yh.e eVar2 = cVar.c;
String str6 = "Firebase Installations Service is unavailable. Please try again later.";
if (!eVar2.b()) {
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
char c2 = 2;
?? r11 = 1;
URL a = yh.c.a(String.format("projects/%s/installations/%s/authTokens:generate", str4, aVar.b));
int i = 0;
yh.b bVar = str4;
while (i <= r11) {
TrafficStats.setThreadStatsTag(32771);
HttpURLConnection c3 = cVar.c(a, str3);
try {
try {
c3.setRequestMethod("POST");
c3.addRequestProperty("Authorization", "FIS_v2 " + str5);
c3.setDoOutput(r11);
yh.c.h(c3);
responseCode = c3.getResponseCode();
eVar2.d(responseCode);
} catch (IOException | AssertionError unused) {
c = c2;
str2 = str6;
z = r11;
}
if ((responseCode < 200 || responseCode >= 300) ? false : r11) {
bVar = yh.c.f(c3);
str = str6;
} else {
yh.c.b(c3, null, str3, bVar);
if (responseCode == 401 || responseCode == 404) {
try {
str = str6;
Long l = 0L;
String str7 = l == null ? " tokenExpirationTimestamp" : "";
if (str7.isEmpty()) {
bVar = new yh.b(null, l.longValue(), 3);
} else {
str2 = str;
z = true;
c = 2;
try {
throw new IllegalStateException("Missing required properties:".concat(str7));
} catch (IOException | AssertionError unused2) {
continue;
}
}
} catch (IOException | AssertionError unused3) {
str2 = str;
z = true;
c = 2;
c3.disconnect();
TrafficStats.clearThreadStatsTag();
i++;
r11 = z;
c2 = c;
str6 = str2;
bVar = bVar;
}
} else {
if (responseCode == 429) {
throw new e("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) {
try {
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.");
Long l2 = 0L;
String str8 = l2 == null ? " tokenExpirationTimestamp" : "";
if (!str8.isEmpty()) {
throw new IllegalStateException("Missing required properties:".concat(str8));
}
str = str6;
bVar = new yh.b(null, l2.longValue(), 2);
} catch (IOException | AssertionError unused4) {
str = str6;
str2 = str;
z = true;
c = 2;
c3.disconnect();
TrafficStats.clearThreadStatsTag();
i++;
r11 = z;
c2 = c;
str6 = str2;
bVar = bVar;
}
} else {
c = c2;
str2 = str6;
z = true;
c3.disconnect();
TrafficStats.clearThreadStatsTag();
i++;
r11 = z;
c2 = c;
str6 = str2;
bVar = bVar;
}
}
}
c3.disconnect();
TrafficStats.clearThreadStatsTag();
int c4 = l.b.c(bVar.c);
if (c4 == 0) {
k kVar = this.d;
kVar.getClass();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
kVar.a.getClass();
long seconds = timeUnit.toSeconds(System.currentTimeMillis());
a.C0108a c0108a = new a.C0108a(aVar);
c0108a.c = bVar.a;
c0108a.e = Long.valueOf(bVar.b);
c0108a.f = Long.valueOf(seconds);
return c0108a.a();
}
if (c4 == 1) {
a.C0108a h = aVar.h();
h.g = "BAD CONFIG";
h.b(5);
return h.a();
}
if (c4 != 2) {
throw new e(str);
}
j(null);
a.C0108a c0108a2 = new a.C0108a(aVar);
c0108a2.b(2);
return c0108a2.a();
} catch (Throwable th2) {
c3.disconnect();
TrafficStats.clearThreadStatsTag();
throw th2;
}
}
throw new e(str6);
}
public final void d(xh.a aVar) {
synchronized (m) {
pg.e eVar = this.a;
eVar.a();
u a = u.a(eVar.a);
try {
this.c.b(aVar);
} finally {
if (a != null) {
a.b();
}
}
}
}
public final void e() {
pg.e eVar = this.a;
eVar.a();
Preconditions.checkNotEmpty(eVar.c.b, "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.");
eVar.a();
Preconditions.checkNotEmpty(eVar.c.g, "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.");
eVar.a();
Preconditions.checkNotEmpty(eVar.c.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.");
eVar.a();
String str = eVar.c.b;
Pattern pattern = k.c;
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.");
eVar.a();
Preconditions.checkArgument(k.c.matcher(eVar.c.a).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 java.lang.String f(xh.a r3) {
throw new UnsupportedOperationException("Method not decompiled: vh.c.f(xh.a):java.lang.String");
}
public final xh.a g(xh.a aVar) throws e {
int responseCode;
yh.a e;
String str = aVar.b;
String str2 = null;
if (str != null && str.length() == 11) {
xh.b bVar = this.e.get();
synchronized (bVar.a) {
String[] strArr = xh.b.c;
int i = 0;
while (true) {
if (i >= 4) {
break;
}
String str3 = strArr[i];
String string = bVar.a.getString("|T|" + bVar.b + "|" + str3, null);
if (string == null || string.isEmpty()) {
i++;
} else if (string.startsWith("{")) {
try {
str2 = new JSONObject(string).getString(IronSourceConstants.IRONSOURCE_BIDDING_TOKEN_KEY);
} catch (JSONException unused) {
}
} else {
str2 = string;
}
}
}
}
yh.c cVar = this.b;
pg.e eVar = this.a;
eVar.a();
String str4 = eVar.c.a;
String str5 = aVar.b;
pg.e eVar2 = this.a;
eVar2.a();
String str6 = eVar2.c.g;
pg.e eVar3 = this.a;
eVar3.a();
String str7 = eVar3.c.b;
yh.e eVar4 = cVar.c;
if (!eVar4.b()) {
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
URL a = yh.c.a(String.format("projects/%s/installations", str6));
for (int i2 = 0; i2 <= 1; i2++) {
TrafficStats.setThreadStatsTag(32769);
HttpURLConnection c = cVar.c(a, str4);
try {
try {
c.setRequestMethod("POST");
c.setDoOutput(true);
if (str2 != null) {
c.addRequestProperty("x-goog-fis-android-iid-migration-auth", str2);
}
yh.c.g(c, str5, str7);
responseCode = c.getResponseCode();
eVar4.d(responseCode);
} finally {
c.disconnect();
TrafficStats.clearThreadStatsTag();
}
} catch (IOException | AssertionError unused2) {
}
if (responseCode >= 200 && responseCode < 300) {
e = yh.c.e(c);
c.disconnect();
TrafficStats.clearThreadStatsTag();
} else {
yh.c.b(c, str7, str4, str6);
if (responseCode == 429) {
throw new e("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) {
try {
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.");
yh.a aVar2 = new yh.a(null, null, null, null, 2);
c.disconnect();
TrafficStats.clearThreadStatsTag();
e = aVar2;
} catch (IOException | AssertionError unused3) {
}
}
c.disconnect();
TrafficStats.clearThreadStatsTag();
}
int c2 = l.b.c(e.e);
if (c2 != 0) {
if (c2 != 1) {
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
a.C0108a h = aVar.h();
h.g = "BAD CONFIG";
h.b(5);
return h.a();
}
String str8 = e.b;
String str9 = e.c;
k kVar = this.d;
kVar.getClass();
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
kVar.a.getClass();
long seconds = timeUnit.toSeconds(System.currentTimeMillis());
String b = e.d.b();
long c3 = e.d.c();
a.C0108a c0108a = new a.C0108a(aVar);
c0108a.a = str8;
c0108a.b(4);
c0108a.c = b;
c0108a.d = str9;
c0108a.e = Long.valueOf(c3);
c0108a.f = Long.valueOf(seconds);
return c0108a.a();
}
throw new e("Firebase Installations Service is unavailable. Please try again later.");
}
@Override
@NonNull
public final Task<String> getId() {
String str;
e();
synchronized (this) {
str = this.j;
}
if (str != null) {
return Tasks.forResult(str);
}
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
a(new g(taskCompletionSource));
Task<String> task = taskCompletionSource.getTask();
this.h.execute(new com.applovin.exoplayer2.ui.n(this, 22));
return task;
}
@Override
@NonNull
public final Task getToken() {
e();
TaskCompletionSource taskCompletionSource = new TaskCompletionSource();
a(new f(this.d, taskCompletionSource));
Task task = taskCompletionSource.getTask();
this.h.execute(new x4.a(1, this, false));
return task;
}
public final void h(Exception exc) {
synchronized (this.g) {
Iterator it = this.l.iterator();
while (it.hasNext()) {
if (((j) it.next()).a(exc)) {
it.remove();
}
}
}
}
public final void i(xh.a aVar) {
synchronized (this.g) {
Iterator it = this.l.iterator();
while (it.hasNext()) {
if (((j) it.next()).b(aVar)) {
it.remove();
}
}
}
}
public final synchronized void j(String str) {
this.j = str;
}
public final synchronized void k(xh.a aVar, xh.a aVar2) {
if (this.k.size() != 0 && !TextUtils.equals(aVar.b, aVar2.b)) {
Iterator it = this.k.iterator();
while (it.hasNext()) {
((wh.a) it.next()).a();
}
}
}
}