正在查看: FanCode v7.24.0 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: FanCode v7.24.0 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package sg;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import androidx.annotation.NonNull;
import com.google.android.gms.tasks.SuccessContinuation;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.android.gms.tasks.Tasks;
import com.newrelic.agent.android.instrumentation.Instrumented;
import com.newrelic.agent.android.instrumentation.JSONObjectInstrumentation;
import java.util.Locale;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicReference;
import lg.c0;
import lg.s0;
import lg.w;
import lg.x;
import lg.y;
import org.json.JSONException;
import org.json.JSONObject;
@Instrumented
public class f implements i {
private final Context a;
private final j b;
private final g c;
private final w d;
private final sg.a e;
private final k f;
private final x g;
private final AtomicReference<d> h;
private final AtomicReference<TaskCompletionSource<d>> i;
class a implements SuccessContinuation<Void, Void> {
a() {
}
@Override
@NonNull
public Task<Void> then(Void r5) throws Exception {
JSONObject a = f.this.f.a(f.this.b, true);
if (a != null) {
d b = f.this.c.b(a);
f.this.e.c(b.c, a);
f.this.q(a, "Loaded settings: ");
f fVar = f.this;
fVar.r(fVar.b.f);
f.this.h.set(b);
((TaskCompletionSource) f.this.i.get()).trySetResult(b);
}
return Tasks.forResult(null);
}
}
f(Context context, j jVar, w wVar, g gVar, sg.a aVar, k kVar, x xVar) {
AtomicReference<d> atomicReference = new AtomicReference<>();
this.h = atomicReference;
this.i = new AtomicReference<>(new TaskCompletionSource());
this.a = context;
this.b = jVar;
this.d = wVar;
this.c = gVar;
this.e = aVar;
this.f = kVar;
this.g = xVar;
atomicReference.set(b.b(wVar));
}
public static f l(Context context, String str, c0 c0Var, pg.b bVar, String str2, String str3, qg.g gVar, x xVar) {
String g = c0Var.g();
s0 s0Var = new s0();
return new f(context, new j(str, c0Var.h(), c0Var.i(), c0Var.j(), c0Var, lg.i.h(lg.i.m(context), str, str3, str2), str3, str2, y.i(g).k()), s0Var, new g(s0Var), new sg.a(gVar), new c(String.format(Locale.US, "https://firebase-settings.crashlytics.com/spi/v2/platforms/android/gmp/%s/settings", str), bVar), xVar);
}
private d m(e eVar) {
d dVar = null;
try {
if (!e.SKIP_CACHE_LOOKUP.equals(eVar)) {
JSONObject b = this.e.b();
if (b != null) {
d b2 = this.c.b(b);
if (b2 != null) {
q(b, "Loaded cached settings: ");
long a2 = this.d.a();
if (!e.IGNORE_CACHE_EXPIRATION.equals(eVar) && b2.a(a2)) {
ig.g.f().i("Cached settings have expired.");
}
try {
ig.g.f().i("Returning cached settings.");
dVar = b2;
} catch (Exception e) {
e = e;
dVar = b2;
ig.g.f().e("Failed to get cached settings", e);
return dVar;
}
} else {
ig.g.f().e("Failed to parse cached settings data.", null);
}
} else {
ig.g.f().b("No cached settings data found.");
}
}
} catch (Exception e2) {
e = e2;
}
return dVar;
}
private String n() {
return lg.i.q(this.a).getString("existing_instance_identifier", "");
}
public void q(JSONObject jSONObject, String str) throws JSONException {
ig.g f = ig.g.f();
StringBuilder sb = new StringBuilder();
sb.append(str);
sb.append(!(jSONObject instanceof JSONObject) ? jSONObject.toString() : JSONObjectInstrumentation.toString(jSONObject));
f.b(sb.toString());
}
@SuppressLint({"CommitPrefEdits"})
public boolean r(String str) {
SharedPreferences.Editor edit = lg.i.q(this.a).edit();
edit.putString("existing_instance_identifier", str);
edit.apply();
return true;
}
@Override
public Task<d> a() {
return this.i.get().getTask();
}
@Override
public d b() {
return this.h.get();
}
boolean k() {
return !n().equals(this.b.f);
}
public Task<Void> o(Executor executor) {
return p(e.USE_CACHE, executor);
}
public Task<Void> p(e eVar, Executor executor) {
d m;
if (!k() && (m = m(eVar)) != null) {
this.h.set(m);
this.i.get().trySetResult(m);
return Tasks.forResult(null);
}
d m2 = m(e.IGNORE_CACHE_EXPIRATION);
if (m2 != null) {
this.h.set(m2);
this.i.get().trySetResult(m2);
}
return this.g.k(executor).onSuccessTask(executor, new a());
}
}