OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 c.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.discover.detail;
import android.content.Context;
import android.util.Log;
import com.excelliance.kxqp.gs.discover.model.CommentItem;
import com.excelliance.kxqp.gs.discover.model.MediaDetail;
import com.excelliance.kxqp.gs.discover.model.ResponseData;
import com.excelliance.kxqp.gs.discover.model.request.CommentListRequestData;
import com.excelliance.kxqp.gs.discover.model.request.MediaDetailRequestData;
import com.excelliance.kxqp.gs.discover.model.request.OperationRequestData;
import com.excelliance.kxqp.gs.discover.model.request.UserIdRequestData;
import com.excelliance.kxqp.gs.util.as;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bd;
import com.excelliance.kxqp.gs.util.be;
import com.excelliance.kxqp.gs.util.bp;
import com.excelliance.kxqp.gs.util.bx;
import com.excelliance.kxqp.gs.util.cn;
import com.excelliance.kxqp.task.g.f;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.io.StringReader;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
public class c {
private static c f5559a;
private Context f5560b;
private Gson c = new Gson();
private String d;
public static synchronized c a(Context context) {
c cVar;
synchronized (c.class) {
if (f5559a == null) {
f5559a = new c(context.getApplicationContext());
}
cVar = f5559a;
}
return cVar;
}
private c(Context context) {
this.f5560b = context;
this.d = com.excelliance.kxqp.swipe.a.a.getString(this.f5560b, "server_wrong");
}
public ResponseData<MediaDetail> a(String str) {
MediaDetailRequestData mediaDetailRequestData;
String str2;
String a2;
ResponseData<MediaDetail> responseData;
String a3 = a();
try {
mediaDetailRequestData = (MediaDetailRequestData) this.c.a(cn.i(this.f5560b).toString(), new TypeToken<MediaDetailRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("RecommendDetailRepository", e.toString());
mediaDetailRequestData = null;
}
if (mediaDetailRequestData == null) {
mediaDetailRequestData = new MediaDetailRequestData(str, a3);
} else {
mediaDetailRequestData.setData(str, a3);
}
String a4 = this.c.a(mediaDetailRequestData);
ResponseData<MediaDetail> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
be d = bd.d("http://api.ourplay.com.cn/news/newsdetail", a4);
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5560b, d);
} else {
str2 = null;
}
if (str2 != null && (a2 = bp.a(str2, "fuck_snsslmm_bslznw", "utf-8")) != null) {
try {
responseData = (ResponseData) this.c.a(a2, new TypeToken<ResponseData<MediaDetail>>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
Log.e("RecommendDetailRepository", e2.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public List<a> b(String str) {
ArrayList arrayList = new ArrayList();
try {
XmlPullParserFactory newInstance = XmlPullParserFactory.newInstance();
newInstance.setNamespaceAware(true);
XmlPullParser newPullParser = newInstance.newPullParser();
newPullParser.setInput(new StringReader(str));
for (int eventType = newPullParser.getEventType(); eventType != 1; eventType = newPullParser.next()) {
if (eventType == 2) {
System.out.println("Start tag " + newPullParser.getName());
String name = newPullParser.getName();
if (newPullParser.next() == 4) {
arrayList.add(new a(newPullParser.getText(), name));
}
}
}
} catch (IOException | XmlPullParserException e) {
e.printStackTrace();
Log.e("RecommendDetailRepository", e.toString());
}
return arrayList;
}
private String a() {
return bx.a().a(this.f5560b);
}
public ResponseData a(String str, int i) {
OperationRequestData operationRequestData;
String str2;
String a2;
ResponseData responseData;
String a3 = a();
try {
operationRequestData = (OperationRequestData) this.c.a(cn.i(this.f5560b).toString(), new TypeToken<OperationRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("RecommendDetailRepository", e.toString());
operationRequestData = null;
}
if (operationRequestData == null) {
operationRequestData = new OperationRequestData(str, a3, i);
} else {
operationRequestData.setData(str, a3, i);
}
String a4 = this.c.a(operationRequestData);
ResponseData responseData2 = new ResponseData();
responseData2.code = 1;
responseData2.msg = this.d;
be d = bd.d("http://api.ourplay.com.cn/news/like", a4);
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5560b, d);
} else {
str2 = null;
}
if (str2 != null && (a2 = bp.a(str2, "fuck_snsslmm_bslznw", "utf-8")) != null) {
try {
responseData = (ResponseData) this.c.a(a2, new TypeToken<ResponseData>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public ResponseData b(String str, int i) {
OperationRequestData operationRequestData;
String str2;
String a2;
ResponseData responseData;
String a3 = a();
try {
operationRequestData = (OperationRequestData) this.c.a(cn.i(this.f5560b).toString(), new TypeToken<OperationRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("RecommendDetailRepository", e.toString());
operationRequestData = null;
}
if (operationRequestData == null) {
operationRequestData = new OperationRequestData(str, a3, i);
} else {
operationRequestData.setData(str, a3, i);
}
String a4 = this.c.a(operationRequestData);
ResponseData responseData2 = new ResponseData();
responseData2.code = 1;
responseData2.msg = this.d;
be d = bd.d("http://api.ourplay.com.cn/news/collect", a4);
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5560b, d);
} else {
str2 = null;
}
if (str2 != null && (a2 = bp.a(str2, "fuck_snsslmm_bslznw", "utf-8")) != null) {
try {
responseData = (ResponseData) this.c.a(a2, new TypeToken<ResponseData>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public String c(String str) {
return "https://www.ourplay.com.cn/news/appdetail/" + str;
}
public ResponseData<List<CommentItem>> a(String str, int i, int i2, int i3) {
CommentListRequestData commentListRequestData;
String str2;
String a2;
ResponseData<List<CommentItem>> responseData;
String a3 = a();
try {
commentListRequestData = (CommentListRequestData) this.c.a(cn.i(this.f5560b).toString(), new TypeToken<CommentListRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("RecommendDetailRepository", e.toString());
commentListRequestData = null;
}
if (commentListRequestData == null) {
commentListRequestData = new CommentListRequestData(a3, str, i, i2, i3);
} else {
commentListRequestData.setData(a3, str, i, i2, i3);
}
String a4 = this.c.a(commentListRequestData);
ResponseData<List<CommentItem>> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
be d = bd.d("http://api.ourplay.com.cn/comment/newslist", a4);
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5560b, d);
} else {
str2 = null;
}
if (str2 != null && (a2 = bp.a(str2, "fuck_snsslmm_bslznw", "utf-8")) != null) {
try {
responseData = (ResponseData) this.c.a(a2, new TypeToken<ResponseData<List<CommentItem>>>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
Log.e("RecommendDetailRepository", e2.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public String d(String str) {
UserIdRequestData userIdRequestData;
String d = com.excelliance.kxqp.gs.discover.a.d(this.f5560b);
try {
userIdRequestData = (UserIdRequestData) this.c.a(cn.i(this.f5560b).toString(), new TypeToken<UserIdRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("RecommendDetailRepository", e.toString());
userIdRequestData = null;
}
if (userIdRequestData == null) {
userIdRequestData = new UserIdRequestData(null, d);
} else {
userIdRequestData.setData(null, d);
}
String a2 = com.excelliance.kxqp.gs.util.c.a(this.c.a(userIdRequestData));
StringBuilder sb = new StringBuilder();
try {
if (f.INSTANCE.g != null) {
sb.append(f.INSTANCE.g);
}
sb.append(URLEncoder.encode("/", "UTF-8") + "taskinfoid" + URLEncoder.encode("=", "UTF-8"));
sb.append(f.INSTANCE.h);
sb.append(URLEncoder.encode("/", "UTF-8") + "catid" + URLEncoder.encode("=", "UTF-8"));
sb.append(str);
sb.append(URLEncoder.encode("/", "UTF-8") + "tasktype" + URLEncoder.encode("=", "UTF-8"));
sb.append(17);
} catch (Exception e2) {
e2.printStackTrace();
}
az.d("zch_url", "url = " + ((Object) sb));
return "https://www.ourplay.com.cn/news/share/" + str + "?msg=" + a2 + "&mediaId=" + str + "&zme=" + ((Object) sb);
}
public ResponseData e(String str) {
MediaDetailRequestData mediaDetailRequestData;
String str2;
String a2;
ResponseData responseData;
String a3 = a();
try {
mediaDetailRequestData = (MediaDetailRequestData) this.c.a(cn.i(this.f5560b).toString(), new TypeToken<MediaDetailRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("RecommendDetailRepository", e.toString());
mediaDetailRequestData = null;
}
if (mediaDetailRequestData == null) {
mediaDetailRequestData = new MediaDetailRequestData(str, a3);
} else {
mediaDetailRequestData.setData(str, a3);
}
String a4 = this.c.a(mediaDetailRequestData);
ResponseData responseData2 = new ResponseData();
responseData2.code = 1;
responseData2.msg = this.d;
be d = bd.d("http://api.ourplay.com.cn/news/delete", a4);
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5560b, d);
} else {
str2 = null;
}
if (str2 != null && (a2 = bp.a(str2, "fuck_snsslmm_bslznw", "utf-8")) != null) {
try {
responseData = (ResponseData) this.c.a(a2, new TypeToken<ResponseData>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
Log.e("RecommendDetailRepository", e2.toString());
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public static class a {
public String f5572a;
public String f5573b;
public a(String str, String str2) {
this.f5572a = str;
this.f5573b = str2;
}
}
}