整点视频 v3.3.0版本的 MD5 值为:cba0457dc37421eed445b30f92de25d3
以下内容为反编译后的 MQSDK.java 源代码,内容仅作参考
package com.moqi.sdk;
import android.app.ActivityManager;
import android.app.Application;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import android.os.Process;
import android.text.TextUtils;
import com.bytedance.sdk.openadsdk.TTAdSdk;
import com.bytedance.sdk.openadsdk.downloadnew.core.TTDownloadField;
import com.moqi.sdk.http.c;
import com.moqi.sdk.model.MoQiAd;
import com.moqi.sdk.utils.d0;
import com.moqi.sdk.utils.g;
import com.moqi.sdk.utils.i;
import com.moqi.sdk.utils.j;
import com.moqi.sdk.utils.u;
import com.moqi.sdk.utils.z;
import com.moqi.sdk.videocache.h;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONObject;
public class MQSDK {
public static Application application;
private static MQSDK c;
private com.moqi.sdk.a a;
private h b;
public String pkgname;
public String appid = "";
public String appKey = "";
public Handler handler = new Handler(Looper.getMainLooper());
public List<MoQiAd> downloadADs = new ArrayList();
public String app_sex = "";
public String app_age = "";
public String app_extras = "";
public class a implements c.j {
a() {
}
@Override
public void onFail(int i, String str) {
}
@Override
public void onOtherAd(String str) {
}
@Override
public void onSuccess(Object... objArr) {
JSONObject jSONObject = (JSONObject) objArr[0];
String optString = jSONObject.optString("csjAppId");
String optString2 = jSONObject.optString("taobao");
d.T = jSONObject.optInt("bantime");
d.U = jSONObject.optInt("fulltime");
d.V = jSONObject.optString("tdlogo");
i.a(MQSDK.application, optString2);
d0.a((Context) MQSDK.application, d0.c, (Object) jSONObject.optString("cdnbaseurl"));
u.a("dfsdfdsfsdfsdf getCdnRes " + d0.a(MQSDK.application));
if (f.b()) {
com.moqi.sdk.i.b.b(MQSDK.application, optString);
if (TTAdSdk.getAdManager().getSDKVersion().equals("4.3.0.6")) {
return;
}
com.moqi.sdk.i.a.b(optString);
}
}
}
private MQSDK() {
}
private h a() {
return new h.b(application).a(10).a(new z()).a();
}
private String a(Context context) {
String str;
List<ActivityManager.RunningAppProcessInfo> runningAppProcesses = ((ActivityManager) context.getSystemService(TTDownloadField.TT_ACTIVITY)).getRunningAppProcesses();
if (runningAppProcesses == null) {
return null;
}
for (ActivityManager.RunningAppProcessInfo runningAppProcessInfo : runningAppProcesses) {
if (runningAppProcessInfo.pid == Process.myPid() && (str = runningAppProcessInfo.processName) != null) {
return str;
}
}
return null;
}
private void a(String str) {
if (str.length() <= 1) {
return;
}
threeAppId(application, str, new a());
}
public static MQSDK getInstance() {
synchronized (MQSDK.class) {
if (c == null) {
MQSDK mqsdk = new MQSDK();
c = mqsdk;
mqsdk.a = com.moqi.sdk.http.c.a();
}
}
return c;
}
public static h getProxy(Context context) {
if (getInstance().b == null) {
MQSDK mqsdk = getInstance();
h a2 = getInstance().a();
mqsdk.b = a2;
return a2;
}
return getInstance().b;
}
public void adStat(String str, int i, int i2, int i3, JSONObject jSONObject, int i4, String str2, String str3, String str4, String str5) {
this.a.a(str, i, i2, i3, jSONObject, i4, str2, str3, str4, str5);
}
public void getDrawNativeAd(Context context, String str, int i, c.j jVar) {
this.a.d(context, str, i, jVar);
}
public void getScreenAd(Context context, String str, int i, c.j jVar) {
this.a.a(context, str, i, jVar);
}
public void initSdk(Application application2, String str, String str2) {
com.moqi.sdk.utils.j0.a.b();
if (application2 == null) {
throw new RuntimeException("the context is null !!");
}
if (TextUtils.isEmpty(str)) {
throw new RuntimeException("appid must not be empty !!");
}
if (TextUtils.isEmpty(str2)) {
throw new RuntimeException("appKey must not be empty !!");
}
application = application2;
this.appid = str;
this.appKey = str2;
this.pkgname = application2.getPackageName();
if (application2.getPackageName().equals(a(application2))) {
this.a.a(application2);
}
g.a().a(application);
com.moqi.sdk.h.b.a(application);
com.moqi.sdk.receiver.a.a();
a(str);
com.moqi.sdk.http.b.a().a(application2, str);
j.a(application2);
}
public void reqBannerAd(Context context, String str, int i, c.j jVar) {
this.a.f(context, str, i, jVar);
}
public void reqDrawNaturalAd(Context context, String str, c.j jVar) {
this.a.a(context, str, jVar);
}
public void reqFullScreenAd(Context context, String str, int i, c.j jVar) {
this.a.h(context, str, i, jVar);
}
public void reqNaturalAd(Context context, String str, int i, c.j jVar) {
this.a.g(context, str, i, jVar);
}
public void reqRewardAd(Context context, String str, int i, c.j jVar) {
this.a.c(context, str, i, jVar);
}
public void reqScreenAd(Context context, String str, int i, c.j jVar) {
this.a.e(context, str, i, jVar);
}
public void reqSplashAd(Context context, String str, int i, c.j jVar) {
this.a.b(context, str, i, jVar);
}
public void resetAPI() {
a(this.appid);
com.moqi.sdk.http.b.a().a(application, this.appid);
}
public void setExtras(String str, String str2, String str3) {
if (str == null || !str.equals("1") || !str.equals("2")) {
str = com.czhj.sdk.common.Constants.FAIL;
}
this.app_sex = str;
if (TextUtils.isEmpty(str2)) {
this.app_age = "";
} else {
this.app_age = str2;
}
if (TextUtils.isEmpty(str3)) {
this.app_extras = "";
} else {
this.app_extras = str3;
}
}
public void threeAppId(Context context, String str, c.j jVar) {
this.a.b(context, str, jVar);
}
public void threeReport(Context context, String str, int i, String str2, String str3, int i2, String str4, String str5) {
this.a.a(context, str, i, str2, str3, i2, str4, str5);
}
}