OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046
以下内容为反编译后的 e.java 源代码,内容仅作参考
package com.excelliance.kxqp.gs.ui.make_money;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.Handler;
import android.os.HandlerThread;
import androidx.work.WorkRequest;
import com.excelliance.kxqp.api.ApiManager;
import com.excelliance.kxqp.gs.appstore.model.ResponseData;
import com.excelliance.kxqp.gs.bean.InviteCardBean;
import com.excelliance.kxqp.gs.ui.make_money.c;
import com.excelliance.kxqp.gs.ui.make_money.model.InviteCode;
import com.excelliance.kxqp.gs.ui.make_money.model.InviteMsg;
import com.excelliance.kxqp.gs.util.as;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bv;
import com.excelliance.kxqp.gs.util.cd;
import com.excelliance.kxqp.gs.util.w;
public class e implements c.a {
private Context f10386a;
private Handler f10387b;
@Override
public void a() {
}
@Override
public void initData() {
}
public e(Context context) {
this.f10386a = context;
HandlerThread handlerThread = new HandlerThread("MakeMoneyPresenter", 10);
handlerThread.start();
this.f10387b = new Handler(handlerThread.getLooper());
}
@Override
public void b(final com.excelliance.kxqp.gs.listener.g<InviteMsg> gVar) {
this.f10387b.postDelayed(new Runnable() {
@Override
public void run() {
com.excelliance.kxqp.api.c cVar = new com.excelliance.kxqp.api.c(e.this.f10386a);
cVar.a(ApiManager.getInstance().a(e.this.f10386a, WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS, WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS, "https://gapi.ourplay.com.cn/").a(2));
ResponseData b2 = cVar.b();
if (b2.data != 0) {
gVar.a(b2.data, new Object[0]);
}
}
}, 1000L);
}
public static int b(Context context, float f) {
return (int) ((f * context.getResources().getDisplayMetrics().density) + 0.5f);
}
@Override
public void a(final InviteCardBean inviteCardBean, InviteMsg inviteMsg, final com.excelliance.kxqp.gs.listener.g<Bitmap> gVar) {
this.f10387b.post(new Runnable() {
@Override
public void run() {
StringBuffer stringBuffer;
Bitmap a2;
az.d("MakeMoneyPresenter", "...生成专属二维码...");
gVar.a();
try {
try {
stringBuffer = new StringBuffer();
stringBuffer.append(inviteCardBean.getPhpLink());
stringBuffer.append("?apk=");
stringBuffer.append(inviteCardBean.getApk());
stringBuffer.append("&pkg=");
stringBuffer.append(inviteCardBean.getPackName());
stringBuffer.append("&image=");
stringBuffer.append(inviteCardBean.getAppLogo());
stringBuffer.append("&name=");
stringBuffer.append(inviteCardBean.getAppName());
az.d("MakeMoneyPresenter", "QRCode Content:" + stringBuffer.toString());
inviteCardBean.setQRCodeUrl(stringBuffer.toString());
int b2 = e.b(e.this.f10386a, 88.0f);
a2 = bv.a(stringBuffer.toString(), b2, b2, Color.parseColor("#10B8A1"));
} catch (Exception e) {
e.printStackTrace();
}
if (a2 == null) {
gVar.a(w.e(e.this.f10386a, "create_qr_code_error"));
return;
}
az.d("MakeMoneyPresenter", "create result:" + a2);
gVar.a(a2, stringBuffer.toString());
} finally {
gVar.g_();
}
}
});
}
@Override
public void a(final com.excelliance.kxqp.gs.listener.g<String> gVar) {
this.f10387b.postDelayed(new Runnable() {
@Override
public void run() {
com.excelliance.kxqp.api.c cVar = new com.excelliance.kxqp.api.c(e.this.f10386a);
cVar.a(ApiManager.getInstance().a(e.this.f10386a, WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS, WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS, "https://gapi.ourplay.com.cn/").a());
ResponseData b2 = cVar.b();
if (b2.data == 0 || cd.a(((InviteCode) b2.data).inviteCode)) {
return;
}
gVar.a(((InviteCode) b2.data).inviteCode, new Object[0]);
}
}, 1500L);
}
@Override
public boolean a(String str) {
return as.i(this.f10386a, str);
}
}