Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9

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


package com.appsflyer.share;

import android.content.Context;
import androidx.annotation.NonNull;
import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.internal.AFb1vSDK;
import com.appsflyer.internal.AFd1nSDK;
import com.appsflyer.internal.AFe1dSDK;
import com.appsflyer.internal.AFf1sSDK;
import com.appsflyer.internal.AFg1hSDK;
import com.appsflyer.internal.AFj1ySDK;
import com.appsflyer.internal.AFj1zSDK;
import java.util.HashMap;
import java.util.Map;
public class CrossPromotionHelper {
    private static String AFKeystoreWrapper = "https://%simpression.%s";

    private static void AFKeystoreWrapper(@NonNull String str, @NonNull Context context, AFj1ySDK aFj1ySDK) {
        AFb1vSDK valueOf = AFb1vSDK.valueOf();
        valueOf.AFInAppEventType(context);
        AFd1nSDK AFInAppEventType = valueOf.AFInAppEventType();
        AFf1sSDK aFf1sSDK = new AFf1sSDK(AFInAppEventType, str, aFj1ySDK);
        AFe1dSDK w = AFInAppEventType.w();
        w.values.execute(new AFe1dSDK.AnonymousClass4(aFf1sSDK));
    }

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

    public static void logAndOpenStore(@NonNull Context context, String str, String str2, Map<String, String> map) {
        LinkGenerator values = values(context, str, str2, map, String.format(AFj1zSDK.AFInAppEventParameterName, AppsFlyerLib.getInstance().getHostPrefix(), AFb1vSDK.valueOf().getHostName()));
        if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false)) {
            AFLogger.INSTANCE.i(AFg1hSDK.CROSS_PROMOTION, "CustomerUserId not set, track And Open Store is disabled", true);
        } else if (AppsFlyerLib.getInstance().isStopped()) {
            AFLogger.INSTANCE.i(AFg1hSDK.CROSS_PROMOTION, "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);
            AFKeystoreWrapper(values.generateLink(), context, new AFj1ySDK(context));
        }
    }

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

    public static void logCrossPromoteImpression(@NonNull Context context, String str, String str2, Map<String, String> map) {
        if (AppsFlyerProperties.getInstance().getBoolean(AppsFlyerProperties.AF_WAITFOR_CUSTOMERID, false)) {
            AFLogger.INSTANCE.i(AFg1hSDK.CROSS_PROMOTION, "CustomerUserId not set, Promote Impression is disabled", true);
        } else if (AppsFlyerLib.getInstance().isStopped()) {
            AFLogger.INSTANCE.i(AFg1hSDK.CROSS_PROMOTION, "SDK is stopped, Promote Impression is disabled", true);
        } else {
            AFKeystoreWrapper(values(context, str, str2, map, String.format(AFKeystoreWrapper, AppsFlyerLib.getInstance().getHostPrefix(), AFb1vSDK.valueOf().getHostName())).generateLink(), context, null);
        }
    }

    public static void setUrl(Map<String, String> map) {
        char c;
        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")) {
                    c = 1;
                }
                c = 65535;
            } else {
                if (key.equals("app")) {
                    c = 0;
                }
                c = 65535;
            }
            if (c == 0) {
                AFj1zSDK.AFInAppEventParameterName = value;
            } else if (c == 1) {
                AFKeystoreWrapper = value;
            }
        }
    }

    @NonNull
    private static LinkGenerator values(@NonNull 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;
    }
}