Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f

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


package com.adcolony.sdk;

import android.content.Context;
import android.util.Log;
import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import com.schibsted.shared.events.util.ApplicationInfo;
import com.tapjoy.TapjoyConstants;
import com.unity3d.ads.metadata.MediationMetaData;
import com.vungle.warren.model.ReportDBAdapter;
import java.util.Locale;
import org.json.JSONObject;

public class AdColonyAppOptions {
    public static final String ADMARVEL = "AdMarvel";
    public static final String ADMOB = "AdMob";
    public static final String ADOBEAIR = "Adobe AIR";
    public static final String AERSERVE = "AerServe";

    @Deprecated
    public static final int ALL = 2;
    public static final String APPODEAL = "Appodeal";
    public static final String CCPA = "CCPA";
    public static final String COCOS2DX = "Cocos2d-x";
    public static final String COPPA = "COPPA";
    public static final String CORONA = "Corona";
    public static final String FUSEPOWERED = "Fuse Powered";
    public static final String FYBER = "Fyber";
    public static final String GDPR = "GDPR";
    public static final String IRONSOURCE = "ironSource";

    @Deprecated
    public static final int LANDSCAPE = 1;
    public static final String MOPUB = "MoPub";

    @Deprecated
    public static final int PORTRAIT = 0;

    @Deprecated
    public static final int SENSOR = 2;
    public static final String UNITY = "Unity";

    private String f23415a = "";

    private f1 f23416b = new f1();

    private AdColonyUserMetadata f23417c;

    public AdColonyAppOptions() {
        setOriginStore("google");
    }

    public static AdColonyAppOptions getMoPubAppOptions(@NonNull String str) {
        AdColonyAppOptions mediationNetwork = new AdColonyAppOptions().setMediationNetwork(MOPUB, "unknown");
        if (str != null && !str.isEmpty()) {
            for (String str2 : str.split(",")) {
                String[] split = str2.split(ApplicationInfo.URN_SEPP);
                if (split.length == 2) {
                    String str3 = split[0];
                    str3.hashCode();
                    if (!str3.equals("store")) {
                        if (!str3.equals(MediationMetaData.KEY_VERSION)) {
                            Log.e("AdColonyMoPub", "AdColony client options in wrong format - please check your MoPub dashboard");
                            return mediationNetwork;
                        }
                        mediationNetwork.setAppVersion(split[1]);
                    } else {
                        mediationNetwork.setOriginStore(split[1]);
                    }
                } else {
                    Log.e("AdColonyMoPub", "AdColony client options not recognized - please check your MoPub dashboard");
                    return null;
                }
            }
        }
        return mediationNetwork;
    }

    public AdColonyAppOptions a(String str) {
        if (str == null) {
            return this;
        }
        this.f23415a = str;
        c0.a(this.f23416b, "app_id", str);
        return this;
    }

    public f1 b() {
        return this.f23416b;
    }

    public int getAppOrientation() {
        return c0.a(this.f23416b, "app_orientation", -1);
    }

    public String getAppVersion() {
        return c0.h(this.f23416b, TapjoyConstants.TJC_APP_VERSION_NAME);
    }

    @Deprecated
    public String getGDPRConsentString() {
        return c0.h(this.f23416b, "consent_string");
    }

    @Deprecated
    public boolean getGDPRRequired() {
        return c0.b(this.f23416b, "gdpr_required");
    }

    public boolean getIsChildDirectedApp() {
        return c0.b(this.f23416b, "is_child_directed");
    }

    public boolean getKeepScreenOn() {
        return c0.b(this.f23416b, "keep_screen_on");
    }

    public JSONObject getMediationInfo() {
        f1 b11 = c0.b();
        c0.a(b11, "name", c0.h(this.f23416b, "mediation_network"));
        c0.a(b11, MediationMetaData.KEY_VERSION, c0.h(this.f23416b, "mediation_network_version"));
        return b11.a();
    }

    public boolean getMultiWindowEnabled() {
        return c0.b(this.f23416b, "multi_window_enabled");
    }

    public Object getOption(@NonNull String str) {
        return c0.g(this.f23416b, str);
    }

    public String getOriginStore() {
        return c0.h(this.f23416b, "origin_store");
    }

    public JSONObject getPluginInfo() {
        f1 b11 = c0.b();
        c0.a(b11, "name", c0.h(this.f23416b, TapjoyConstants.TJC_PLUGIN));
        c0.a(b11, MediationMetaData.KEY_VERSION, c0.h(this.f23416b, "plugin_version"));
        return b11.a();
    }

    public String getPrivacyConsentString(@NonNull String str) {
        return c0.h(this.f23416b, str.toLowerCase(Locale.ENGLISH) + "_consent_string");
    }

    public boolean getPrivacyFrameworkRequired(@NonNull String str) {
        return c0.b(this.f23416b, str.toLowerCase(Locale.ENGLISH) + "_required");
    }

    @Deprecated
    public int getRequestedAdOrientation() {
        return c0.a(this.f23416b, "orientation", -1);
    }

