正在查看: FileWipe Pro v3.0.0 应用的 TPURLManager.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: FileWipe Pro v3.0.0 应用的 TPURLManager.java JAVA 源代码文件
本页面展示 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 BACK_UP_HOST = "api.tpvisim.com";
public static final String BACK_UP_HOST_MSG = "https://api.tpvisim.com/api/v1_2/open";
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 NETDISK_HOST = "https://tp-picture-hk.oss-cn-hongkong.aliyuncs.com/open_api/open_api.json";
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 TPOpenResponse tpOpenResponse;
private boolean isCnServer = false;
private boolean useBackup = false;
public static TPURLManager getInstance() {
if (instance == null) {
synchronized (TPURLManager.class) {
try {
if (instance == null) {
instance = new TPURLManager();
}
} finally {
}
}
}
return instance;
}
public String getAdxEventUrl() {
TPOpenResponse tPOpenResponse;
TPOpenResponse tPOpenResponse2 = this.tpOpenResponse;
String adxev = ((tPOpenResponse2 == null || TextUtils.isEmpty(tPOpenResponse2.getAdxev()) || !this.useBackup || this.isCnServer) && ((tPOpenResponse = this.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 = " + adxev);
return adxev;
}
public String getBiddingPostUrl() {
TPOpenResponse tPOpenResponse;
TPOpenResponse tPOpenResponse2 = this.tpOpenResponse;
String biddingserver = ((tPOpenResponse2 == null || TextUtils.isEmpty(tPOpenResponse2.getBiddingserver()) || !this.useBackup || this.isCnServer) && ((tPOpenResponse = this.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 = " + 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;
TPOpenResponse tPOpenResponse2 = this.tpOpenResponse;
String confserver = ((tPOpenResponse2 == null || TextUtils.isEmpty(tPOpenResponse2.getConfserver()) || !this.useBackup || this.isCnServer) && ((tPOpenResponse = this.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 = " + confserver);
return confserver;
}
public String getCrossProEventUrl() {
TPOpenResponse tPOpenResponse;
TPOpenResponse tPOpenResponse2 = this.tpOpenResponse;
String cpev = ((tPOpenResponse2 == null || TextUtils.isEmpty(tPOpenResponse2.getCpev()) || !this.useBackup || this.isCnServer) && ((tPOpenResponse = this.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 = " + 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;
TPOpenResponse tPOpenResponse2 = this.tpOpenResponse;
String cpserver = ((tPOpenResponse2 == null || TextUtils.isEmpty(tPOpenResponse2.getCpserver()) || !this.useBackup || this.isCnServer) && ((tPOpenResponse = this.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 = " + cpserver);
return cpserver;
}
public String getImpCallbackHost() {
TPOpenResponse tPOpenResponse;
TPOpenResponse tPOpenResponse2 = this.tpOpenResponse;
return ((tPOpenResponse2 == null || TextUtils.isEmpty(tPOpenResponse2.getImpcallback()) || !this.useBackup || this.isCnServer) && ((tPOpenResponse = this.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(boolean z) {
String str = !this.isCnServer ? z ? BACK_UP_HOST_MSG : 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;
TPOpenResponse tPOpenResponse2 = this.tpOpenResponse;
return ((tPOpenResponse2 == null || TextUtils.isEmpty(tPOpenResponse2.getRewardcallback()) || !this.useBackup || this.isCnServer) && ((tPOpenResponse = this.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;
TPOpenResponse tPOpenResponse2 = this.tpOpenResponse;
String ev = ((tPOpenResponse2 == null || TextUtils.isEmpty(tPOpenResponse2.getEv()) || !this.useBackup || this.isCnServer) && ((tPOpenResponse = this.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 = " + ev);
return ev;
}
public String getTPSimplifyEventUrl() {
TPOpenResponse tPOpenResponse;
TPOpenResponse tPOpenResponse2 = this.tpOpenResponse;
String ev2 = ((tPOpenResponse2 == null || TextUtils.isEmpty(tPOpenResponse2.getEv2()) || !this.useBackup || this.isCnServer) && ((tPOpenResponse = this.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 = " + 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, boolean z) {
this.tpOpenResponse = tPOpenResponse;
this.useBackup = z;
}
}