导航菜单

页面标题

页面副标题

CashVia v1.6.02 - CrossPromotionHelper.java 源代码

正在查看: CashVia v1.6.02 应用的 CrossPromotionHelper.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.appsflyer.share;

import android.content.Context;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.appsflyer.AFLogger;
import com.appsflyer.AppsFlyerLib;
import com.appsflyer.AppsFlyerProperties;
import com.appsflyer.internal.AFb1rSDK;
import com.appsflyer.internal.AFd1fSDK;
import com.appsflyer.internal.AFe1aSDK;
import com.appsflyer.internal.AFe1aSDK.AnonymousClass4;
import com.appsflyer.internal.AFf1oSDK;
import com.appsflyer.internal.AFg1bSDK;
import com.appsflyer.internal.AFj1mSDK;
import com.appsflyer.internal.AFj1nSDK;
import java.util.HashMap;
import java.util.Map;

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

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

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

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

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

    private static void valueOf(@NonNull String str, @NonNull Context context, @Nullable AFj1nSDK aFj1nSDK) {
        AFb1rSDK AFInAppEventParameterName = AFb1rSDK.AFInAppEventParameterName();
        AFInAppEventParameterName.valueOf(context);
        AFd1fSDK AFInAppEventType = AFInAppEventParameterName.AFInAppEventType();
        AFf1oSDK aFf1oSDK = new AFf1oSDK(AFInAppEventType, str, aFj1nSDK);
        AFe1aSDK w2 = AFInAppEventType.w();
        w2.AFInAppEventParameterName.execute(w2.new AnonymousClass4(aFf1oSDK));
    }

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

    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(AFg1bSDK.CROSS_PROMOTION, "CustomerUserId not set, Promote Impression is disabled", true);
        } else if (AppsFlyerLib.getInstance().isStopped()) {
            AFLogger.INSTANCE.i(AFg1bSDK.CROSS_PROMOTION, "SDK is stopped, Promote Impression is disabled", true);
        } else {
            valueOf(AFKeystoreWrapper(context, str, str2, map, String.format(valueOf, AppsFlyerLib.getInstance().getHostPrefix(), AFb1rSDK.AFInAppEventParameterName().getHostName())).generateLink(), context, null);
        }
    }
}