//
// Created by KaiWeiCai on 2022/1/27.
//

#include "comm_map.h"
#include "tool_kit.h"
#include "params_kit.h"
CommMap::CommMap() = default;
CommMap::~CommMap() = default;

CommMap *CommMap::GetInstance() {
    static CommMap instance;
    return &instance;
}

void CommMap::Init(JNIEnv *env, jobject context) {
    comm_params["game_code"] = ToolKit::GetGameCode(env,context);
    comm_params["gcp_code"] = ParamsKit::GetGcpCode(env,context);
    comm_params["cs_ver"] = ToolKit::GetClientVersion(env,context);
    comm_params["system"] = "android";
    comm_params["device_ver"] = ToolKit::GetDeviceSoftwareVersion();
    comm_params["sp_code"] = ToolKit::GetSpCode(env,context);
    comm_params["device_model"] = ToolKit::GetDeviceModel();
    comm_params["package_name"] = ToolKit::GetPackageName(env,context);
    comm_params["android_id"] = ToolKit::GetAndroidDeviceId(env,context);
}