OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.excelliance.game.collection.repository;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.excean.bytedancebi.manager.BiManager;
import com.excelliance.game.collection.bean.CollectionBannerBean;
import com.excelliance.game.collection.bean.CollectionCategoryBean;
import com.excelliance.game.collection.bean.CollectionCommentBean;
import com.excelliance.game.collection.bean.CollectionCreateBean;
import com.excelliance.game.collection.bean.CollectionDetailBean;
import com.excelliance.game.collection.bean.CollectionMineBean;
import com.excelliance.game.collection.bean.CollectionSearchRecommendBean;
import com.excelliance.game.collection.e.h;
import com.excelliance.game.collection.e.i;
import com.excelliance.kxqp.gs.util.by;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.umeng.analytics.pro.am;
import java.util.Collection;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class a {
private static boolean f1998a;
private static final String f1999b;
private static final String c;
private static final String d;
private static final String e;
private static final String f;
private static final String g;
private static final String h;
private static final String i;
private static final String j;
private static final String k;
private static final String l;
private static final String m;
private static final String n;
private static final String o;
private static final String p;
private static final String q;
private static final String r;
private static final String s;
private static final String t;
private static final String u;
private static a v;
private Context w;
private Gson x = new Gson();
private b y;
static {
f1999b = f1998a ? "http://10.0.0.97:8083/" : "https://api.ourplay.com.cn/";
c = f1999b + "/gamelist/create";
d = f1999b + "/gamelist/mylist";
e = f1999b + "/gamelist/collect";
f = f1999b + "/gamelist/like";
g = f1999b + "/gamelist/add";
h = f1999b + "/gamelist/collectlist";
i = f1999b + "v1/gamelist/detail";
j = f1999b + "/gamelist/update";
k = f1999b + "/gamelist/remove";
l = f1999b + "/gamelist/updateapp";
m = f1999b + "/gamelist/complaintreasons";
n = f1999b + "/gamelist/complaint";
o = f1999b + "/gamelist/commentlist";
p = f1999b + "/gamelist/comment";
q = f1999b + "/gamelist/recommend";
r = f1999b + "/gamelist/banner";
s = f1999b + "/gamelist/index";
t = f1999b + "/gamelist/cmtlike";
u = f1999b + "/gamelist/cmtdel";
}
public static a a(Context context) {
if (v == null) {
synchronized (a.class) {
if (v == null) {
v = new a(context.getApplicationContext());
}
}
}
return v;
}
private a(Context context) {
this.w = context.getApplicationContext();
this.y = new b(context.getApplicationContext());
}
public ResponseData<CollectionCreateBean> a(String str, int i2) {
JSONObject b2 = b(this.w);
try {
b2.put("title", str);
b2.put("privacy", i2);
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), c, new c<CollectionCreateBean>() {
@Override
public ResponseData<CollectionCreateBean> a(String str2) {
return (ResponseData) a.this.x.a(str2, new TypeToken<ResponseData<CollectionCreateBean>>() {
}.getType());
}
});
}
public ResponseData<List<CollectionMineBean>> a() {
return this.y.a(b(this.w).toString(), d, new c<List<CollectionMineBean>>() {
@Override
public ResponseData<List<CollectionMineBean>> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<List<CollectionMineBean>>>() {
}.getType());
}
});
}
public ResponseData<List<CollectionMineBean>> b() {
return this.y.a(b(this.w).toString(), h, new c<List<CollectionMineBean>>() {
@Override
public ResponseData<List<CollectionMineBean>> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<List<CollectionMineBean>>>() {
}.getType());
}
});
}
public ResponseData<CollectionDetailBean> a(long j2) {
JSONObject b2 = b(this.w);
try {
b2.put("id", j2);
if (com.excelliance.game.collection.router.a.a.f2040a.isSplitSupport()) {
b2.put("supportMulti", "1");
}
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), i, new c<CollectionDetailBean>() {
@Override
public ResponseData<CollectionDetailBean> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<CollectionDetailBean>>() {
}.getType());
}
});
}
public ResponseData<Object> a(long j2, boolean z) {
JSONObject b2 = b(this.w);
try {
b2.put("listid", j2);
b2.put("cancel", z ? 1 : 0);
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), e, new c<Object>() {
@Override
public ResponseData<Object> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<Object>>() {
}.getType());
}
});
}
public ResponseData<Object> b(long j2, boolean z) {
JSONObject b2 = b(this.w);
try {
b2.put("id", j2);
b2.put("cancel", z ? 1 : 0);
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), f, new c<Object>() {
@Override
public ResponseData<Object> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<Object>>() {
}.getType());
}
});
}
public ResponseData<Object> a(long j2, List<Long> list) {
JSONObject b2 = b(this.w);
try {
b2.put("appid", j2);
b2.put("list", new JSONArray((Collection) list));
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), g, new c<Object>() {
@Override
public ResponseData<Object> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<Object>>() {
}.getType());
}
});
}
public ResponseData<Object> a(long j2, String str, String str2, String str3, Integer num) {
JSONObject b2 = b(this.w);
try {
b2.put("id", j2);
if (!TextUtils.isEmpty(str)) {
b2.put("titleimg", str);
}
if (!TextUtils.isEmpty(str2)) {
b2.put("title", str2);
}
if (!TextUtils.isEmpty(str3)) {
b2.put("intro", str3);
}
if (num != null) {
b2.put("privacy", num);
}
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), j, new c<Object>() {
@Override
public ResponseData<Object> a(String str4) {
return (ResponseData) a.this.x.a(str4, new TypeToken<ResponseData<Object>>() {
}.getType());
}
});
}
public ResponseData<Object> b(long j2) {
JSONObject b2 = b(this.w);
try {
b2.put("id", j2);
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), k, new c<Object>() {
@Override
public ResponseData<Object> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<Object>>() {
}.getType());
}
});
}
public ResponseData<Object> b(long j2, List<Integer> list) {
JSONObject b2 = b(this.w);
try {
b2.put("id", j2);
b2.put("apps", new JSONArray((Collection) list));
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), l, new c<Object>() {
@Override
public ResponseData<Object> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<Object>>() {
}.getType());
}
});
}
public ResponseData<List<String>> c() {
return this.y.a(b(this.w).toString(), m, new c<List<String>>() {
@Override
public ResponseData<List<String>> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<List<String>>>() {
}.getType());
}
});
}
public ResponseData<Object> a(long j2, long j3, String str, String str2) {
JSONObject b2 = b(this.w);
try {
b2.put("id", j2);
if (j3 > 0) {
b2.put("cid", j3);
}
b2.put("title", str);
b2.put("content", str2);
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), n, new c<Object>() {
@Override
public ResponseData<Object> a(String str3) {
return (ResponseData) a.this.x.a(str3, new TypeToken<ResponseData<Object>>() {
}.getType());
}
});
}
public ResponseData<List<CollectionCommentBean>> a(long j2, int i2, int i3) {
JSONObject b2 = b(this.w);
try {
b2.put("id", j2);
b2.put("page", i2);
b2.put("pageSize", i3);
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), o, new c<List<CollectionCommentBean>>() {
@Override
public ResponseData<List<CollectionCommentBean>> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<List<CollectionCommentBean>>>() {
}.getType());
}
});
}
public ResponseData<Object> a(long j2, String str, long j3) {
JSONObject b2 = b(this.w);
try {
b2.put("id", j2);
if (j3 > 0) {
b2.put("reply", j3);
}
b2.put("content", str);
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), p, new c<Object>() {
@Override
public ResponseData<Object> a(String str2) {
return (ResponseData) a.this.x.a(str2, new TypeToken<ResponseData<Object>>() {
}.getType());
}
});
}
public ResponseData<List<CollectionSearchRecommendBean>> a(List<String> list) {
JSONObject b2 = b(this.w);
try {
b2.put("pkgs", new JSONArray((Collection) list));
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), q, new c<List<CollectionSearchRecommendBean>>() {
@Override
public ResponseData<List<CollectionSearchRecommendBean>> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<List<CollectionSearchRecommendBean>>>() {
}.getType());
}
});
}
public ResponseData<List<CollectionBannerBean>> d() {
return this.y.a(b(this.w).toString(), r, new c<List<CollectionBannerBean>>() {
@Override
public ResponseData<List<CollectionBannerBean>> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<List<CollectionBannerBean>>>() {
}.getType());
}
});
}
public ResponseData<List<CollectionCategoryBean>> a(int i2, int i3, int i4) {
JSONObject b2 = b(this.w);
try {
b2.put("type", i2);
b2.put("page", i3);
b2.put("pageSize", i4);
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), s, new c<List<CollectionCategoryBean>>() {
@Override
public ResponseData<List<CollectionCategoryBean>> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<List<CollectionCategoryBean>>>() {
}.getType());
}
});
}
public ResponseData<Object> c(long j2, boolean z) {
JSONObject b2 = b(this.w);
try {
b2.put("id", j2);
b2.put("cancel", z ? 1 : 0);
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), t, new c<Object>() {
@Override
public ResponseData<Object> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<Object>>() {
}.getType());
}
});
}
public ResponseData<Object> c(long j2) {
JSONObject b2 = b(this.w);
try {
b2.put("id", j2);
} catch (JSONException e2) {
e2.printStackTrace();
}
return this.y.a(b2.toString(), u, new c<Object>() {
@Override
public ResponseData<Object> a(String str) {
return (ResponseData) a.this.x.a(str, new TypeToken<ResponseData<Object>>() {
}.getType());
}
});
}
private JSONObject b(Context context) {
String e2 = com.excelliance.kxqp.util.a.b.e(context);
String c2 = com.excelliance.kxqp.util.a.b.c(context);
String d2 = com.excelliance.kxqp.util.a.b.d(context);
String packageName = context.getPackageName();
String a2 = com.excelliance.kxqp.util.a.b.a();
String k2 = com.excelliance.kxqp.util.a.b.k(context);
int compVersion = com.excelliance.kxqp.util.a.a.getCompVersion(context);
int mainVersion = com.excelliance.kxqp.util.a.a.getMainVersion(context);
int oTAVersion = com.excelliance.kxqp.util.a.a.getOTAVersion(context);
int mainChId = com.excelliance.kxqp.util.a.a.getMainChId(context);
int subChId = com.excelliance.kxqp.util.a.a.getSubChId(context);
String f2 = com.excelliance.kxqp.util.a.b.f();
String e3 = com.excelliance.kxqp.util.a.b.e();
String g2 = com.excelliance.kxqp.util.a.b.g(context);
String a3 = h.a();
String c3 = i.c(context);
String d3 = i.d(context);
int b2 = i.b(context);
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("aid", e2);
jSONObject.put("imei", c2);
jSONObject.put("imsi", d2);
jSONObject.put("pkgName", packageName);
jSONObject.put("model", a2);
jSONObject.put("screen", k2);
jSONObject.put("compVer", compVersion);
jSONObject.put("mainVer", mainVersion);
jSONObject.put("otaVer", oTAVersion);
by a4 = by.a(context, "sp_customization");
jSONObject.put("customizationAd", a4.b(am.aw, true).booleanValue() ? 1 : 0);
jSONObject.put("customizationGame", a4.b("game", true).booleanValue() ? 1 : 0);
jSONObject.put("customizationPush", a4.b("push", true).booleanValue() ? 1 : 0);
jSONObject.put("chid", mainChId);
jSONObject.put("subchid", subChId);
jSONObject.put("andVer", f2);
jSONObject.put("sdkVer", e3);
jSONObject.put("netType", g2);
jSONObject.put("memInfo", a3);
jSONObject.put(BiManager.UQID, c3);
jSONObject.put("cqid", d3);
jSONObject.put("rid", b2);
jSONObject.put("apiPublicFlag", 29);
} catch (JSONException e4) {
e4.printStackTrace();
Log.d("CollectionRepository", "json exception");
}
return jSONObject;
}
}