OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.appstore.recommend.d;
import android.content.Context;
import android.os.Handler;
import android.os.HandlerThread;
import com.excelliance.kxqp.avds.AvdSplashCallBackImp;
import com.excelliance.kxqp.bitmap.model.AppInfo;
import com.excelliance.kxqp.bitmap.ui.imp.j;
import com.excelliance.kxqp.gs.appstore.recommend.a.d;
import com.excelliance.kxqp.gs.appstore.recommend.c.a;
import com.excelliance.kxqp.gs.bean.AppAreaBean;
import com.excelliance.kxqp.gs.service.ProxyDelayService;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bd;
import com.excelliance.kxqp.gs.util.cn;
import com.excelliance.kxqp.platforms.ExcellianceAppInfo;
import com.excelliance.kxqp.ui.InitialData;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
public class a extends com.excelliance.kxqp.gs.appstore.recommend.base.a<a.InterfaceC0154a> {
private Handler f4264b;
public a(Context context) {
super(context);
HandlerThread handlerThread = new HandlerThread("AppListDetailPresenter", 10);
handlerThread.start();
this.f4264b = new Handler(handlerThread.getLooper());
}
public void a(final int i, final String str, final int i2, final int i3, final String str2) {
this.f4264b.post(new Runnable() {
@Override
public void run() {
az.d("AppListDetailPresenter", "queryList page =" + i);
if (a.this.b() != null) {
a.this.b().g();
}
JSONObject i4 = cn.i(a.this.getContext());
try {
i4.put("page", i);
i4.put("type", str);
i4.put("id", i2);
i4.put("dataVer", i3);
i4.put(AvdSplashCallBackImp.KEY_PRICE, 1);
i4.put(AppAreaBean.AREAS, 1);
if (com.excelliance.kxqp.util.d.b.c) {
i4.put("supportMulti", 1);
}
i4.put("controlapi", "1");
if (com.excelliance.kxqp.gs.util.b.bh(a.this.getContext())) {
i4.put("isFromDomestic", "1");
}
} catch (JSONException e) {
az.d("AppListDetailPresenter", e.getMessage());
e.printStackTrace();
}
az.d("AppListDetailPresenter", "requestParams:" + i4);
az.d("AppListDetailPresenter", "encrypt requestParams:" + cn.b(i4.toString()));
String a2 = bd.a("http://api.ourplay.com.cnv1/gp/page", i4.toString());
az.d("AppListDetailPresenter", "encrypt response:" + a2);
ProxyDelayService.a("AppListDetailPresenter", "response :" + a2);
d<List<com.excelliance.kxqp.gs.appstore.recommend.a.c>> b2 = com.excelliance.kxqp.gs.appstore.recommend.e.a.b(a2, 0, i2, i3, str2);
if (b2 == null || b2.a() != 1) {
if (a.this.b() != null) {
a.this.b().a("data error");
return;
}
return;
}
if (a.this.b() != null) {
Map<String, ExcellianceAppInfo> d = a.this.d();
if (b2.b() != null) {
for (com.excelliance.kxqp.gs.appstore.recommend.a.c cVar : b2.b()) {
AppInfo appInfo = new AppInfo(cVar.h(), cVar.i(), cVar.k());
appInfo.size = cVar.a();
appInfo.versionCode = String.valueOf(cVar.g());
appInfo.price = cVar.l();
appInfo.area = cVar.c();
appInfo.apkFrom = cVar.f4213a;
appInfo.downloadButtonVisible = cVar.f4214b;
ExcellianceAppInfo a3 = j.a(a.this.getContext()).a(d, appInfo);
a3.setOnline(cVar.d());
a3.setLowGms(cVar.e());
cVar.a(a3);
az.d("AppListDetailPresenter", "aappinfo: " + cVar.f());
}
}
a.this.b().a((a.InterfaceC0154a) b2.b());
}
if (a.this.b() != null) {
a.this.b().k();
}
}
});
}
public Map<String, ExcellianceAppInfo> d() {
HashMap hashMap = new HashMap();
for (ExcellianceAppInfo excellianceAppInfo : InitialData.a(getContext()).a()) {
hashMap.put(excellianceAppInfo.getAppPackageName(), excellianceAppInfo);
}
return hashMap;
}
public void c() {
this.f4264b.getLooper().quit();
}
}