what-the-bank/sources/com/huawei/hms/support/hianalytics/HiAnalyticsInnerClient.java

39 lines
2.1 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.huawei.hms.support.hianalytics;
import android.content.Context;
import android.text.TextUtils;
import com.huawei.hms.common.internal.ResponseHeader;
import com.huawei.hms.common.internal.TransactionIdCreater;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import com.huawei.hms.utils.Util;
import java.util.Map;
/* loaded from: classes2.dex */
public class HiAnalyticsInnerClient extends HiAnalyticsBase {
public static void reportEntryClient(Context context, String str, String str2, String str3, String str4) {
Map<String, String> mapForBi = HiAnalyticsBase.getMapForBi(context, str);
mapForBi.put(HiAnalyticsConstant.HaKey.BI_KEY_APPID, str2);
if (TextUtils.isEmpty(str3)) {
str3 = TransactionIdCreater.getId(str2, str);
}
mapForBi.put(HiAnalyticsConstant.HaKey.BI_KEY_TRANSID, str3);
mapForBi.put(HiAnalyticsConstant.HaKey.BI_KEY_DIRECTION, HiAnalyticsConstant.Direction.REQUEST);
if (!TextUtils.isEmpty(str4)) {
mapForBi.put("version", HiAnalyticsUtil.versionCodeToName(str4));
}
mapForBi.put(HiAnalyticsConstant.HaKey.BI_KEY_PHONETYPE, Util.getSystemProperties("ro.logsystem.usertype", ""));
HiAnalyticsUtil.getInstance().onNewEvent(context, HiAnalyticsConstant.HMS_SDK_BASE_API_CALLED, mapForBi);
}
public static void reportEntryExit(Context context, ResponseHeader responseHeader, String str) {
HiAnalyticsUtil.getInstance();
Map<String, String> mapFromRequestHeader = HiAnalyticsUtil.getMapFromRequestHeader(responseHeader);
mapFromRequestHeader.put(HiAnalyticsConstant.HaKey.BI_KEY_DIRECTION, HiAnalyticsConstant.Direction.RESPONSE);
if (!TextUtils.isEmpty(str)) {
mapFromRequestHeader.put("version", HiAnalyticsUtil.versionCodeToName(str));
}
mapFromRequestHeader.put(HiAnalyticsConstant.HaKey.BI_KEY_PHONETYPE, Util.getSystemProperties("ro.logsystem.usertype", ""));
HiAnalyticsUtil.getInstance().onNewEvent(context, HiAnalyticsConstant.HMS_SDK_BASE_API_CALLED, mapFromRequestHeader);
}
}