OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 e.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.ui.feedback;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import com.alipay.sdk.util.i;
import com.excean.bytedancebi.bean.BiSendContentEvent;
import com.excean.bytedancebi.manager.BiManager;
import com.excelliance.kxqp.GameUtil;
import com.excelliance.kxqp.VersionManager;
import com.excelliance.kxqp.bitmap.bean.RankingItem;
import com.excelliance.kxqp.bitmap.model.AppInfo;
import com.excelliance.kxqp.bitmap.model.ResponseData;
import com.excelliance.kxqp.bitmap.ui.imp.j;
import com.excelliance.kxqp.gs.bean.AppVersionBean;
import com.excelliance.kxqp.gs.discover.model.CDNData;
import com.excelliance.kxqp.gs.discover.model.UploadWrap;
import com.excelliance.kxqp.gs.util.au;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bd;
import com.excelliance.kxqp.gs.util.bp;
import com.excelliance.kxqp.gs.util.bx;
import com.excelliance.kxqp.gs.util.by;
import com.excelliance.kxqp.gs.util.cd;
import com.excelliance.kxqp.model.FeedbackRequestData;
import com.excelliance.kxqp.model.FeedbackTypes;
import com.excelliance.kxqp.platforms.ExcellianceAppInfo;
import com.excelliance.staticslio.StatisticsManager;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import java.net.URLEncoder;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import org.json.JSONException;
import org.json.JSONObject;
public class e {
private static volatile e f8939a;
private Context f8940b;
private Gson c = new Gson();
private String d;
public interface a {
void a(String str);
void b(String str);
}
public static e a(Context context) {
if (f8939a == null) {
synchronized (e.class) {
if (f8939a == null) {
f8939a = new e(context.getApplicationContext());
}
}
}
return f8939a;
}
private e(Context context) {
this.f8940b = context;
this.d = com.excelliance.kxqp.swipe.a.a.getString(this.f8940b, "server_wrong");
}
public JSONObject a() {
JSONObject jSONObject = new JSONObject();
GameUtil intance = GameUtil.getIntance();
try {
jSONObject.put("ch_id", "" + intance.h());
jSONObject.put("sub_ch_id", "" + intance.i());
jSONObject.put("phone_model", URLEncoder.encode(Build.MODEL, "UTF-8").replaceAll("\\+", "%20"));
jSONObject.put("vc", "" + GameUtil.g(this.f8940b));
jSONObject.put(RankingItem.KEY_VER_NAME, GameUtil.h(this.f8940b));
jSONObject.put("mainver", intance.m());
jSONObject.put("brand", URLEncoder.encode(Build.BRAND, "UTF-8").replaceAll("\\+", "%20"));
jSONObject.put("manufacturer", URLEncoder.encode(Build.MANUFACTURER, "UTF-8").replaceAll("\\+", "%20"));
jSONObject.put("compver", VersionManager.getInstance().l());
jSONObject.put("product", URLEncoder.encode(Build.PRODUCT, "UTF-8").replaceAll("\\+", "%20"));
jSONObject.put("android_id", intance.r(this.f8940b));
jSONObject.put("rid", bx.a().a(this.f8940b));
jSONObject.put(BiManager.UQID, URLEncoder.encode(GameUtil.getIntance().F(this.f8940b), "UTF-8").replaceAll("\\+", "%20"));
jSONObject.put("os_ver", intance.p());
} catch (Exception e) {
e.printStackTrace();
}
return jSONObject;
}
public void a(FeedbackRequestData feedbackRequestData, com.excelliance.kxqp.gs.ui.feedback.b bVar) {
if (feedbackRequestData == null) {
bVar.a();
return;
}
String a2 = this.c.a(feedbackRequestData);
Log.d("FeedbackUtils", "feedbackResponse requestDataString:" + a2);
az.d("FeedbackUtils", "feedbackResponse: requestDataString:" + a2);
String a3 = bd.a("http://api.ourplay.com.cn/feedback/feedback", a2);
Log.d("FeedbackUtils", "feedbackResponse rawResponse:" + a3);
if (a3 != null) {
String a4 = bp.a(a3, "fuck_snsslmm_bslznw", "utf-8");
Log.d("FeedbackUtils", "feedbackResponse response:" + a4);
az.d("FeedbackUtils", "feedbackResponse: " + a4 + "\t" + a2);
if (a4 != null) {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("pkgname", feedbackRequestData.app_id);
jSONObject.put("num", 2);
if (com.excelliance.kxqp.util.d.b.c) {
jSONObject.put("supportMulti", "1");
}
jSONObject.put("controlapi", 1);
if (com.excelliance.kxqp.gs.util.b.bh(this.f8940b)) {
jSONObject.put("isFromDomestic", "1");
}
jSONObject.put("apiPublicFlag", 29);
} catch (JSONException e) {
e.printStackTrace();
}
az.d("FeedbackUtils", "feed jsonObject: " + jSONObject.toString());
bVar.a(a(bd.b("http://api.ourplay.com.cn/rank/getrelation", jSONObject.toString())));
} else {
bVar.a();
}
} else {
bVar.a();
}
BiSendContentEvent biSendContentEvent = new BiSendContentEvent();
biSendContentEvent.content_type = "反馈";
biSendContentEvent.game_packagename = feedbackRequestData.app_id;
biSendContentEvent.app_question_type = feedbackRequestData.typeStr;
biSendContentEvent.app_question_sub_type = feedbackRequestData.subTypeStr;
biSendContentEvent.set__items("game", feedbackRequestData.datafinder_game_id);
com.excelliance.kxqp.gs.g.c.a().a(biSendContentEvent);
}
public ResponseData<List<ExcellianceAppInfo>> a(String str) {
ResponseData responseData;
List list;
ResponseData<List<ExcellianceAppInfo>> responseData2 = new ResponseData<>();
responseData2.code = 1;
responseData2.msg = this.d;
if (str == null) {
return responseData2;
}
ResponseData responseData3 = null;
try {
str = com.excelliance.kxqp.task.store.c.b(str);
} catch (Exception unused) {
}
try {
Log.d("FeedbackUtils", "getAppList: test");
cd.d("FeedbackUtils", str);
responseData = (ResponseData) this.c.a(str, new TypeToken<ResponseData<List<AppInfo>>>() {
}.getType());
} catch (Exception e) {
e = e;
}
try {
Log.d("FeedbackUtils", "getListResponseData: " + responseData.data);
} catch (Exception e2) {
responseData3 = responseData;
e = e2;
az.e("FeedbackUtils", "RankingRepository/getAppList:" + e.toString());
responseData = responseData3;
return responseData != null ? responseData2 : responseData2;
}
if (responseData != null || (list = (List) responseData.data) == null || list.size() <= 0) {
return responseData2;
}
au.b(this.f8940b, (List<AppInfo>) list);
return j.a(this.f8940b, (List<AppInfo>) list);
}
public void a(com.excelliance.kxqp.gs.ui.feedback.a aVar) {
String b2 = by.a(this.f8940b, "feedback").b("typeResponse", (String) null);
if (!TextUtils.isEmpty(b2)) {
a(aVar, b2, true);
}
a(aVar, bd.a("http://api.ourplay.com.cn/feedback/get-type", 15000, 15000), false);
}
private void a(com.excelliance.kxqp.gs.ui.feedback.a aVar, String str, boolean z) {
com.excelliance.kxqp.gs.discover.model.ResponseData<List<FeedbackTypes>> responseData;
if (!TextUtils.isEmpty(str)) {
String a2 = bp.a(str, "fuck_snsslmm_bslznw", "utf-8");
Log.i("FeedbackUtils", "response " + a2);
if (a2 != null) {
try {
responseData = (com.excelliance.kxqp.gs.discover.model.ResponseData) this.c.a(a2, new TypeToken<com.excelliance.kxqp.gs.discover.model.ResponseData<List<FeedbackTypes>>>() {
}.getType());
} catch (Exception e) {
e.printStackTrace();
Log.e("FeedbackUtils", e.toString());
responseData = null;
}
if (responseData != null) {
by a3 = by.a(this.f8940b, "feedback");
boolean z2 = true;
if (!z) {
if (TextUtils.equals(a3.b("typeResponse", (String) null), str)) {
z2 = false;
} else {
a3.a("typeResponse", str);
}
}
if (z2) {
aVar.a(responseData);
return;
}
return;
}
aVar.a();
return;
}
aVar.a();
return;
}
aVar.a();
}
public String b() {
AppVersionBean appVersion;
AppVersionBean appVersion2;
AppVersionBean appVersion3;
StringBuilder sb = new StringBuilder();
ExcellianceAppInfo b2 = com.excelliance.kxqp.repository.a.a(this.f8940b).b("com.google.android.gms");
if (b2 != null && (appVersion3 = b2.getAppVersion(this.f8940b)) != null) {
sb.append("GMS: " + appVersion3.versionName + StatisticsManager.COMMA + appVersion3.versionCode + i.f491b);
}
ExcellianceAppInfo b3 = com.excelliance.kxqp.repository.a.a(this.f8940b).b("com.android.vending");
if (b3 != null && (appVersion2 = b3.getAppVersion(this.f8940b)) != null) {
sb.append("Play: " + appVersion2.versionName + StatisticsManager.COMMA + appVersion2.versionCode + i.f491b);
}
ExcellianceAppInfo b4 = com.excelliance.kxqp.repository.a.a(this.f8940b).b("com.google.android.play.games");
if (b4 != null && (appVersion = b4.getAppVersion(this.f8940b)) != null) {
sb.append("Games: " + appVersion.versionName + StatisticsManager.COMMA + appVersion.versionCode);
}
return sb.toString();
}
public static class b implements Runnable {
private CountDownLatch f8943a;
private Bitmap f8944b;
private a c;
private com.excelliance.kxqp.gs.discover.user.d d;
public b(String str, CountDownLatch countDownLatch, com.excelliance.kxqp.gs.discover.user.d dVar, a aVar) {
this.f8943a = countDownLatch;
this.f8944b = BitmapFactory.decodeFile(str);
this.d = dVar;
this.c = aVar;
}
@Override
public void run() {
if (this.f8944b != null) {
com.excelliance.kxqp.gs.discover.model.ResponseData<UploadWrap> a2 = this.d.a();
if (a2.code == 0) {
UploadWrap uploadWrap = a2.data;
com.excelliance.kxqp.gs.discover.model.ResponseData<CDNData> a3 = this.d.a(uploadWrap.token, uploadWrap.upload, this.f8944b, "feedback");
if (a3.code == 0) {
this.c.a(uploadWrap.domain + a3.data.key);
return;
}
this.c.b(a3.msg);
return;
}
this.c.b(a2.msg);
}
}
}
}