OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 e.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.ui.novice;
import android.content.Context;
import com.excelliance.kxqp.bitmap.model.AppInfo;
import com.excelliance.kxqp.bitmap.ui.imp.j;
import com.excelliance.kxqp.gs.discover.model.ResponseData;
import com.excelliance.kxqp.gs.ui.banner.h;
import com.excelliance.kxqp.gs.ui.banner.l;
import com.excelliance.kxqp.gs.util.au;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bx;
import com.excelliance.kxqp.gs.util.cn;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class e {
private static volatile e f10691a;
private Context f10692b;
private final com.excelliance.kxqp.gs.discover.bbs.c c;
private e(Context context) {
if (context == null) {
throw new IllegalArgumentException("Context is null!");
}
this.f10692b = context.getApplicationContext();
this.c = new com.excelliance.kxqp.gs.discover.bbs.c(this.f10692b);
}
public static e a(Context context) {
if (f10691a == null) {
synchronized (e.class) {
if (f10691a == null) {
f10691a = new e(context);
}
}
}
return f10691a;
}
public ResponseData<l> a() {
JSONObject i = cn.i(this.f10692b);
try {
i.put("userid", bx.a().a(this.f10692b));
} catch (JSONException e) {
e.printStackTrace();
}
return this.c.a(i.toString(), "https://api.ourplay.com.cn/userinterest/gettag", new com.excelliance.kxqp.gs.discover.a.c<l>() {
@Override
public ResponseData<l> a(String str) {
return (ResponseData) new Gson().a(str, new TypeToken<ResponseData<l>>() {
}.getType());
}
});
}
public ResponseData<h> a(List<l.a> list, List<l.a> list2) {
JSONObject a2 = a(list2, a(list, cn.i(this.f10692b), "gametag"), "apptag");
try {
a2.put("userid", bx.a().a(this.f10692b));
} catch (JSONException e) {
e.printStackTrace();
}
return this.c.a(a2.toString(), "https://api.ourplay.com.cn/userinterest/add", new com.excelliance.kxqp.gs.discover.a.c<h>() {
@Override
public ResponseData<h> a(String str) {
try {
az.d("NoviceRepository", "response:" + str);
ResponseData<h> responseData = (ResponseData) new Gson().a(str, new TypeToken<ResponseData<h>>() {
}.getType());
if (responseData != null && responseData.data != null) {
h hVar = responseData.data;
List<AppInfo> list3 = hVar.f8821b;
if (list3 != null) {
au.b(e.this.f10692b, list3);
j.a(e.this.f10692b);
hVar.d = j.a(e.this.f10692b, list3).data;
}
List<AppInfo> list4 = hVar.f8820a;
if (list3 != null) {
au.b(e.this.f10692b, list4);
j.a(e.this.f10692b);
hVar.c = j.a(e.this.f10692b, list4).data;
}
a aVar = new a();
aVar.a(hVar.c);
aVar.a(hVar.d);
}
return responseData;
} catch (Exception e2) {
az.d("NoviceRepository", "ex:" + e2.getMessage());
return null;
}
}
});
}
private JSONObject a(List<l.a> list, JSONObject jSONObject, String str) {
JSONArray jSONArray = new JSONArray();
if (list != null) {
for (l.a aVar : list) {
if (aVar.c) {
JSONObject jSONObject2 = new JSONObject();
try {
jSONObject2.put("id", aVar.f8832a);
jSONObject2.put("name", aVar.f8833b);
} catch (JSONException e) {
e.printStackTrace();
}
jSONArray.put(jSONObject2);
}
}
}
try {
jSONObject.put(str, jSONArray);
} catch (JSONException e2) {
e2.printStackTrace();
}
return jSONObject;
}
}