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

import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
import p138.p139.p143.p144.C2803;
import p138.p176.p291.p296.p297.C5608;
import p138.p176.p291.p296.p297.p299.AbstractC5621;
import p138.p176.p291.p296.p297.p299.C5627;
import p138.p176.p291.p296.p297.p299.C5685;
import p138.p176.p291.p296.p297.p303.C5819;
import p138.p176.p291.p296.p297.p303.C5820;
import p138.p176.p291.p296.p297.p303.C5821;
import p138.p176.p291.p296.p297.p303.EnumC5818;
import p138.p176.p291.p296.p297.p310.p311.C5869;

/* JADX INFO: renamed from: ދ.ހ.ށ.ބ.ށ.ޏ.އ.ހ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class C5872 extends AbstractC5621 implements InterfaceC5873 {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public C5608 f16628;

    /* JADX WARN: Illegal instructions before constructor call */
    public C5872(String str, String str2, C5820 c5820) {
        EnumC5818 enumC5818 = EnumC5818.GET;
        C5608 c5608 = C5608.f16066;
        super(str, str2, c5820, enumC5818);
        this.f16628 = c5608;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final Map<String, String> m9212(C5869 c5869) {
        HashMap map = new HashMap();
        map.put("build_version", c5869.f16625);
        map.put("display_version", c5869.f16624);
        map.put("source", Integer.toString(c5869.f16626));
        String str = c5869.f16623;
        if (!C5627.m9004(str)) {
            map.put("instance", str);
        }
        return map;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public JSONObject m9213(C5821 c5821) {
        int i = c5821.f16509;
        this.f16628.m8972("Settings result was: " + i);
        if (!(i == 200 || i == 201 || i == 202 || i == 203)) {
            C5608 c5608 = this.f16628;
            StringBuilder sbM4889 = C2803.m4889("Failed to retrieve settings from ");
            sbM4889.append(this.f16093);
            c5608.m8975(sbM4889.toString());
            return null;
        }
        String str = c5821.f16510;
        try {
            return new JSONObject(str);
        } catch (Exception e) {
            C5608 c56082 = this.f16628;
            StringBuilder sbM48892 = C2803.m4889("Failed to parse settings JSON from ");
            sbM48892.append(this.f16093);
            c56082.m8973(sbM48892.toString(), e);
            C2803.m4892("Settings response ", str, this.f16628);
            return null;
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final C5819 m9214(C5819 c5819, C5869 c5869) {
        m9215(c5819, "X-CRASHLYTICS-GOOGLE-APP-ID", c5869.f16618);
        m9215(c5819, "X-CRASHLYTICS-API-CLIENT-TYPE", "android");
        m9215(c5819, "X-CRASHLYTICS-API-CLIENT-VERSION", "17.0.0");
        m9215(c5819, "Accept", "application/json");
        m9215(c5819, "X-CRASHLYTICS-DEVICE-MODEL", c5869.f16619);
        m9215(c5819, "X-CRASHLYTICS-OS-BUILD-VERSION", c5869.f16620);
        m9215(c5819, "X-CRASHLYTICS-OS-DISPLAY-VERSION", c5869.f16621);
        m9215(c5819, "X-CRASHLYTICS-INSTALLATION-ID", ((C5685) c5869.f16622).m9056());
        return c5819;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m9215(C5819 c5819, String str, String str2) {
        if (str2 != null) {
            c5819.f16507.put(str, str2);
        }
    }
}
