Free Fire v1.103.1版本的 MD5 值为:f6c45f9f1485263aa5af0fb400f973fc

以下内容为反编译后的 CrossPromotionHelper.java 源代码,内容仅作参考


package com.appsflyer.share;

import android.content.Context;
import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.internal.AFa1aSDK;
import com.appsflyer.internal.AFb1nSDK;
import com.appsflyer.internal.AFc1eSDK;
import com.appsflyer.internal.AFc1lSDK;
import com.appsflyer.internal.AFc1xSDK;
import com.appsflyer.internal.AFe1hSDK;
import java.util.HashMap;
import java.util.Map;
public class CrossPromotionHelper {
    private static String AFInAppEventType = "https://%simpression.%s";

    private static LinkGenerator AFInAppEventParameterName(Context context, String str, String str2, Map<String, String> map, String str3) {
        LinkGenerator linkGenerator = new LinkGenerator("af_cross_promotion");
        linkGenerator.AFInAppEventParameterName = str3;
        linkGenerator.AFInAppEventType = str;
        linkGenerator.addParameter("af_siteid", context.getPackageName());
        if (str2 != null) {
            linkGenerator.setCampaign(str2);
        }
        if (map != null) {
            linkGenerator.addParameters(map);
        }
        String string = AppsFlyerProperties.getInstance().getString("advertiserId");
        if (string != null) {
            linkGenerator.addParameter("advertising_id", string);
        }
        return linkGenerator;
    }

    private static void AFInAppEventType(String str, Context context, AFb1nSDK aFb1nSDK) {
        AFa1aSDK values = AFa1aSDK.values();
        values.AFInAppEventParameterName(context);
        AFc1xSDK AFInAppEventParameterName = values.AFInAppEventParameterName();
        AFc1eSDK aFc1eSDK = new AFc1eSDK(AFInAppEventParameterName, str, aFb1nSDK);
        AFc1lSDK afRDLog = AFInAppEventParameterName.afRDLog();
        afRDLog.AFKeystoreWrapper.execute(new AFc1lSDK.AnonymousClass4(aFc1eSDK));
    }

    public static void logAndOpenStore(Context context, String str, String str2) {
        logAndOpenStore(context, str, str2, null);
    }

    public static void logAndOpenStore(Context context, String str, String str2, Map<String, String> map) {
        LinkGenerator AFInAppEventParameterName = AFInAppEventParameterName(context, str, str2, map, String.format(AFe1hSDK.AFInAppEventParameterName, AppsFlyerLib.getInstance().getHostPrefix(), AFa1aSDK.values().getHostName()));
        if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false)) {
            AFLogger.afInfoLog("CustomerUserId not set, track And Open Store is disabled", true);
        } else if (AppsFlyerLib.getInstance().isStopped()) {
            AFLogger.afInfoLog("SDK is stopped, track And Open Store is disabled", true);
        } else {
            if (map == null) {
                map = new HashMap<>();
            }
            map.put("af_campaign", str2);
            AppsFlyerLib.getInstance().logEvent(context, "af_cross_promotion", map);
            AFInAppEventType(AFInAppEventParameterName.generateLink(), context, new AFb1nSDK(context));
        }
    }

    public static void logCrossPromoteImpression(Context context, String str, String str2) {
        logCrossPromoteImpression(context, str, str2, null);
    }

    public static void logCrossPromoteImpression(Context context, String str, String str2, Map<String, String> map) {
        if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false)) {
            AFLogger.afInfoLog("CustomerUserId not set, Promote Impression is disabled", true);
        } else if (AppsFlyerLib.getInstance().isStopped()) {
            AFLogger.afInfoLog("SDK is stopped, Promote Impression is disabled", true);
        } else {
            AFInAppEventType(AFInAppEventParameterName(context, str, str2, map, String.format(AFInAppEventType, AppsFlyerLib.getInstance().getHostPrefix(), AFa1aSDK.values().getHostName())).generateLink(), context, null);
        }
    }

    public static void setUrl(Map<String, String> map) {
        char c10;
        for (Map.Entry<String, String> entry : map.entrySet()) {
            String value = entry.getValue();
            String key = entry.getKey();
            int hashCode = key.hashCode();
            if (hashCode != 96801) {
                if (hashCode == 120623625 && key.equals("impression")) {
                    c10 = 1;
                }
                c10 = 65535;
            } else {
                if (key.equals("app")) {
                    c10 = 0;
                }
                c10 = 65535;
            }
            if (c10 == 0) {
                AFe1hSDK.AFInAppEventParameterName = value;
            } else if (c10 == 1) {
                AFInAppEventType = value;
            }
        }
    }
}