OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 b.java 源代码,内容仅作参考
package com.excelliance.kxqp.bitmap.ui.imp;
import a.q;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.android.spush.util.WebActionRouter;
import com.excean.ggspace.main.R;
import com.excelliance.kxqp.api.ApiManager;
import com.excelliance.kxqp.bean.AppBuyBean;
import com.excelliance.kxqp.bean.GamerVideoBean;
import com.excelliance.kxqp.bean.VideoSubApkInfo;
import com.excelliance.kxqp.bitmap.model.ThirdLink;
import com.excelliance.kxqp.gs.appstore.model.ResponseData;
import com.excelliance.kxqp.gs.util.cd;
import com.excelliance.kxqp.platforms.ExcellianceAppInfo;
import com.excelliance.kxqp.ui.InitialData;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class b {
private static volatile b f2923a;
private Context f2924b;
private String c;
public static b a(Context context) {
if (f2923a == null) {
synchronized (j.class) {
if (f2923a == null) {
f2923a = new b(context.getApplicationContext());
}
}
}
return f2923a;
}
private b(Context context) {
this.f2924b = context;
this.c = context.getString(R.string.server_wrong);
}
public ResponseData<List<GamerVideoBean>> a(int i) {
q a2;
ResponseData responseData = new ResponseData();
responseData.code = 1;
responseData.msg = this.c;
if (i > 0) {
a2 = new q.a().a("startVideoId", String.valueOf(i)).a();
} else {
a2 = new q.a().a("pkgName", this.f2924b.getPackageName()).a();
}
com.excelliance.kxqp.api.c cVar = new com.excelliance.kxqp.api.c(this.f2924b);
cVar.a(ApiManager.getInstance().a(this.f2924b, 15000L, 15000L, "https://gapi.ourplay.com.cn/").f(a2));
return cVar.b();
}
public List<GamerVideoBean> a() {
List<GamerVideoBean> list = a(this.f2924b).a(0).data;
return list != null ? a(this.f2924b, list) : list;
}
public ResponseData b(int i) {
ResponseData responseData = new ResponseData();
responseData.code = 1;
responseData.msg = this.c;
q a2 = new q.a().a("videoId", String.valueOf(i)).a();
com.excelliance.kxqp.api.c cVar = new com.excelliance.kxqp.api.c(this.f2924b);
cVar.a(ApiManager.getInstance().a(this.f2924b, 15000L, 15000L, "https://gapi.ourplay.com.cn/").h(a2));
return cVar.b();
}
public ResponseData<List<GamerVideoBean>> a(String str) {
ResponseData responseData = new ResponseData();
responseData.code = 1;
responseData.msg = this.c;
q a2 = new q.a().a(WebActionRouter.KEY_PKG, str).a();
com.excelliance.kxqp.api.c cVar = new com.excelliance.kxqp.api.c(this.f2924b);
cVar.a(ApiManager.getInstance().a(this.f2924b, 15000L, 15000L, "https://gapi.ourplay.com.cn/").g(a2));
return cVar.b();
}
public List<GamerVideoBean> a(Context context, List<GamerVideoBean> list) {
HashMap hashMap = new HashMap();
for (ExcellianceAppInfo excellianceAppInfo : InitialData.a(context).a()) {
hashMap.put(excellianceAppInfo.getAppPackageName(), excellianceAppInfo);
}
for (GamerVideoBean gamerVideoBean : list) {
if (!TextUtils.isEmpty(gamerVideoBean.appinfo.pkgName)) {
gamerVideoBean.excellianceAppInfo = a(hashMap, gamerVideoBean.appinfo);
}
}
return list;
}
public ExcellianceAppInfo a(Map<String, ExcellianceAppInfo> map, VideoSubApkInfo videoSubApkInfo) {
float f;
ExcellianceAppInfo excellianceAppInfo = map.get(videoSubApkInfo.pkgName);
if (excellianceAppInfo == null) {
Context context = this.f2924b;
String str = videoSubApkInfo.pkgName;
String str2 = videoSubApkInfo.name;
StringBuilder sb = new StringBuilder();
sb.append((videoSubApkInfo.name + videoSubApkInfo.pkgName).hashCode());
sb.append("");
excellianceAppInfo = new ExcellianceAppInfo(context, str, str2, null, "", "", "", "7", sb.toString(), 0L);
}
if (excellianceAppInfo.getAppSize() == 0 && !TextUtils.isEmpty(videoSubApkInfo.apkSize)) {
try {
excellianceAppInfo.setAppSize(Long.valueOf(videoSubApkInfo.apkSize).longValue());
} catch (Exception unused) {
}
}
excellianceAppInfo.setVersionName(videoSubApkInfo.version);
excellianceAppInfo.setIconDownloadPath(videoSubApkInfo.icon);
try {
f = Float.valueOf(videoSubApkInfo.price).floatValue();
} catch (Exception e) {
e.printStackTrace();
f = 0.0f;
}
Log.d("System[", ": " + f + "]");
excellianceAppInfo.free = f == 0.0f;
excellianceAppInfo.apkFrom = videoSubApkInfo.apkFrom;
excellianceAppInfo.isWhite = 1;
excellianceAppInfo.downloadButtonVisible = videoSubApkInfo.downloadButtonVisible;
excellianceAppInfo.hasThirdDomin = videoSubApkInfo.hasThirdDomin;
try {
excellianceAppInfo.appId = videoSubApkInfo.appId;
} catch (Exception e2) {
e2.printStackTrace();
}
excellianceAppInfo.subscribeState = videoSubApkInfo.subscribe;
excellianceAppInfo.subscribe = videoSubApkInfo.subscribe;
if (excellianceAppInfo.thirdLink != null && excellianceAppInfo.thirdLink.size() > 0) {
for (ThirdLink thirdLink : excellianceAppInfo.thirdLink) {
if (thirdLink.isOurSelf == 1 && !cd.a(excellianceAppInfo.appPackageName) && !cd.a(thirdLink.url)) {
thirdLink.url += excellianceAppInfo.appPackageName;
thirdLink.pkgName = excellianceAppInfo.appPackageName;
thirdLink.sourceFromMarket = excellianceAppInfo.market_strategy == 1 ? 1 : 0;
}
}
}
if (com.excelliance.kxqp.gs.util.b.bh(this.f2924b)) {
excellianceAppInfo.apkFrom = videoSubApkInfo.apkFrom;
excellianceAppInfo.price = f;
AppBuyBean l = com.excelliance.kxqp.repository.a.a(this.f2924b).l(excellianceAppInfo.getAppPackageName());
if (l != null) {
l.initData();
excellianceAppInfo.isBuy = l.isBuy(this.f2924b) ? 1 : 0;
}
}
return excellianceAppInfo;
}
}