- 28,932 files - Full Java source code - Smali files - Resources Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
597 lines
26 KiB
Java
597 lines
26 KiB
Java
package com.mbridge.msdk.mbbanner.common.communication;
|
|
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.net.Uri;
|
|
import android.os.Bundle;
|
|
import android.text.TextUtils;
|
|
import android.util.Base64;
|
|
import com.ironsource.v8;
|
|
import com.mbridge.msdk.MBridgeConstans;
|
|
import com.mbridge.msdk.c.h;
|
|
import com.mbridge.msdk.c.k;
|
|
import com.mbridge.msdk.foundation.db.n;
|
|
import com.mbridge.msdk.foundation.download.download.H5DownLoadManager;
|
|
import com.mbridge.msdk.foundation.entity.CampaignEx;
|
|
import com.mbridge.msdk.foundation.entity.m;
|
|
import com.mbridge.msdk.foundation.same.a.b;
|
|
import com.mbridge.msdk.foundation.tools.ab;
|
|
import com.mbridge.msdk.foundation.tools.af;
|
|
import com.mbridge.msdk.foundation.tools.aj;
|
|
import com.mbridge.msdk.foundation.tools.ak;
|
|
import com.mbridge.msdk.foundation.tools.j;
|
|
import com.mbridge.msdk.mbbid.common.BidResponsedEx;
|
|
import com.mbridge.msdk.mbsignalcommon.communication.c;
|
|
import com.mbridge.msdk.mbsignalcommon.communication.d;
|
|
import com.mbridge.msdk.mbsignalcommon.windvane.g;
|
|
import com.vungle.ads.internal.presenter.MRAIDPresenter;
|
|
import java.io.File;
|
|
import java.lang.ref.WeakReference;
|
|
import java.util.ArrayList;
|
|
import java.util.Iterator;
|
|
import java.util.List;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONException;
|
|
import org.json.JSONObject;
|
|
|
|
/* loaded from: classes4.dex */
|
|
public final class a extends c {
|
|
private WeakReference<Context> b;
|
|
private List<CampaignEx> c;
|
|
private String d;
|
|
private String e;
|
|
private int f;
|
|
private com.mbridge.msdk.mbbanner.common.b.a g;
|
|
private BannerExpandDialog h;
|
|
private boolean i = false;
|
|
|
|
public final void a() {
|
|
if (this.g != null) {
|
|
this.g = null;
|
|
}
|
|
if (this.h != null) {
|
|
this.h = null;
|
|
}
|
|
}
|
|
|
|
public final void a(int i) {
|
|
this.f = i;
|
|
}
|
|
|
|
public final void a(com.mbridge.msdk.mbbanner.common.b.a aVar) {
|
|
if (aVar != null) {
|
|
this.g = aVar;
|
|
}
|
|
}
|
|
|
|
public final void a(List<CampaignEx> list) {
|
|
this.c = list;
|
|
}
|
|
|
|
public a(Context context, String str, String str2) {
|
|
this.d = str;
|
|
this.e = str2;
|
|
this.b = new WeakReference<>(context);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.communication.a, com.mbridge.msdk.mbsignalcommon.communication.b
|
|
public final void c(Object obj, String str) {
|
|
if (obj != null) {
|
|
try {
|
|
int optInt = new JSONObject(str).optInt("isReady", 1);
|
|
g.a().a(obj, d.a(0));
|
|
com.mbridge.msdk.mbbanner.common.b.a aVar = this.g;
|
|
if (aVar != null) {
|
|
aVar.b(optInt);
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("BannerSignalCommunicationImpl", "readyStatus", th);
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.communication.a, com.mbridge.msdk.mbsignalcommon.communication.b
|
|
public final void a(Object obj, String str) {
|
|
af.b("BannerSignalCommunicationImpl", "BANNER INIT INVOKE");
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
j jVar = new j(com.mbridge.msdk.foundation.controller.c.m().c());
|
|
JSONObject jSONObject2 = new JSONObject();
|
|
jSONObject2.put("dev_close_state", this.f);
|
|
jSONObject.put("sdkSetting", jSONObject2);
|
|
jSONObject.put("device", jVar.a());
|
|
jSONObject.put("campaignList", CampaignEx.parseCamplistToJson(this.c));
|
|
k d = h.a().d(com.mbridge.msdk.foundation.controller.c.m().k(), this.e);
|
|
if (d == null) {
|
|
d = k.d(this.e);
|
|
}
|
|
if (!TextUtils.isEmpty(this.d)) {
|
|
d.a(this.d);
|
|
}
|
|
jSONObject.put("unitSetting", d.x());
|
|
String g = h.a().g(com.mbridge.msdk.foundation.controller.c.m().k());
|
|
if (!TextUtils.isEmpty(g)) {
|
|
jSONObject.put("appSetting", new JSONObject(g));
|
|
}
|
|
jSONObject.put("sdk_info", com.mbridge.msdk.mbsignalcommon.base.d.a);
|
|
af.b("BannerSignalCommunicationImpl", v8.a.e + jSONObject.toString());
|
|
g.a().a(obj, Base64.encodeToString(jSONObject.toString().getBytes(), 2));
|
|
} catch (Throwable th) {
|
|
af.b("BannerSignalCommunicationImpl", v8.a.e, th);
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.communication.a, com.mbridge.msdk.mbsignalcommon.communication.b
|
|
public final void b(Object obj, String str) {
|
|
af.b("BannerSignalCommunicationImpl", "click");
|
|
try {
|
|
List<CampaignEx> list = this.c;
|
|
if (list == null) {
|
|
return;
|
|
}
|
|
CampaignEx campaignEx = (list == null || list.size() <= 0) ? null : this.c.get(0);
|
|
if (TextUtils.isEmpty(str)) {
|
|
return;
|
|
}
|
|
try {
|
|
JSONObject campaignToJsonObject = CampaignEx.campaignToJsonObject(campaignEx);
|
|
JSONObject jSONObject = new JSONObject(str).getJSONObject("pt");
|
|
Iterator<String> keys = jSONObject.keys();
|
|
while (keys.hasNext()) {
|
|
String next = keys.next();
|
|
campaignToJsonObject.put(next, jSONObject.getString(next));
|
|
}
|
|
CampaignEx parseCampaignWithBackData = CampaignEx.parseCampaignWithBackData(campaignToJsonObject);
|
|
String optString = campaignToJsonObject.optString("unitId");
|
|
if (!TextUtils.isEmpty(optString)) {
|
|
parseCampaignWithBackData.setCampaignUnitId(optString);
|
|
}
|
|
campaignEx = parseCampaignWithBackData;
|
|
} catch (JSONException e) {
|
|
e.printStackTrace();
|
|
}
|
|
com.mbridge.msdk.mbbanner.common.b.a aVar = this.g;
|
|
if (aVar != null) {
|
|
aVar.a(campaignEx);
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("BannerSignalCommunicationImpl", "click", th);
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.communication.a, com.mbridge.msdk.mbsignalcommon.communication.b
|
|
public final void d(Object obj, String str) {
|
|
af.b("BannerSignalCommunicationImpl", "toggleCloseBtn");
|
|
try {
|
|
if (TextUtils.isEmpty(str)) {
|
|
return;
|
|
}
|
|
int optInt = new JSONObject(str).optInt("state");
|
|
com.mbridge.msdk.mbbanner.common.b.a aVar = this.g;
|
|
if (aVar != null) {
|
|
aVar.a(optInt);
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("BannerSignalCommunicationImpl", "toggleCloseBtn", th);
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.communication.a, com.mbridge.msdk.mbsignalcommon.communication.b
|
|
public final void e(Object obj, String str) {
|
|
af.b("BannerSignalCommunicationImpl", "triggerCloseBtn");
|
|
try {
|
|
if (TextUtils.isEmpty(str)) {
|
|
return;
|
|
}
|
|
String optString = new JSONObject(str).optString("state");
|
|
com.mbridge.msdk.mbbanner.common.b.a aVar = this.g;
|
|
if (aVar != null) {
|
|
aVar.a(optString);
|
|
}
|
|
g.a().a(obj, d.a(0));
|
|
} catch (Throwable th) {
|
|
af.b("BannerSignalCommunicationImpl", "triggerCloseBtn", th);
|
|
g.a().a(obj, d.a(-1));
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.communication.a, com.mbridge.msdk.mbsignalcommon.communication.b
|
|
public final void i(Object obj, String str) {
|
|
af.a("BannerSignalCommunicationImpl", "sendImpressions:" + str);
|
|
try {
|
|
if (TextUtils.isEmpty(str)) {
|
|
return;
|
|
}
|
|
JSONArray jSONArray = new JSONArray(str);
|
|
final ArrayList arrayList = new ArrayList();
|
|
for (int i = 0; i < jSONArray.length(); i++) {
|
|
String string = jSONArray.getString(i);
|
|
for (CampaignEx campaignEx : this.c) {
|
|
if (campaignEx.getId().equals(string)) {
|
|
b.a(this.e, campaignEx, "banner");
|
|
arrayList.add(string);
|
|
}
|
|
}
|
|
}
|
|
com.mbridge.msdk.foundation.same.f.a.b().execute(new Runnable() { // from class: com.mbridge.msdk.mbbanner.common.communication.a.1
|
|
@Override // java.lang.Runnable
|
|
public final void run() {
|
|
try {
|
|
com.mbridge.msdk.foundation.db.j a = com.mbridge.msdk.foundation.db.j.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c()));
|
|
Iterator it = arrayList.iterator();
|
|
while (it.hasNext()) {
|
|
a.a((String) it.next());
|
|
}
|
|
} catch (Exception e) {
|
|
af.b("BannerSignalCommunicationImpl", e.getMessage());
|
|
}
|
|
}
|
|
});
|
|
} catch (Throwable th) {
|
|
af.b("BannerSignalCommunicationImpl", "sendImpressions", th);
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
|
|
public final void open(String str) {
|
|
af.b("BannerSignalCommunicationImpl", MRAIDPresenter.OPEN);
|
|
try {
|
|
af.b("BannerSignalCommunicationImpl", str);
|
|
if (this.c.size() > 1) {
|
|
com.mbridge.msdk.foundation.controller.c.m().c().startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
|
|
str = null;
|
|
}
|
|
com.mbridge.msdk.mbbanner.common.b.a aVar = this.g;
|
|
if (aVar != null) {
|
|
aVar.a(true, str);
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("BannerSignalCommunicationImpl", MRAIDPresenter.OPEN, th);
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
|
|
public final void close() {
|
|
af.b("BannerSignalCommunicationImpl", "close");
|
|
try {
|
|
com.mbridge.msdk.mbbanner.common.b.a aVar = this.g;
|
|
if (aVar != null) {
|
|
aVar.a();
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("BannerSignalCommunicationImpl", "close", th);
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
|
|
public final void unload() {
|
|
close();
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
|
|
public final CampaignEx getMraidCampaign() {
|
|
List<CampaignEx> list = this.c;
|
|
if (list == null || list.size() <= 0) {
|
|
return null;
|
|
}
|
|
return this.c.get(0);
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
|
|
public final void useCustomClose(boolean z) {
|
|
int i = z ? 2 : 1;
|
|
try {
|
|
com.mbridge.msdk.mbbanner.common.b.a aVar = this.g;
|
|
if (aVar != null) {
|
|
aVar.a(i);
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("BannerSignalCommunicationImpl", "useCustomClose", th);
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.mraid.b
|
|
public final void expand(String str, boolean z) {
|
|
Context context;
|
|
try {
|
|
String str2 = "";
|
|
if (getMraidCampaign() != null) {
|
|
if (TextUtils.isEmpty(getMraidCampaign().getBannerHtml())) {
|
|
str2 = getMraidCampaign().getBannerUrl();
|
|
} else {
|
|
str2 = "file:////" + getMraidCampaign().getBannerHtml();
|
|
}
|
|
}
|
|
Bundle bundle = new Bundle();
|
|
if (!TextUtils.isEmpty(str)) {
|
|
str2 = str;
|
|
}
|
|
bundle.putString("url", str2);
|
|
bundle.putBoolean("shouldUseCustomClose", z);
|
|
WeakReference<Context> weakReference = this.b;
|
|
if (weakReference != null && (context = weakReference.get()) != null) {
|
|
BannerExpandDialog bannerExpandDialog = this.h;
|
|
if (bannerExpandDialog != null && bannerExpandDialog.isShowing()) {
|
|
return;
|
|
}
|
|
BannerExpandDialog bannerExpandDialog2 = new BannerExpandDialog(context, bundle, this.g);
|
|
this.h = bannerExpandDialog2;
|
|
bannerExpandDialog2.setCampaignList(this.e, this.c);
|
|
this.h.show();
|
|
}
|
|
com.mbridge.msdk.mbbanner.common.b.a aVar = this.g;
|
|
if (aVar != null) {
|
|
aVar.a(true);
|
|
}
|
|
String str3 = this.e;
|
|
CampaignEx mraidCampaign = getMraidCampaign();
|
|
try {
|
|
JSONObject jSONObject = new JSONObject();
|
|
if (mraidCampaign.isBidCampaign()) {
|
|
jSONObject.put("hb", 1);
|
|
}
|
|
jSONObject.put("key", "2000070");
|
|
jSONObject.put("rid_n", mraidCampaign.getRequestIdNotice());
|
|
jSONObject.put("rid", mraidCampaign.getRequestId());
|
|
jSONObject.put(BidResponsedEx.KEY_CID, mraidCampaign.getId());
|
|
jSONObject.put(MBridgeConstans.PROPERTIES_UNIT_ID, str3);
|
|
jSONObject.put(CampaignEx.JSON_KEY_CLICK_URL, str);
|
|
jSONObject.put("network_type", String.valueOf(ab.m(com.mbridge.msdk.foundation.controller.c.m().c())));
|
|
com.mbridge.msdk.foundation.same.report.d.d.a().a(jSONObject);
|
|
} catch (Exception e) {
|
|
af.b("BannerReport", e.getMessage());
|
|
}
|
|
} catch (Throwable th) {
|
|
af.b("BannerSignalCommunicationImpl", "expand", th);
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.communication.a, com.mbridge.msdk.mbsignalcommon.communication.b
|
|
public final void j(Object obj, String str) {
|
|
if (TextUtils.isEmpty(str)) {
|
|
d.a(obj, "params is empty");
|
|
return;
|
|
}
|
|
try {
|
|
a(obj, new JSONObject(str));
|
|
} catch (Throwable th) {
|
|
af.a("BannerSignalCommunicationImpl", th.getMessage());
|
|
}
|
|
}
|
|
|
|
private static void a(Object obj, JSONObject jSONObject) {
|
|
String str;
|
|
String str2;
|
|
String str3;
|
|
String str4;
|
|
int i;
|
|
boolean z;
|
|
String str5;
|
|
File file;
|
|
JSONObject jSONObject2 = new JSONObject();
|
|
String str6 = "message";
|
|
String str7 = "code";
|
|
int i2 = 1;
|
|
if (jSONObject == null) {
|
|
try {
|
|
jSONObject2.put("code", 1);
|
|
jSONObject2.put("message", "params is null");
|
|
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
|
|
return;
|
|
} catch (JSONException e) {
|
|
af.a("BannerSignalCommunicationImpl", e.getMessage());
|
|
return;
|
|
}
|
|
}
|
|
try {
|
|
jSONObject2.put("code", 0);
|
|
jSONObject2.put("message", "");
|
|
JSONArray jSONArray = jSONObject.getJSONArray("resource");
|
|
if (jSONArray != null) {
|
|
try {
|
|
if (jSONArray.length() > 0) {
|
|
JSONArray jSONArray2 = new JSONArray();
|
|
int length = jSONArray.length();
|
|
int i3 = 0;
|
|
while (i3 < length) {
|
|
JSONObject jSONObject3 = jSONArray.getJSONObject(i3);
|
|
String optString = jSONObject3.optString("ref", "");
|
|
int i4 = jSONObject3.getInt("type");
|
|
JSONObject jSONObject4 = new JSONObject();
|
|
JSONArray jSONArray3 = jSONArray;
|
|
if (i4 == i2 && !TextUtils.isEmpty(optString)) {
|
|
JSONObject jSONObject5 = new JSONObject();
|
|
m a = n.a(com.mbridge.msdk.foundation.db.g.a(com.mbridge.msdk.foundation.controller.c.m().c())).a(optString);
|
|
if (a != null) {
|
|
i = length;
|
|
af.a("BannerSignalCommunicationImpl", "VideoBean not null");
|
|
jSONObject5.put("type", 1);
|
|
str3 = str6;
|
|
try {
|
|
jSONObject5.put("videoDataLength", a.d());
|
|
String e2 = a.e();
|
|
str4 = str7;
|
|
if (TextUtils.isEmpty(e2)) {
|
|
try {
|
|
af.a("BannerSignalCommunicationImpl", "VideoPath null");
|
|
jSONObject5.put("path", "");
|
|
jSONObject5.put("path4Web", "");
|
|
} catch (Throwable th) {
|
|
th = th;
|
|
str = str3;
|
|
str2 = str4;
|
|
try {
|
|
jSONObject2.put(str2, 1);
|
|
jSONObject2.put(str, th.getLocalizedMessage());
|
|
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
|
|
} catch (JSONException e3) {
|
|
af.a("BannerSignalCommunicationImpl", e3.getMessage());
|
|
return;
|
|
}
|
|
}
|
|
} else {
|
|
af.a("BannerSignalCommunicationImpl", "VideoPath not null");
|
|
jSONObject5.put("path", e2);
|
|
jSONObject5.put("path4Web", e2);
|
|
}
|
|
if (a.b() == 5) {
|
|
jSONObject5.put("downloaded", 1);
|
|
z = false;
|
|
} else {
|
|
z = false;
|
|
jSONObject5.put("downloaded", 0);
|
|
}
|
|
jSONObject4.put(optString, jSONObject5);
|
|
jSONArray2.put(jSONObject4);
|
|
} catch (Throwable th2) {
|
|
th = th2;
|
|
str4 = str7;
|
|
str = str3;
|
|
str2 = str4;
|
|
jSONObject2.put(str2, 1);
|
|
jSONObject2.put(str, th.getLocalizedMessage());
|
|
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
|
|
}
|
|
} else {
|
|
str3 = str6;
|
|
str4 = str7;
|
|
i = length;
|
|
z = false;
|
|
af.a("BannerSignalCommunicationImpl", "VideoBean null");
|
|
}
|
|
i3++;
|
|
jSONArray = jSONArray3;
|
|
length = i;
|
|
str6 = str3;
|
|
str7 = str4;
|
|
i2 = 1;
|
|
} else {
|
|
str3 = str6;
|
|
str4 = str7;
|
|
i = length;
|
|
z = false;
|
|
if (i4 == 2 && !TextUtils.isEmpty(optString)) {
|
|
JSONObject jSONObject6 = new JSONObject();
|
|
jSONObject6.put("type", 2);
|
|
jSONObject6.put("path", H5DownLoadManager.getInstance().getResAddress(optString) == null ? "" : H5DownLoadManager.getInstance().getH5ResAddress(optString));
|
|
jSONObject4.put(optString, jSONObject6);
|
|
jSONArray2.put(jSONObject4);
|
|
} else if (i4 == 3 && !TextUtils.isEmpty(optString)) {
|
|
try {
|
|
file = new File(optString);
|
|
} catch (Throwable th3) {
|
|
if (MBridgeConstans.DEBUG) {
|
|
th3.printStackTrace();
|
|
}
|
|
}
|
|
if (file.exists() && file.isFile() && file.canRead()) {
|
|
af.a("BannerSignalCommunicationImpl", "getFileInfo Mraid file " + optString);
|
|
str5 = "file:////" + optString;
|
|
JSONObject jSONObject7 = new JSONObject();
|
|
jSONObject7.put("type", 3);
|
|
jSONObject7.put("path", str5);
|
|
jSONObject4.put(optString, jSONObject7);
|
|
jSONArray2.put(jSONObject4);
|
|
}
|
|
str5 = "";
|
|
JSONObject jSONObject72 = new JSONObject();
|
|
jSONObject72.put("type", 3);
|
|
jSONObject72.put("path", str5);
|
|
jSONObject4.put(optString, jSONObject72);
|
|
jSONArray2.put(jSONObject4);
|
|
} else if (i4 == 4 && !TextUtils.isEmpty(optString)) {
|
|
JSONObject jSONObject8 = new JSONObject();
|
|
jSONObject8.put("type", 4);
|
|
jSONObject8.put("path", aj.a(optString) == null ? "" : aj.a(optString));
|
|
jSONObject4.put(optString, jSONObject8);
|
|
jSONArray2.put(jSONObject4);
|
|
}
|
|
i3++;
|
|
jSONArray = jSONArray3;
|
|
length = i;
|
|
str6 = str3;
|
|
str7 = str4;
|
|
i2 = 1;
|
|
}
|
|
}
|
|
str3 = str6;
|
|
str4 = str7;
|
|
jSONObject2.put("resource", jSONArray2);
|
|
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
|
|
return;
|
|
}
|
|
} catch (Throwable th4) {
|
|
th = th4;
|
|
str3 = str6;
|
|
}
|
|
}
|
|
str2 = "code";
|
|
str = 1;
|
|
} catch (Throwable th5) {
|
|
th = th5;
|
|
str = "message";
|
|
str2 = "code";
|
|
}
|
|
try {
|
|
try {
|
|
jSONObject2.put(str2, 1);
|
|
str = "message";
|
|
try {
|
|
jSONObject2.put(str, "resource is null");
|
|
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
|
|
} catch (JSONException e4) {
|
|
e = e4;
|
|
af.a("BannerSignalCommunicationImpl", e.getMessage());
|
|
}
|
|
} catch (Throwable th6) {
|
|
th = th6;
|
|
jSONObject2.put(str2, 1);
|
|
jSONObject2.put(str, th.getLocalizedMessage());
|
|
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
|
|
}
|
|
} catch (JSONException e5) {
|
|
e = e5;
|
|
str = "message";
|
|
} catch (Throwable th7) {
|
|
th = th7;
|
|
str = "message";
|
|
jSONObject2.put(str2, 1);
|
|
jSONObject2.put(str, th.getLocalizedMessage());
|
|
g.a().a(obj, Base64.encodeToString(jSONObject2.toString().getBytes(), 2));
|
|
}
|
|
}
|
|
|
|
@Override // com.mbridge.msdk.mbsignalcommon.communication.a, com.mbridge.msdk.mbsignalcommon.communication.b
|
|
public final void k(Object obj, String str) {
|
|
af.a("BannerSignalCommunicationImpl", "reportUrls:" + str);
|
|
if (TextUtils.isEmpty(str)) {
|
|
d.a(obj, "params is null");
|
|
return;
|
|
}
|
|
if (TextUtils.isEmpty(str)) {
|
|
return;
|
|
}
|
|
try {
|
|
JSONArray jSONArray = new JSONArray(str);
|
|
for (int i = 0; i < jSONArray.length(); i++) {
|
|
JSONObject jSONObject = jSONArray.getJSONObject(i);
|
|
int optInt = jSONObject.optInt("type");
|
|
String a = ak.a(jSONObject.optString("url"), "&tun=", ab.q() + "");
|
|
int optInt2 = jSONObject.optInt("report");
|
|
if (optInt2 == 0) {
|
|
Context c = com.mbridge.msdk.foundation.controller.c.m().c();
|
|
List<CampaignEx> list = this.c;
|
|
com.mbridge.msdk.click.a.a(c, list != null ? list.get(0) : null, "", a, false, optInt != 0);
|
|
} else {
|
|
Context c2 = com.mbridge.msdk.foundation.controller.c.m().c();
|
|
List<CampaignEx> list2 = this.c;
|
|
com.mbridge.msdk.click.a.a(c2, list2 != null ? list2.get(0) : null, "", a, false, optInt != 0, optInt2);
|
|
}
|
|
}
|
|
g.a().a(obj, d.a(0));
|
|
} catch (Throwable th) {
|
|
af.b("BannerSignalCommunicationImpl", "reportUrls", th);
|
|
}
|
|
}
|
|
}
|