OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 d.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.discover.user;
import android.content.Context;
import android.graphics.Bitmap;
import com.excelliance.kxqp.gs.discover.model.AppItem;
import com.excelliance.kxqp.gs.discover.model.ArticleItem;
import com.excelliance.kxqp.gs.discover.model.CDNData;
import com.excelliance.kxqp.gs.discover.model.ForumItem;
import com.excelliance.kxqp.gs.discover.model.ReplyItem;
import com.excelliance.kxqp.gs.discover.model.ResponseData;
import com.excelliance.kxqp.gs.discover.model.ScoreItem;
import com.excelliance.kxqp.gs.discover.model.UploadWrap;
import com.excelliance.kxqp.gs.discover.model.UserInfo;
import com.excelliance.kxqp.gs.discover.model.UserItem;
import com.excelliance.kxqp.gs.discover.model.request.FollowAppRequestData;
import com.excelliance.kxqp.gs.discover.model.request.FollowForumRequestData;
import com.excelliance.kxqp.gs.discover.model.request.FollowRequestData;
import com.excelliance.kxqp.gs.discover.model.request.UploadInfoRequestData;
import com.excelliance.kxqp.gs.discover.model.request.UserIdRequestData;
import com.excelliance.kxqp.gs.discover.model.request.UserListRequestData;
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.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.io.File;
import java.util.HashMap;
import java.util.List;
public class d {
private static d f5876a;
private Context f5877b;
private Gson c = new Gson();
private String d;
public static synchronized d a(Context context) {
d dVar;
synchronized (d.class) {
if (f5876a == null) {
f5876a = new d(context.getApplicationContext());
}
dVar = f5876a;
}
return dVar;
}
private d(Context context) {
this.f5877b = context;
this.d = com.excelliance.kxqp.swipe.a.a.getString(this.f5877b, "server_wrong");
}
private String b() {
return bx.a().a(this.f5877b);
}
public ResponseData<UploadWrap> a() {
UserIdRequestData userIdRequestData;
String str;
String a2;
ResponseData<UploadWrap> responseData;
ResponseData<UploadWrap> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
String b2 = b();
try {
userIdRequestData = (UserIdRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<UserIdRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
userIdRequestData = null;
}
if (userIdRequestData == null) {
userIdRequestData = new UserIdRequestData(null, b2);
} else {
userIdRequestData.setData(null, b2);
}
be d = bd.d("http://api.ourplay.com.cn/user/getuploadtoken", this.c.a(userIdRequestData));
if (d != null) {
str = d.c;
responseData2.msg = as.a(this.f5877b, d);
} else {
str = null;
}
if (str == null || (a2 = bp.a(str, "fuck_snsslmm_bslznw", "utf-8")) == null) {
return responseData2;
}
try {
responseData = (ResponseData) this.c.a(a2, new TypeToken<ResponseData<UploadWrap>>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
responseData = null;
}
return responseData != null ? responseData : responseData2;
}
public ResponseData<CDNData> a(String str, String str2, Bitmap bitmap) {
T t;
ResponseData<CDNData> responseData = new ResponseData<>();
responseData.code = 1;
responseData.msg = this.d;
String str3 = "headimage" + b() + String.valueOf(System.currentTimeMillis()) + ".jpg";
File a2 = com.excelliance.kxqp.gs.discover.a.a(this.f5877b, bitmap, "headimage", str3);
if (a2 == null) {
responseData.code = 1;
responseData.msg = com.excelliance.kxqp.swipe.a.a.getString(this.f5877b, "local_wrong");
return responseData;
}
HashMap hashMap = new HashMap();
hashMap.put("key", "xspace/headimage/" + str3);
hashMap.put("token", str);
HashMap hashMap2 = new HashMap();
hashMap2.put(a2.getName(), a2);
String a3 = com.excelliance.kxqp.gs.discover.a.a(str2, hashMap, hashMap2);
if (a3 != null) {
try {
t = (CDNData) this.c.a(a3, new TypeToken<CDNData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
t = 0;
}
if (t != 0) {
responseData.code = 0;
responseData.data = t;
}
}
return responseData;
}
public ResponseData<CDNData> a(String str, String str2, Bitmap bitmap, String str3) {
T t;
ResponseData<CDNData> responseData = new ResponseData<>();
responseData.code = 1;
responseData.msg = this.d;
String str4 = "headimage" + b() + String.valueOf(System.currentTimeMillis()) + ".jpg";
File a2 = com.excelliance.kxqp.gs.discover.a.a(this.f5877b, bitmap, "headimage", str4);
if (a2 == null) {
responseData.code = 1;
responseData.msg = com.excelliance.kxqp.swipe.a.a.getString(this.f5877b, "local_wrong");
return responseData;
}
HashMap hashMap = new HashMap();
hashMap.put("key", "xspace/" + str3 + "/" + str4);
hashMap.put("token", str);
HashMap hashMap2 = new HashMap();
hashMap2.put(a2.getName(), a2);
String a3 = com.excelliance.kxqp.gs.discover.a.a(str2, hashMap, hashMap2);
if (a3 != null) {
try {
t = (CDNData) this.c.a(a3, new TypeToken<CDNData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
t = 0;
}
if (t != 0) {
responseData.code = 0;
responseData.data = t;
}
}
return responseData;
}
public ResponseData a(String str, String str2, String str3, String str4, String str5) {
UploadInfoRequestData uploadInfoRequestData;
String str6;
String a2;
ResponseData responseData;
ResponseData responseData2 = new ResponseData();
responseData2.code = 1;
responseData2.msg = this.d;
String b2 = b();
try {
uploadInfoRequestData = (UploadInfoRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<UploadInfoRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
uploadInfoRequestData = null;
}
if (uploadInfoRequestData == null) {
uploadInfoRequestData = new UploadInfoRequestData(b2, str3, str, str2, str4, str5);
} else {
uploadInfoRequestData.setData(b2, str3, str, str2, str4, str5);
}
be d = bd.d("http://api.ourplay.com.cn/user/update", this.c.a(uploadInfoRequestData));
if (d != null) {
str6 = d.c;
responseData2.msg = as.a(this.f5877b, d);
} else {
str6 = null;
}
if (str6 != null && (a2 = bp.a(str6, "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<UserInfo> a(String str) {
UserIdRequestData userIdRequestData;
String str2;
String a2;
ResponseData<UserInfo> responseData;
String b2 = b();
ResponseData<UserInfo> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
try {
userIdRequestData = (UserIdRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<UserIdRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
userIdRequestData = null;
}
if (userIdRequestData == null) {
userIdRequestData = new UserIdRequestData(b2, str);
} else {
userIdRequestData.setData(b2, str);
}
be d = bd.d("http://api.ourplay.com.cn/user/info", this.c.a(userIdRequestData));
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5877b, 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<UserInfo>>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public ResponseData<List<ScoreItem>> a(String str, int i, int i2) {
UserListRequestData userListRequestData;
String str2;
String a2;
ResponseData<List<ScoreItem>> responseData;
String b2 = b();
ResponseData<List<ScoreItem>> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
try {
userListRequestData = (UserListRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<UserListRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
userListRequestData = null;
}
if (userListRequestData == null) {
userListRequestData = new UserListRequestData(b2, str, i, i2);
} else {
userListRequestData.setData(b2, str, i, i2);
}
be d = bd.d("http://api.ourplay.com.cn/user/comment", this.c.a(userListRequestData));
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5877b, 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<ScoreItem>>>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public ResponseData<List<ReplyItem>> b(String str, int i, int i2) {
UserListRequestData userListRequestData;
String str2;
String a2;
ResponseData<List<ReplyItem>> responseData;
String b2 = b();
ResponseData<List<ReplyItem>> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
try {
userListRequestData = (UserListRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<UserListRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
userListRequestData = null;
}
if (userListRequestData == null) {
userListRequestData = new UserListRequestData(b2, str, i, i2);
} else {
userListRequestData.setData(b2, str, i, i2);
}
be d = bd.d("http://api.ourplay.com.cn/user/commentlist", this.c.a(userListRequestData));
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5877b, 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<ReplyItem>>>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public ResponseData<List<ArticleItem>> c(String str, int i, int i2) {
UserListRequestData userListRequestData;
String str2;
String a2;
ResponseData<List<ArticleItem>> responseData;
String b2 = b();
ResponseData<List<ArticleItem>> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
try {
userListRequestData = (UserListRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<UserListRequestData>() {
}.getType());
} catch (Exception e) {
az.e("UserRepository", e.toString());
userListRequestData = null;
}
if (userListRequestData == null) {
userListRequestData = new UserListRequestData(b2, str, i, i2);
} else {
userListRequestData.setData(b2, str, i, i2);
}
be d = bd.d("http://api.ourplay.com.cn/user/newslist", this.c.a(userListRequestData));
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5877b, 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<ArticleItem>>>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public ResponseData a(String str, int i) {
FollowRequestData followRequestData;
String str2;
String a2;
ResponseData responseData;
String b2 = b();
ResponseData responseData2 = new ResponseData();
responseData2.code = 1;
responseData2.msg = this.d;
try {
followRequestData = (FollowRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<FollowRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
followRequestData = null;
}
if (followRequestData == null) {
followRequestData = new FollowRequestData(b2, str, i);
} else {
followRequestData.setData(b2, str, i);
}
be d = bd.d("http://api.ourplay.com.cn/user/fans", this.c.a(followRequestData));
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5877b, 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<List<UserItem>> d(String str, int i, int i2) {
UserListRequestData userListRequestData;
String str2;
String a2;
ResponseData<List<UserItem>> responseData;
String d = com.excelliance.kxqp.gs.discover.a.d(this.f5877b);
ResponseData<List<UserItem>> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
try {
userListRequestData = (UserListRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<UserListRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
userListRequestData = null;
}
if (userListRequestData == null) {
userListRequestData = new UserListRequestData(d, str, i, i2);
} else {
userListRequestData.setData(d, str, i, i2);
}
be d2 = bd.d("http://api.ourplay.com.cn/user/fanslist", this.c.a(userListRequestData));
if (d2 != null) {
str2 = d2.c;
responseData2.msg = as.a(this.f5877b, d2);
} 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<UserItem>>>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public ResponseData<List<UserItem>> e(String str, int i, int i2) {
UserListRequestData userListRequestData;
String str2;
String a2;
ResponseData<List<UserItem>> responseData;
String d = com.excelliance.kxqp.gs.discover.a.d(this.f5877b);
ResponseData<List<UserItem>> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
try {
userListRequestData = (UserListRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<UserListRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
userListRequestData = null;
}
if (userListRequestData == null) {
userListRequestData = new UserListRequestData(d, str, i, i2);
} else {
userListRequestData.setData(d, str, i, i2);
}
be d2 = bd.d("http://api.ourplay.com.cn/user/attention", this.c.a(userListRequestData));
if (d2 != null) {
str2 = d2.c;
responseData2.msg = as.a(this.f5877b, d2);
} 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<UserItem>>>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public ResponseData<List<AppItem>> f(String str, int i, int i2) {
UserListRequestData userListRequestData;
String str2;
String a2;
ResponseData<List<AppItem>> responseData;
String d = com.excelliance.kxqp.gs.discover.a.d(this.f5877b);
ResponseData<List<AppItem>> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
try {
userListRequestData = (UserListRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<UserListRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
userListRequestData = null;
}
if (userListRequestData == null) {
userListRequestData = new UserListRequestData(d, str, i, i2);
} else {
userListRequestData.setData(d, str, i, i2);
}
be d2 = bd.d("http://api.ourplay.com.cn/user/applist", this.c.a(userListRequestData));
if (d2 != null) {
str2 = d2.c;
responseData2.msg = as.a(this.f5877b, d2);
} 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<AppItem>>>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public ResponseData<List<ForumItem>> g(String str, int i, int i2) {
UserListRequestData userListRequestData;
String str2;
String a2;
ResponseData<List<ForumItem>> responseData;
String d = com.excelliance.kxqp.gs.discover.a.d(this.f5877b);
ResponseData<List<ForumItem>> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
try {
userListRequestData = (UserListRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<UserListRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
userListRequestData = null;
}
if (userListRequestData == null) {
userListRequestData = new UserListRequestData(d, str, i, i2);
} else {
userListRequestData.setData(d, str, i, i2);
}
be d2 = bd.d("http://api.ourplay.com.cn/user/bbslist", this.c.a(userListRequestData));
if (d2 != null) {
str2 = d2.c;
responseData2.msg = as.a(this.f5877b, d2);
} 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<ForumItem>>>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public ResponseData<List<ArticleItem>> h(String str, int i, int i2) {
UserListRequestData userListRequestData;
String str2;
String a2;
ResponseData<List<ArticleItem>> responseData;
ResponseData<List<ArticleItem>> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
try {
userListRequestData = (UserListRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<UserListRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
userListRequestData = null;
}
if (userListRequestData == null) {
userListRequestData = new UserListRequestData(null, str, i, i2);
} else {
userListRequestData.setData(null, str, i, i2);
}
be d = bd.d("http://api.ourplay.com.cn/user/collectlist", this.c.a(userListRequestData));
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5877b, 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<ArticleItem>>>() {
}.getType());
} catch (Exception e2) {
e2.printStackTrace();
responseData = null;
}
if (responseData != null) {
return responseData;
}
}
return responseData2;
}
public ResponseData b(String str, int i) {
FollowForumRequestData followForumRequestData;
String str2;
String a2;
ResponseData responseData;
String b2 = b();
ResponseData responseData2 = new ResponseData();
responseData2.code = 1;
responseData2.msg = this.d;
try {
followForumRequestData = (FollowForumRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<FollowForumRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
followForumRequestData = null;
}
if (followForumRequestData == null) {
followForumRequestData = new FollowForumRequestData(b2, str, String.valueOf(i));
} else {
followForumRequestData.setData(b2, str, String.valueOf(i));
}
be d = bd.d("http://api.ourplay.com.cn/bbs/collect", this.c.a(followForumRequestData));
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5877b, 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 c(String str, int i) {
FollowAppRequestData followAppRequestData;
String str2;
String a2;
ResponseData responseData;
String b2 = b();
ResponseData responseData2 = new ResponseData();
responseData2.code = 1;
responseData2.msg = this.d;
try {
followAppRequestData = (FollowAppRequestData) this.c.a(cn.i(this.f5877b).toString(), new TypeToken<FollowAppRequestData>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
az.e("UserRepository", e.toString());
followAppRequestData = null;
}
if (followAppRequestData == null) {
followAppRequestData = new FollowAppRequestData(b2, str, String.valueOf(i));
} else {
followAppRequestData.setData(b2, str, String.valueOf(i));
}
be d = bd.d("http://api.ourplay.com.cn/rank/attention", this.c.a(followAppRequestData));
if (d != null) {
str2 = d.c;
responseData2.msg = as.a(this.f5877b, 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;
}
}