package K.K.ʬ;

import ai.advance.event.GuardianEvents;
import android.content.Context;
import android.hardware.Camera;
import org.json.JSONException;
import org.json.JSONObject;
import K.K.K.ʬ.C2369;
import K.K.K.ʬ.C2371;

/* renamed from: K.K.ʬ.ῲ  reason: contains not printable characters */
public abstract class AbstractC2357 extends GuardianEvents {

    /* renamed from: ᨨ  reason: contains not printable characters */
    public long f8169;

    /* renamed from: ⁱ  reason: contains not printable characters */
    public JSONObject f8170;

    /* renamed from: 㿎  reason: contains not printable characters */
    public boolean f8171 = false;

    public AbstractC2357(Context context, String str, String str2) {
        super(context, str, str2, "event");
        this.f46 = System.currentTimeMillis();
        m6183("customer_user_id", C2369.f8187);
        m6183("appName", m6177(context));
        m6183("coreJarVersion", "2.6.1");
        m6183("front_camera_id", Integer.valueOf(C2369.m6275()));
        m6183("back_camera_id", Integer.valueOf(C2369.m6291()));
        m6183("camera_numbers", Integer.valueOf(Camera.getNumberOfCameras()));
    }

    /* renamed from: K  reason: contains not printable characters */
    public static synchronized String m6177(Context context) {
        String string;
        synchronized (AbstractC2357.class) {
            try {
                string = context.getResources().getString(context.getPackageManager().getPackageInfo(context.getPackageName(), 0).applicationInfo.labelRes);
            } catch (Exception e) {
                e.printStackTrace();
                return null;
            }
        }
        return string;
    }

    /* renamed from: ʬ  reason: contains not printable characters */
    public abstract String m6178();

    /* renamed from: ඓ  reason: contains not printable characters */
    public abstract String m6179();

    @Override // ai.advance.event.GuardianEvents
    @Deprecated
    /* renamed from: K  reason: contains not printable characters */
    public JSONObject m6180(JSONObject jSONObject) {
        return super.m57(jSONObject);
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m6181(int i) {
        m6183("camera_angle", Integer.valueOf(i));
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m6182(Camera.Size size) {
        JSONObject jSONObject = this.f8170;
        if (jSONObject == null || !jSONObject.has("camera_preview_size")) {
            m6183("camera_preview_size", size.width + "*" + size.height);
            m6183("screen_size", C2371.f8205 + "*" + C2371.f8203);
        }
    }

    /* renamed from: K  reason: contains not printable characters */
    public void m6183(String str, Object obj) {
        if (this.f8170 == null) {
            this.f8170 = new JSONObject();
        }
        try {
            this.f8170.putOpt(str, obj);
        } catch (JSONException unused) {
        }
    }

    /* renamed from: 㸾  reason: contains not printable characters */
    public abstract String m6184();
}
