package p138.p176.p291.p296.p297.p310;

import java.util.Locale;
import org.json.JSONException;
import org.json.JSONObject;
import p138.p176.p291.p296.p297.p299.C5692;
import p138.p176.p291.p296.p297.p310.p311.C5864;
import p138.p176.p291.p296.p297.p310.p311.C5865;
import p138.p176.p291.p296.p297.p310.p311.C5866;
import p138.p176.p291.p296.p297.p310.p311.C5868;

/* JADX INFO: renamed from: ދ.ހ.ށ.ބ.ށ.ޏ.ޅ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C5862 implements InterfaceC5861 {
    @Override // p138.p176.p291.p296.p297.p310.InterfaceC5861
    /* JADX INFO: renamed from: ֏ */
    public C5868 mo9202(C5692 c5692, JSONObject jSONObject) throws JSONException {
        long jCurrentTimeMillis;
        int iOptInt = jSONObject.optInt("settings_version", 0);
        int iOptInt2 = jSONObject.optInt("cache_duration", 3600);
        JSONObject jSONObject2 = jSONObject.getJSONObject("fabric");
        JSONObject jSONObject3 = jSONObject.getJSONObject("app");
        String string = jSONObject3.getString("status");
        boolean zEquals = "new".equals(string);
        String string2 = jSONObject2.getString("bundle_id");
        C5864 c5864 = new C5864(string, zEquals ? "=" : String.format(Locale.US, "=", string2), String.format(Locale.US, "=", string2), String.format(Locale.US, "=", string2), string2, jSONObject2.getString("org_id"), jSONObject3.optBoolean("update_required", false), jSONObject3.optInt("report_upload_variant", 0), jSONObject3.optInt("native_report_upload_variant", 0));
        C5866 c5866 = new C5866(8, 4);
        C5865 c5865 = new C5865(jSONObject.getJSONObject("features").optBoolean("collect_reports", true));
        long j = iOptInt2;
        if (jSONObject.has("expires_at")) {
            jCurrentTimeMillis = jSONObject.optLong("expires_at");
        } else {
            if (c5692 == null) {
                throw null;
            }
            jCurrentTimeMillis = (j * 1000) + System.currentTimeMillis();
        }
        return new C5868(jCurrentTimeMillis, c5864, c5866, c5865, iOptInt, iOptInt2);
    }
}
