导航菜单

页面标题

页面副标题

Hyouka private v5.8.9 - f.java 源代码

正在查看: Hyouka private v5.8.9 应用的 f.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package d7;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.SharedPreferences;
import java.util.Locale;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicReference;
import org.json.JSONException;
import org.json.JSONObject;
import w6.c0;
import w6.u0;
import w6.x;
import w6.y;
import w6.z;

public class f implements i {

    private final Context f6125a;

    private final j f6126b;

    private final g f6127c;

    private final x f6128d;

    private final d7.a f6129e;

    private final k f6130f;

    private final y f6131g;

    private final AtomicReference<d> f6132h;

    private final AtomicReference<k5.i<d>> f6133i;

    class a implements k5.g<Void, Void> {
        a() {
        }

        public k5.h<Void> a(Void r5) throws Exception {
            JSONObject a2 = f.this.f6130f.a(f.this.f6126b, true);
            if (a2 != null) {
                d b2 = f.this.f6127c.b(a2);
                f.this.f6129e.c(b2.f6110c, a2);
                f.this.q(a2, "Loaded settings: ");
                f fVar = f.this;
                fVar.r(fVar.f6126b.f6141f);
                f.this.f6132h.set(b2);
                ((k5.i) f.this.f6133i.get()).e(b2);
            }
            return k5.k.e((Object) null);
        }
    }

    f(Context context, j jVar, x xVar, g gVar, d7.a aVar, k kVar, y yVar) {
        AtomicReference<d> atomicReference = new AtomicReference<>();
        this.f6132h = atomicReference;
        this.f6133i = new AtomicReference<>(new k5.i());
        this.f6125a = context;
        this.f6126b = jVar;
        this.f6128d = xVar;
        this.f6127c = gVar;
        this.f6129e = aVar;
        this.f6130f = kVar;
        this.f6131g = yVar;
        atomicReference.set(b.b(xVar));
    }

    public static f l(Context context, String str, c0 c0Var, a7.b bVar, String str2, String str3, b7.f fVar, y yVar) {
        String g2 = c0Var.g();
        u0 u0Var = new u0();
        return new f(context, new j(str, c0Var.h(), c0Var.i(), c0Var.j(), c0Var, w6.i.h(w6.i.n(context), str, str3, str2), str3, str2, z.h(g2).j()), u0Var, new g(u0Var), new d7.a(fVar), new c(String.format(Locale.US, "https://firebase-settings.crashlytics.com/spi/v2/platforms/android/gmp/%s/settings", str), bVar), yVar);
    }

    private d m(e eVar) {
        d dVar = null;
        try {
            if (!e.SKIP_CACHE_LOOKUP.equals(eVar)) {
                JSONObject b2 = this.f6129e.b();
                if (b2 != null) {
                    d b3 = this.f6127c.b(b2);
                    if (b3 != null) {
                        q(b2, "Loaded cached settings: ");
                        long a2 = this.f6128d.a();
                        if (!e.IGNORE_CACHE_EXPIRATION.equals(eVar) && b3.a(a2)) {
                            t6.f.f().i("Cached settings have expired.");
                        }
                        try {
                            t6.f.f().i("Returning cached settings.");
                            dVar = b3;
                        } catch (Exception e2) {
                            e = e2;
                            dVar = b3;
                            t6.f.f().e("Failed to get cached settings", e);
                            return dVar;
                        }
                    } else {
                        t6.f.f().e("Failed to parse cached settings data.", null);
                    }
                } else {
                    t6.f.f().b("No cached settings data found.");
                }
            }
        } catch (Exception e3) {
            e = e3;
        }
        return dVar;
    }

    private String n() {
        return w6.i.r(this.f6125a).getString("existing_instance_identifier", "");
    }

    public void q(JSONObject jSONObject, String str) throws JSONException {
        t6.f.f().b(str + jSONObject.toString());
    }

    @SuppressLint({"CommitPrefEdits"})
    public boolean r(String str) {
        SharedPreferences.Editor edit = w6.i.r(this.f6125a).edit();
        edit.putString("existing_instance_identifier", str);
        edit.apply();
        return true;
    }

    @Override
    public k5.h<d> a() {
        return this.f6133i.get().a();
    }

    @Override
    public d b() {
        return this.f6132h.get();
    }

    boolean k() {
        return !n().equals(this.f6126b.f6141f);
    }

    public k5.h<Void> o(e eVar, Executor executor) {
        d m2;
        if (!k() && (m2 = m(eVar)) != null) {
            this.f6132h.set(m2);
            this.f6133i.get().e(m2);
            return k5.k.e((Object) null);
        }
        d m3 = m(e.IGNORE_CACHE_EXPIRATION);
        if (m3 != null) {
            this.f6132h.set(m3);
            this.f6133i.get().e(m3);
        }
        return this.f6131g.i(executor).p(executor, new a());
    }

    public k5.h<Void> p(Executor executor) {
        return o(e.USE_CACHE, executor);
    }
}