iKredit v1.2.0.3版本的 MD5 值为:2c00c5c79eecbd6be4c3c546c28d778d
以下内容为反编译后的 e.java 源代码,内容仅作参考
package com.bqs.risk.df.android.h;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import android.text.TextUtils;
import com.android.sdklibrary.model.AppInfo;
import com.android.sdklibrary.utils.RSAUtilForAndroid;
import com.bqs.risk.df.android.BqsDF;
import com.bqs.risk.df.android.BqsParams;
import com.bqs.risk.df.android.a.f;
import com.bqs.risk.df.android.c.c;
import com.bqs.risk.df.android.i.g;
import com.bqs.risk.df.android.i.k;
import com.facebook.appevents.codeless.internal.Constants;
import org.json.JSONObject;
public class e extends Thread {
private Handler a = new Handler(Looper.getMainLooper()) {
@Override
public void handleMessage(Message message) {
String str;
super.handleMessage(message);
if (message.what == 1) {
str = "状态提交成功";
} else {
Bundle data = message.getData();
if (data == null) {
return;
}
str = "状态提交失败 code:" + data.getString("code") + " desc:" + data.getString("desc");
}
g.b(str);
}
};
private f b;
private Context c;
public e(f fVar, Context context) {
this.b = fVar;
this.c = context;
}
private void a() {
JSONObject jSONObject = new JSONObject();
jSONObject.put("tokenKey", BqsDF.getInstance().getTokenKey());
jSONObject.put("clientKey", BqsDF.getInstance().getClientKey());
jSONObject.put("platform", Constants.PLATFORM);
jSONObject.put("sdkVersion", "2.3.2");
BqsParams params = BqsDF.getInstance().getParams();
String str = "https://df.baiqishi.com/webdf/device/uploadStatus";
if (params != null) {
boolean isTestingEnv = params.isTestingEnv();
if (!k.a(params.getStatusUploadUrl())) {
str = params.getDeviceInfoUploadUrl();
} else if (isTestingEnv) {
str = "https://dfst.baiqishi.com/webdf/device/uploadStatus";
}
jSONObject.put("partnerId", params.getPartnerId() + "");
}
jSONObject.put(AppInfo.COLUMNNAME_APPNAME, com.bqs.risk.df.android.i.a.b(this.c));
jSONObject.put(AppInfo.COLUMNNAME_APPPACKAGENAME, com.bqs.risk.df.android.i.a.a(this.c));
jSONObject.put("appVersion", com.bqs.risk.df.android.i.a.c(this.c));
String fVar = this.b.toString();
g.b("提交状态信息:tokenkey=" + BqsDF.getInstance().getTokenKey() + " statusInfo=" + fVar);
c.a a = com.bqs.risk.df.android.c.c.a(fVar);
jSONObject.put("status", a.a());
jSONObject.put("ignoreIndex", a.c());
g.b("SubmitStatusInfoTask url=" + str + " params=" + jSONObject.toString());
JSONObject jSONObject2 = null;
String str2 = null;
for (int i = 0; i < 2; i++) {
try {
str2 = com.bqs.risk.df.android.e.b.a((CharSequence) str).j().d("application/json", RSAUtilForAndroid.CHARSET).b(35000).a(35000).b((CharSequence) jSONObject.toString()).d();
} catch (Exception e) {
g.a(e);
}
g.b("SubmitStatusInfoTask jsonStr=" + str2);
if (!k.b(str2)) {
try {
jSONObject2 = new JSONObject(str2);
} catch (Exception e2) {
g.a(e2);
}
}
if (jSONObject2 != null) {
break;
}
}
g.b("submit result=" + jSONObject2);
Message obtainMessage = this.a.obtainMessage();
if (jSONObject2 == null) {
g.b("状态提交失败");
Bundle bundle = new Bundle();
bundle.putString("code", "RDFS-1");
bundle.putString("desc", "状态提交失败");
obtainMessage.setData(bundle);
this.a.sendMessage(obtainMessage);
return;
}
String optString = jSONObject2.optString("resultCode");
String optString2 = jSONObject2.optString("resultDesc");
JSONObject optJSONObject = jSONObject2.optJSONObject("resultData");
if (!TextUtils.equals(optString, "RDFS0000")) {
Bundle bundle2 = new Bundle();
bundle2.putString("code", optString);
bundle2.putString("desc", optString2);
obtainMessage.setData(bundle2);
this.a.sendMessage(obtainMessage);
g.a(optString2);
return;
}
g.b("状态提交成功");
int optInt = optJSONObject != null ? optJSONObject.optInt("upInterval") : 0;
com.bqs.risk.df.android.b.a.e = System.currentTimeMillis();
if (optInt <= 0) {
optInt = 600000;
}
com.bqs.risk.df.android.b.a.d = optInt;
this.a.sendEmptyMessage(1);
}
@Override
public void run() {
super.run();
try {
a();
} catch (Exception unused) {
Message obtainMessage = this.a.obtainMessage();
Bundle bundle = new Bundle();
bundle.putString("code", "RDFS-1");
bundle.putString("desc", "状态提交失败");
obtainMessage.setData(bundle);
this.a.sendMessage(obtainMessage);
}
}
}