Stick Squad 3 v1.2.5.9版本的 MD5 值为:375cf7f77a7075270cd68d1397368279

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


package com.fusepowered.nx.common;

import com.apptracker.android.util.AppConstants;
import com.fusepowered.m2.common.Constants;
import com.fusepowered.nx.common.JsonRequestConstants;
import com.fusepowered.nx.monetization.manager.MonetizationSharedDataManager;
import java.util.HashMap;
import java.util.Map;

public final class ServerConfig {
    private static final String PRODUCTION_SERVER_DOMAIN = "appclick.co";
    private static final String TEST_HOST_NAME = "nativex-sdk-testapi.appspot.com";
    private static String serverUrl = null;
    private static boolean isTestEndPointEnabled = false;

    public static final String applyConfiguration(String url, boolean https) {
        String urlToApply = serverUrl;
        if (urlToApply == null) {
            urlToApply = "http://appclick.co/";
        }
        if (https && urlToApply.equals("http://appclick.co/")) {
            urlToApply = "https://appclick.co/";
        }
        if (isTestEndPointEnabled) {
            urlToApply = "http://nativex-sdk-testapi.appspot.com/";
        }
        if (!url.startsWith(urlToApply)) {
            url = urlToApply + url;
        }
        Map<String, String> params = new HashMap<>();
        params.put(JsonRequestConstants.UniversalQueryParameters.APP_ID, MonetizationSharedDataManager.getAppId());
        return Utilities.appendParamsToUrl(url, params);
    }

    public static void setTestEndpointEnabled(boolean enabled) {
        isTestEndPointEnabled = enabled;
    }

    public static final String applyHttp(String url, boolean https) {
        if (!url.startsWith(Constants.HTTP)) {
            if (https) {
                return "https://" + url;
            }
            return AppConstants.f88y + url;
        }
        return url;
    }
}