Weather Tracker v1.0.0版本的 MD5 值为:3edef27647e42a8ea0e7c0d2dbf56f97
以下内容为反编译后的 TPURLManager.java 源代码,内容仅作参考
package com.tradplus.ads.base.common;
import android.text.TextUtils;
import com.tradplus.ads.base.db.StoreManager;
import com.tradplus.ads.base.network.TPOpenResponse;
import com.tradplus.ads.common.util.LogUtil;
public class TPURLManager {
public static final String AD_CROSSPROPUSH = "/ev";
public static final String AD_ENV = "/api/env";
public static final String AD_HANDLER = "/api/v1_2/adconf";
public static final String AD_PUSH = "/api/v1_2/ev";
public static final String AD_PUSH2 = "/api/v2/ev";
public static final String AD_TEST = "test-";
public static final String BIDDINGHOST = "bidder.tradplusad.com/api/v1/headbidding";
public static final String BIDDINGHOSTCN = "cn-bidder.tradplusad.com/api/v1/headbidding";
public static final String CN_EVENT_HOST = "cn-event.tradplusad.com";
public static final String CN_HOST = "cn-api.tradplusad.com";
public static final String CPCONFIG_HANDLER = "/api/v1_2/crosspro";
public static final String CP_CN_ONLINEHOST = "cn-crosspro-api.tradplusad.com";
public static final String CP_ONLINEHOST = "crosspro-api.tradplusad.com";
public static final String EVENCROSSPROTONLINEHOST = "crosspro-track.tradplusad.com";
public static final String EVENCROSSPROTONLINEHOSTCN = "cn-crosspro-event.tradplusad.com";
public static final String EVENTADXONLINEHOST = "adx-event.tradplusad.com";
public static final String EVENTADXONLINEHOSTCN = "cn-adx-event.tradplusad.com";
public static final String EVENT_HOST = "event.tradplusad.com";
public static final String HOST = "api.tradplusad.com";
public static final String IMP_CALLBACK_HOST = "callback.tradplusad.com/imp";
public static final String IMP_CALLBACK_TEST_HOST = "test-callback.tradplusad.com/imp";
public static final String OPEN_HANDLER = "/api/v1_2/open";
public static final String REWARD_CALLBACK_HOST = "callback.tradplusad.com/reward";
public static final String REWARD_CALLBACK_TEST_HOST = "test-callback.tradplusad.com/reward";
public static final String TTDHOST = "adx.tradplusad.com/ttd/token";
private static TPURLManager instance;
private boolean isCnServer = false;
private TPOpenResponse tpOpenResponse;
public static TPURLManager getInstance() {
if (instance == null) {
synchronized (TPURLManager.class) {
if (instance == null) {
instance = new TPURLManager();
}
}
}
return instance;
}
public String getAdxEventUrl() {
TPOpenResponse tPOpenResponse = this.tpOpenResponse;
String adxev = (tPOpenResponse == null || TextUtils.isEmpty(tPOpenResponse.getAdxev())) ? !this.isCnServer ? TPDataManager.getInstance().isTestMode() ? "https://test-adx-event.tradplusad.com/ev" : "https://adx-event.tradplusad.com/ev" : TPDataManager.getInstance().isTestMode() ? "https://test-cn-adx-event.tradplusad.com/ev" : "https://cn-adx-event.tradplusad.com/ev" : this.tpOpenResponse.getAdxev();
LogUtil.ownShow("url = ".concat(String.valueOf(adxev)));
return adxev;
}
public String getBiddingPostUrl() {
TPOpenResponse tPOpenResponse = this.tpOpenResponse;
String biddingserver = (tPOpenResponse == null || TextUtils.isEmpty(tPOpenResponse.getBiddingserver())) ? !this.isCnServer ? TPDataManager.getInstance().isTestMode() ? "https://test-bidder.tradplusad.com/api/v1/headbidding" : "https://bidder.tradplusad.com/api/v1/headbidding" : TPDataManager.getInstance().isTestMode() ? "https://test-cn-bidder.tradplusad.com/api/v1/headbidding" : "https://cn-bidder.tradplusad.com/api/v1/headbidding" : this.tpOpenResponse.getBiddingserver();
LogUtil.ownShow("url = ".concat(String.valueOf(biddingserver)));
return biddingserver;
}
public String getConfigHost() {
String str = !this.isCnServer ? TPDataManager.getInstance().isTestMode() ? "test-api.tradplusad.com" : HOST : TPDataManager.getInstance().isTestMode() ? "test-cn-api.tradplusad.com" : CN_HOST;
LogUtil.ownShow("url = ".concat(str));
return str;
}
public String getConfigURL() {
TPOpenResponse tPOpenResponse = this.tpOpenResponse;
String confserver = (tPOpenResponse == null || TextUtils.isEmpty(tPOpenResponse.getConfserver())) ? !this.isCnServer ? TPDataManager.getInstance().isTestMode() ? "https://test-api.tradplusad.com/api/v1_2/adconf" : "https://api.tradplusad.com/api/v1_2/adconf" : TPDataManager.getInstance().isTestMode() ? "https://test-cn-api.tradplusad.com/api/v1_2/adconf" : "https://cn-api.tradplusad.com/api/v1_2/adconf" : this.tpOpenResponse.getConfserver();
LogUtil.ownShow("url = ".concat(String.valueOf(confserver)));
return confserver;
}
public String getCrossProEventUrl() {
TPOpenResponse tPOpenResponse = this.tpOpenResponse;
String cpev = (tPOpenResponse == null || TextUtils.isEmpty(tPOpenResponse.getCpev())) ? !this.isCnServer ? TPDataManager.getInstance().isTestMode() ? "https://test-crosspro-track.tradplusad.com/ev" : "https://crosspro-track.tradplusad.com/ev" : TPDataManager.getInstance().isTestMode() ? "https://test-cn-crosspro-event.tradplusad.com/ev" : "https://cn-crosspro-event.tradplusad.com/ev" : this.tpOpenResponse.getCpev();
LogUtil.ownShow("url = ".concat(String.valueOf(cpev)));
return cpev;
}
public String getCrossProHost() {
String str = !this.isCnServer ? TPDataManager.getInstance().isTestMode() ? "test-crosspro-api.tradplusad.com" : CP_ONLINEHOST : TPDataManager.getInstance().isTestMode() ? "test-cn-crosspro-api.tradplusad.com" : CP_CN_ONLINEHOST;
LogUtil.ownShow("url = ".concat(str));
return str;
}
public String getCrossProURL() {
TPOpenResponse tPOpenResponse = this.tpOpenResponse;
String cpserver = (tPOpenResponse == null || TextUtils.isEmpty(tPOpenResponse.getCpserver())) ? !this.isCnServer ? TPDataManager.getInstance().isTestMode() ? "https://test-crosspro-api.tradplusad.com/api/v1_2/crosspro" : "https://crosspro-api.tradplusad.com/api/v1_2/crosspro" : TPDataManager.getInstance().isTestMode() ? "https://test-cn-crosspro-api.tradplusad.com/api/v1_2/crosspro" : "https://cn-crosspro-api.tradplusad.com/api/v1_2/crosspro" : this.tpOpenResponse.getCpserver();
LogUtil.ownShow("url = ".concat(String.valueOf(cpserver)));
return cpserver;
}
public String getImpCallbackHost() {
TPOpenResponse tPOpenResponse = this.tpOpenResponse;
return (tPOpenResponse == null || TextUtils.isEmpty(tPOpenResponse.getImpcallback())) ? TPDataManager.getInstance().isTestMode() ? "https://test-callback.tradplusad.com/imp" : "https://callback.tradplusad.com/imp" : this.tpOpenResponse.getImpcallback();
}
public String getOpenHost() {
String str = !this.isCnServer ? TPDataManager.getInstance().isTestMode() ? "test-api.tradplusad.com" : HOST : TPDataManager.getInstance().isTestMode() ? "test-cn-api.tradplusad.com" : CN_HOST;
LogUtil.ownShow("url = ".concat(str));
return str;
}
public String getOpenUrl() {
String str = !this.isCnServer ? TPDataManager.getInstance().isTestMode() ? "https://test-api.tradplusad.com/api/v1_2/open" : "https://api.tradplusad.com/api/v1_2/open" : TPDataManager.getInstance().isTestMode() ? "https://test-cn-api.tradplusad.com/api/v1_2/open" : "https://cn-api.tradplusad.com/api/v1_2/open";
LogUtil.ownShow("url = ".concat(str));
return str;
}
public String getPrivacyHost() {
return TPDataManager.getInstance().isTestMode() ? "https://test-api.tradplusad.com/api/env" : "https://api.tradplusad.com/api/env";
}
public String getRewardCallbackHost() {
TPOpenResponse tPOpenResponse = this.tpOpenResponse;
return (tPOpenResponse == null || TextUtils.isEmpty(tPOpenResponse.getRewardcallback())) ? TPDataManager.getInstance().isTestMode() ? "https://test-callback.tradplusad.com/reward" : "https://callback.tradplusad.com/reward" : this.tpOpenResponse.getRewardcallback();
}
public String getTPEventUrl() {
TPOpenResponse tPOpenResponse = this.tpOpenResponse;
String ev = (tPOpenResponse == null || TextUtils.isEmpty(tPOpenResponse.getEv())) ? !this.isCnServer ? TPDataManager.getInstance().isTestMode() ? "https://test-event.tradplusad.com/api/v1_2/ev" : "https://event.tradplusad.com/api/v1_2/ev" : TPDataManager.getInstance().isTestMode() ? "https://test-cn-event.tradplusad.com/api/v1_2/ev" : "https://cn-event.tradplusad.com/api/v1_2/ev" : this.tpOpenResponse.getEv();
LogUtil.ownShow("url = ".concat(String.valueOf(ev)));
return ev;
}
public String getTPSimplifyEventUrl() {
TPOpenResponse tPOpenResponse = this.tpOpenResponse;
String ev2 = (tPOpenResponse == null || TextUtils.isEmpty(tPOpenResponse.getEv2())) ? !this.isCnServer ? TPDataManager.getInstance().isTestMode() ? "https://test-event.tradplusad.com/api/v2/ev" : "https://event.tradplusad.com/api/v2/ev" : TPDataManager.getInstance().isTestMode() ? "https://test-cn-event.tradplusad.com/api/v2/ev" : "https://cn-event.tradplusad.com/api/v2/ev" : this.tpOpenResponse.getEv2();
LogUtil.ownShow("url = ".concat(String.valueOf(ev2)));
return ev2;
}
public String getTTDPostUrl() {
TPOpenResponse localTPOpenResponse = StoreManager.getLocalTPOpenResponse(true);
return (localTPOpenResponse == null || TextUtils.isEmpty(localTPOpenResponse.getTtd_token())) ? TPDataManager.getInstance().isTestMode() ? "https://test-adx.tradplusad.com/ttd/token" : "https://adx.tradplusad.com/ttd/token" : localTPOpenResponse.getTtd_token();
}
public boolean isCnServer() {
return this.isCnServer;
}
public void setCnServer(boolean z) {
this.isCnServer = z;
}
public void setTPOpenResponse(TPOpenResponse tPOpenResponse) {
this.tpOpenResponse = tPOpenResponse;
}
}