导航菜单

页面标题

页面副标题

Empower MX v1.29.4.340 - CrossPromotionHelper.java 源代码

正在查看: Empower MX v1.29.4.340 应用的 CrossPromotionHelper.java JAVA 源代码文件

本页面展示 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.AFb1tSDK;
import com.appsflyer.internal.AFd1gSDK;
import com.appsflyer.internal.AFf1qSDK;
import com.appsflyer.internal.AFf1uSDK;
import com.appsflyer.internal.AFh1sSDK;
import com.appsflyer.internal.AFk1sSDK;
import com.appsflyer.internal.AFk1wSDK;
import java.util.HashMap;
import java.util.Map;
import l1.DbQ.HJUbApXMMTwViB;

public class CrossPromotionHelper {
    private static String getCurrencyIso4217Code = "https://%simpression.%s";

    private static void getRevenue(String str, Context context, AFk1sSDK aFk1sSDK) {
        AFb1tSDK currencyIso4217Code = AFb1tSDK.getCurrencyIso4217Code();
        currencyIso4217Code.getCurrencyIso4217Code(context);
        AFd1gSDK AFAdRevenueData = currencyIso4217Code.AFAdRevenueData();
        AFf1qSDK aFf1qSDK = new AFf1qSDK(AFAdRevenueData, str, aFk1sSDK);
        AFf1uSDK copy = AFAdRevenueData.copy();
        copy.getCurrencyIso4217Code.execute(new AFf1uSDK.3(copy, aFf1qSDK));
    }

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

    public static void logCrossPromoteImpression(Context context, String str, String str2) {
        logCrossPromoteImpression(context, str, str2, 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) {
                AFk1wSDK.getCurrencyIso4217Code = value;
            } else if (c == 1) {
                getCurrencyIso4217Code = value;
            }
        }
    }

    public static void logAndOpenStore(Context context, String str, String str2, Map<String, String> map) {
        LinkGenerator revenue = getRevenue(context, str, str2, map, String.format(AFk1wSDK.getCurrencyIso4217Code, AppsFlyerLib.getInstance().getHostPrefix(), AFb1tSDK.getCurrencyIso4217Code().getHostName()));
        if (AppsFlyerProperties.getInstance().getBoolean("waitForCustomerId", false)) {
            AFLogger.INSTANCE.i(AFh1sSDK.AFInAppEventParameterName, "CustomerUserId not set, track And Open Store is disabled", true);
            return;
        }
        if (AppsFlyerLib.getInstance().isStopped()) {
            AFLogger.INSTANCE.i(AFh1sSDK.AFInAppEventParameterName, "SDK is stopped, track And Open Store is disabled", true);
            return;
        }
        if (map == null) {
            map = new HashMap<>();
        }
        map.put("af_campaign", str2);
        AppsFlyerLib.getInstance().logEvent(context, "af_cross_promotion", map);
        getRevenue(revenue.generateLink(), context, new AFk1sSDK(context));
    }

    public static void logCrossPromoteImpression(Context context, String str, String str2, Map<String, String> map) {
        if (AppsFlyerProperties.getInstance().getBoolean("waitForCustomerId", false)) {
            AFLogger.INSTANCE.i(AFh1sSDK.AFInAppEventParameterName, "CustomerUserId not set, Promote Impression is disabled", true);
        } else if (AppsFlyerLib.getInstance().isStopped()) {
            AFLogger.INSTANCE.i(AFh1sSDK.AFInAppEventParameterName, HJUbApXMMTwViB.sxqb, true);
        } else {
            getRevenue(getRevenue(context, str, str2, map, String.format(getCurrencyIso4217Code, AppsFlyerLib.getInstance().getHostPrefix(), AFb1tSDK.getCurrencyIso4217Code().getHostName())).generateLink(), context, null);
        }
    }

    private static LinkGenerator getRevenue(Context context, String str, String str2, Map<String, String> map, String str3) {
        LinkGenerator linkGenerator = new LinkGenerator("af_cross_promotion");
        linkGenerator.getMediationNetwork = str3;
        linkGenerator.getCurrencyIso4217Code = str;
        linkGenerator.addParameter("af_siteid", context.getPackageName());
        if (str2 != null) {
            linkGenerator.setCampaign(str2);
        }
        if (map != null) {
            linkGenerator.addParameters(map);
        }
        return linkGenerator;
    }
}