OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 e.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.ui.search;
import android.content.Context;
import android.text.TextUtils;
import com.excelliance.kxqp.bean.AppExtraBean;
import com.excelliance.kxqp.bitmap.bean.RankingItem;
import com.excelliance.kxqp.gs.discover.model.CDNData;
import com.excelliance.kxqp.gs.discover.model.ResourceType;
import com.excelliance.kxqp.gs.discover.model.ResponseData;
import com.excelliance.kxqp.gs.discover.model.UploadWrap;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.ui.search.d;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.cn;
import com.excelliance.kxqp.gs.util.w;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import org.json.JSONException;
import org.json.JSONObject;
public class e extends com.excelliance.kxqp.task.base.b<d.a> {
private final com.excelliance.kxqp.gs.ui.nyactivitys.b f11132b;
public e(Context context) {
super(context);
this.f11132b = new com.excelliance.kxqp.gs.ui.nyactivitys.b();
}
public void a(final String str, final String str2, final String str3, final String str4) {
az.d(this.f13171a, "submit: ");
tp.f(new Runnable() {
@Override
public void run() {
if (e.this.getContext() != null) {
e.this.f11132b.execute(new Runnable() {
@Override
public void run() {
e.this.c().d();
}
});
ResponseData a2 = e.this.a(str2);
az.d(e.this.f13171a, "uploadImageResponse:" + a2);
int i = a2.code;
JSONObject i2 = cn.i(e.this.getContext());
try {
i2.put("name", str);
i2.put(RankingItem.KEY_ICON, a2.data);
i2.put("otherurl", str3);
i2.put("qq", str4);
i2.put("phone", "");
i2.put(AppExtraBean.KEY_AREA, "");
} catch (JSONException e) {
e.printStackTrace();
}
final ResponseData a3 = new com.excelliance.kxqp.gs.discover.bbs.c(e.this.getContext()).a(i2.toString(), "https://api.ourplay.com.cn/rank/report", new com.excelliance.kxqp.gs.discover.a.c<Object>() {
@Override
public ResponseData<Object> a(String str5) {
try {
return (ResponseData) new Gson().a(str5, new TypeToken<ResponseData<Object>>() {
}.getType());
} catch (Exception e2) {
az.d(e.this.f13171a, "ex:" + e2.getMessage());
e2.printStackTrace();
return null;
}
}
});
e.this.f11132b.execute(new Runnable() {
@Override
public void run() {
if (e.this.c() == null) {
return;
}
if (a3 != null && a3.code == 0) {
e.this.c().a((d.a) true);
} else {
e.this.c().a(a3 == null ? w.e(e.this.getContext(), "server_busy") : a3.msg);
}
e.this.c().e();
}
});
}
}
});
}
public ResponseData<String> a(String str) {
ResponseData<String> responseData = new ResponseData<>();
if (TextUtils.isEmpty(str)) {
responseData.code = -1;
responseData.msg = "this image path is null";
return responseData;
}
ResponseData<UploadWrap> a2 = com.excelliance.kxqp.gs.discover.user.d.a(getContext()).a();
az.d(this.f13171a, "uploadImage: " + a2);
com.excelliance.kxqp.gs.discover.bbs.b a3 = com.excelliance.kxqp.gs.discover.bbs.b.a(getContext());
if (!TextUtils.isEmpty(str)) {
if (a2.code == 0) {
UploadWrap uploadWrap = a2.data;
ResponseData<CDNData> a4 = a3.a(ResourceType.PIC_JPG, uploadWrap.token, uploadWrap.upload, str);
az.d(this.f13171a, "imageUploadResponse:" + a2);
if (a4.code == 0) {
responseData.data = uploadWrap.domain + a4.data.key;
} else {
responseData.data = "";
responseData.msg = "image upload to qiniu error";
az.d(this.f13171a, "error:" + a4.msg);
}
responseData.code = a4.code;
} else {
responseData.data = "";
responseData.msg = "get cdn token error";
responseData.code = -1;
}
}
return responseData;
}
}