    public boolean getTestModeEnabled() {
        return c0.b(this.f23416b, "test_mode");
    }

    public String getUserID() {
        return c0.h(this.f23416b, ReportDBAdapter.ReportColumns.COLUMN_USER_ID);
    }

    @Deprecated
    public AdColonyUserMetadata getUserMetadata() {
        return this.f23417c;
    }

    public boolean isPrivacyFrameworkRequiredSet(@NonNull String str) {
        return this.f23416b.a(str.toLowerCase(Locale.ENGLISH) + "_required");
    }

    public AdColonyAppOptions setAppOrientation(@IntRange(from = 0, to = 2) int i11) {
        setOption("app_orientation", i11);
        return this;
    }

    public AdColonyAppOptions setAppVersion(@NonNull String str) {
        setOption(TapjoyConstants.TJC_APP_VERSION_NAME, str);
        return this;
    }

    @Deprecated
    public AdColonyAppOptions setGDPRConsentString(@NonNull String str) {
        c0.a(this.f23416b, "consent_string", str);
        return this;
    }

    @Deprecated
    public AdColonyAppOptions setGDPRRequired(boolean z11) {
        setOption("gdpr_required", z11);
        return this;
    }

    public AdColonyAppOptions setIsChildDirectedApp(boolean z11) {
        setOption("is_child_directed", z11);
        return this;
    }

    public AdColonyAppOptions setKeepScreenOn(boolean z11) {
        c0.b(this.f23416b, "keep_screen_on", z11);
        return this;
    }

    public AdColonyAppOptions setMediationNetwork(@NonNull String str, @NonNull String str2) {
        c0.a(this.f23416b, "mediation_network", str);
        c0.a(this.f23416b, "mediation_network_version", str2);
        return this;
    }

    public AdColonyAppOptions setMultiWindowEnabled(boolean z11) {
        c0.b(this.f23416b, "multi_window_enabled", z11);
        return this;
    }

    public AdColonyAppOptions setOption(@NonNull String str, boolean z11) {
        c0.b(this.f23416b, str, z11);
        return this;
    }

    public AdColonyAppOptions setOriginStore(@NonNull String str) {
        setOption("origin_store", str);
        return this;
    }

    public AdColonyAppOptions setPlugin(@NonNull String str, @NonNull String str2) {
        c0.a(this.f23416b, TapjoyConstants.TJC_PLUGIN, str);
        c0.a(this.f23416b, "plugin_version", str2);
        return this;
    }

    public AdColonyAppOptions setPrivacyConsentString(@NonNull String str, @NonNull String str2) {
        c0.a(this.f23416b, str.toLowerCase(Locale.ENGLISH) + "_consent_string", str2);
        return this;
    }

    public AdColonyAppOptions setPrivacyFrameworkRequired(@NonNull String str, boolean z11) {
        setOption(str.toLowerCase(Locale.ENGLISH) + "_required", z11);
        return this;
    }

    @Deprecated
    public AdColonyAppOptions setRequestedAdOrientation(@IntRange(from = 0, to = 2) int i11) {
        setOption("orientation", i11);
        return this;
    }

    public AdColonyAppOptions setTestModeEnabled(boolean z11) {
        c0.b(this.f23416b, "test_mode", z11);
        return this;
    }

    public AdColonyAppOptions setUserID(@NonNull String str) {
        setOption(ReportDBAdapter.ReportColumns.COLUMN_USER_ID, str);
        return this;
    }

    @Deprecated
    public AdColonyAppOptions setUserMetadata(@NonNull AdColonyUserMetadata adColonyUserMetadata) {
        this.f23417c = adColonyUserMetadata;
        c0.a(this.f23416b, "user_metadata", adColonyUserMetadata.f23461b);
        return this;
    }

    public void b(@NonNull Context context) {
        a(context);
        Boolean g11 = this.f23416b.g("use_forced_controller");
        if (g11 != null) {
            l.H = g11.booleanValue();
        }
        if (this.f23416b.f("use_staging_launch_server")) {
            k.Z = "https://adc3-launch-staging.adcolony.com/v4/launch";
        }
        String b11 = z0.b(context, "IABUSPrivacy_String");
        String b12 = z0.b(context, "IABTCF_TCString");
        int a11 = z0.a(context, "IABTCF_gdprApplies");
        if (b11 != null) {
            c0.a(this.f23416b, "ccpa_consent_string", b11);
        }
        if (b12 != null) {
            c0.a(this.f23416b, "gdpr_consent_string", b12);
        }
        if (a11 == 0 || a11 == 1) {
            c0.b(this.f23416b, "gdpr_required", a11 == 1);
        }
    }

    public AdColonyAppOptions setOption(@NonNull String str, double d11) {
        c0.a(this.f23416b, str, d11);
        return this;
    }

    public String a() {
        return this.f23415a;
    }

    public AdColonyAppOptions setOption(@NonNull String str, @NonNull String str2) {
        c0.a(this.f23416b, str, str2);
        return this;
    }

    private void a(@NonNull Context context) {
        setOption("bundle_id", z0.d(context));
    }
}