正在查看: Cantique de Louanges v12 应用的 InterstitialActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Cantique de Louanges v12 应用的 InterstitialActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.appnext.ads.interstitial;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Base64;
import android.view.ViewGroup;
import android.webkit.ConsoleMessage;
import android.webkit.JavascriptInterface;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.RelativeLayout;
import androidx.core.view.ViewCompat;
import com.applovin.mediation.MaxReward;
import com.appnext.R;
import com.appnext.ads.AdsError;
import com.appnext.core.Ad;
import com.appnext.core.AppnextActivity;
import com.appnext.core.AppnextAd;
import com.appnext.core.AppnextError;
import com.appnext.core.SettingsManager;
import com.appnext.core.callbacks.OnAdClicked;
import com.appnext.core.callbacks.OnAdClosed;
import com.appnext.core.callbacks.OnAdError;
import com.appnext.core.f;
import com.appnext.core.g;
import com.appnext.core.i;
import com.appnext.core.n;
import com.appnext.core.p;
import com.appnext.core.result.ResultPageActivity;
import com.appnext.core.result.d;
import com.appnext.core.webview.AppnextWebView;
import com.appnext.core.webview.WebAppInterface;
import e3.b;
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
import java.util.Locale;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class InterstitialActivity extends AppnextActivity {
private ArrayList<AppnextAd> ads;
protected WebView am;
private Interstitial ao;
private InterstitialAd ap;
private Handler at;
private f.a au;
private Boolean autoPlay;
private WebAppInterface av;
private String ay;
private Boolean canClose;
private AppnextAd f11523j;
private Boolean mute;
private boolean an = false;
private String aq = MaxReward.DEFAULT_LABEL;
private boolean ar = false;
private int as = 0;
private boolean aw = false;
private boolean ax = false;
private String az = MaxReward.DEFAULT_LABEL;
private boolean aA = false;
private Runnable aB = new Runnable() {
@Override
public final void run() {
InterstitialActivity.this.pageFinished();
}
};
protected class WebInterface extends WebAppInterface {
public WebInterface() {
super(InterstitialActivity.this);
}
@Override
@JavascriptInterface
public void destroy(String str) {
try {
if (str.equals("c_close")) {
InterstitialActivity.this.aA = true;
InterstitialActivity.this.runOnUiThread(new Runnable() {
@Override
public final void run() {
try {
JSONObject jSONObject = new JSONObject(InterstitialActivity.this.ap.getAdJSON());
jSONObject.put("urlApp", jSONObject.getString("urlApp") + "&tem_id=156");
InterstitialActivity.this.e(jSONObject.toString());
} catch (JSONException unused) {
InterstitialActivity interstitialActivity = InterstitialActivity.this;
interstitialActivity.e(interstitialActivity.ap.getAdJSON());
}
}
});
} else if (str.equals("close")) {
InterstitialActivity.this.runOnUiThread(new Runnable() {
@Override
public final void run() {
InterstitialActivity.this.a();
InterstitialActivity.this.finish();
}
});
} else {
InterstitialActivity.this.runOnUiThread(new Runnable() {
@Override
public final void run() {
InterstitialActivity.this.onError(AdsError.AD_NOT_READY);
InterstitialActivity.this.finish();
}
});
}
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$destroy", th);
}
}
@Override
@JavascriptInterface
public String filterAds(String str) {
return str;
}
@Override
@JavascriptInterface
public void gotoAppWall() {
}
@Override
@JavascriptInterface
public void jsError(String str) {
try {
if (!TextUtils.isEmpty(str) || (!str.contains("is not a function") && !str.contains("has no method"))) {
InterstitialActivity.this.onError(AppnextError.INTERNAL_ERROR);
InterstitialActivity.this.finish();
return;
}
InterstitialActivity interstitialActivity = InterstitialActivity.this;
int i5 = interstitialActivity.as;
interstitialActivity.as = i5 + 1;
if (i5 < 5) {
InterstitialActivity.this.at.postDelayed(InterstitialActivity.this.aB, 500L);
} else {
InterstitialActivity.this.onError(AppnextError.INTERNAL_ERROR);
InterstitialActivity.this.finish();
}
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$jsError", th);
}
}
@Override
@JavascriptInterface
public String loadAds() {
return MaxReward.DEFAULT_LABEL;
}
@Override
@JavascriptInterface
public void logSTP(String str, String str2) {
try {
g.a(InterstitialActivity.this.ao, InterstitialActivity.this.ap, str, str2, InterstitialActivity.this.getConfig());
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$logSTP", th);
}
}
@Override
@JavascriptInterface
public void notifyImpression(String str) {
super.notifyImpression(str);
try {
if (InterstitialActivity.this.ap != null) {
InterstitialActivity interstitialActivity = InterstitialActivity.this;
interstitialActivity.c(interstitialActivity.ap.getBannerID());
InterstitialActivity.this.ap.setImpressionURL(str);
((AppnextActivity) InterstitialActivity.this).handler.postDelayed(InterstitialActivity.this.new a(str), Long.parseLong(InterstitialActivity.this.getConfig().t("postpone_impression_sec")) * 1000);
}
if (InterstitialActivity.this.autoPlay == null || !InterstitialActivity.this.autoPlay.booleanValue()) {
return;
}
play();
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$notifyImpression", th);
}
}
@Override
@JavascriptInterface
public void openLink(String str) {
try {
InterstitialActivity.this.startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str)));
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$openLink", th);
}
}
@Override
@JavascriptInterface
public void openResultPage(String str) {
try {
d.ay().a(new com.appnext.core.result.c() {
@Override
public final com.appnext.core.result.a A() {
return new com.appnext.core.result.a() {
@Override
public final Object B() {
return null;
}
@Override
public final String getFallbackScript() {
return null;
}
@Override
public final String getJSurl() {
return "https://cdn.appnext.com/tools/sdk/interstitial/v75/result.min.js";
}
@Override
public final WebViewClient getWebViewClient() {
return null;
}
};
}
@Override
public final JSONObject getConfigParams() throws JSONException {
JSONObject jSONObject = new JSONObject();
jSONObject.put("vid", "2.7.0.473");
Interstitial interstitial = InterstitialActivity.this.ao;
String str2 = MaxReward.DEFAULT_LABEL;
jSONObject.put("tid", interstitial == null ? MaxReward.DEFAULT_LABEL : InterstitialActivity.this.ao.getTID());
if (InterstitialActivity.this.ao != null) {
str2 = InterstitialActivity.this.ao.getAUID();
}
jSONObject.put("auid", str2);
jSONObject.put("osid", "100");
jSONObject.put("tem_id", "1601");
jSONObject.put("id", getPlacementId());
jSONObject.put("cat", InterstitialActivity.this.ap.getCategories());
jSONObject.put("lockcat", InterstitialActivity.this.ap.getSpecificCategories());
jSONObject.put("pview", InterstitialActivity.this.getConfig().t("pview"));
jSONObject.put("devn", g.V());
jSONObject.put("dosv", Build.VERSION.SDK_INT);
jSONObject.put("dds", "0");
jSONObject.put("ads_type", "banner");
jSONObject.put("country", InterstitialActivity.this.ap.getCountry());
jSONObject.put("gdpr", i.a(InterstitialActivity.this.ap, InterstitialActivity.this.getConfig()));
return jSONObject;
}
@Override
public final String getPlacementId() {
return ((AppnextActivity) InterstitialActivity.this).placementID;
}
@Override
public final AppnextAd getSelectedAd() {
return InterstitialActivity.this.ap;
}
@Override
public final String v() {
return "160";
}
@Override
public final String w() {
return com.appnext.ads.interstitial.a.C().k(InterstitialActivity.this.ao);
}
@Override
public final String x() {
return InterstitialActivity.this.ay;
}
@Override
public final SettingsManager y() {
return InterstitialActivity.this.getConfig();
}
@Override
public final Ad z() {
return InterstitialActivity.this.ao;
}
});
Intent intent = new Intent(InterstitialActivity.this, (Class<?>) ResultPageActivity.class);
intent.putExtra("shouldClose", false);
intent.setFlags(65536);
InterstitialActivity.this.startActivity(intent);
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$openResultPage", th);
}
}
@Override
@JavascriptInterface
public void openStore(final String str) {
InterstitialActivity.this.runOnUiThread(new Runnable() {
@Override
public final void run() {
InterstitialActivity.this.e(str);
}
});
}
@Override
@JavascriptInterface
public void play() {
try {
String unused = ((AppnextActivity) InterstitialActivity.this).placementID;
InterstitialActivity.this.play();
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$play", th);
}
}
@Override
@JavascriptInterface
public void postView(String str) {
try {
if (InterstitialActivity.this.ap != null) {
InterstitialActivity.this.c(g.f(str, "b"));
}
if (Boolean.parseBoolean(InterstitialActivity.this.d("pview"))) {
((AppnextActivity) InterstitialActivity.this).handler.postDelayed(InterstitialActivity.this.new b(str), Long.parseLong(InterstitialActivity.this.getConfig().t("postpone_vta_sec")) * 1000);
}
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$postView", th);
}
}
@Override
@JavascriptInterface
public void videoPlayed() {
}
}
private class a implements Runnable {
AppnextAd aF;
a(String str) {
try {
InterstitialAd interstitialAd = new InterstitialAd(InterstitialActivity.this.ap);
this.aF = interstitialAd;
interstitialAd.setImpressionURL(str);
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$Impression", th);
}
}
@Override
public final void run() {
try {
if (((AppnextActivity) InterstitialActivity.this).userAction != null) {
((AppnextActivity) InterstitialActivity.this).userAction.d(this.aF);
InterstitialActivity interstitialActivity = InterstitialActivity.this;
interstitialActivity.a(interstitialActivity, "impression_event");
}
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$Impression", th);
}
}
}
private class b implements Runnable {
AppnextAd aF;
b(String str) {
try {
com.appnext.ads.interstitial.a.C();
this.aF = (AppnextAd) com.appnext.core.d.parseAd(str);
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$PostView", th);
}
}
@Override
public final void run() {
try {
InterstitialActivity.this.a(this.aF, (f.a) null);
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$PostView", th);
}
}
}
private void loadJS(final String str) {
runOnUiThread(new Runnable() {
@Override
public final void run() {
WebView webView = InterstitialActivity.this.am;
if (webView != null) {
try {
webView.loadUrl("javascript:(function() { try { " + str + "} catch(err){ Appnext.jsError(err.message); }})()");
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$loadJS", th);
}
}
}
});
}
public void pageFinished() {
try {
Handler handler = this.at;
if (handler != null) {
handler.removeCallbacks(this.aB);
}
this.an = true;
String string = getIntent().getExtras().getString("creative");
this.aq = string;
if (string == null || string.equals(Interstitial.TYPE_MANAGED)) {
this.aq = d("creative");
}
n.aa().a(new Runnable() {
@Override
public final void run() {
InterstitialActivity.this.t();
}
});
WebView webView = this.am;
if (webView == null) {
onError(AppnextError.INTERNAL_ERROR);
finish();
return;
}
if (webView.getParent() != null) {
((ViewGroup) this.am.getParent()).removeView(this.am);
}
this.cv.addView(this.am);
this.am.getLayoutParams().width = -1;
this.am.getLayoutParams().height = -1;
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$pageFinished", th);
}
}
public void play() {
loadJS("Appnext.Layout.Video.play();");
}
@Override
protected final SettingsManager getConfig() {
return c.E();
}
@Override
public void onBackPressed() {
try {
Boolean bool = this.canClose;
if (bool != null) {
if (!bool.booleanValue()) {
return;
}
} else if (!Boolean.parseBoolean(d("can_close"))) {
return;
}
loadJS("Appnext.Layout.destroy('internal');");
this.ar = true;
a();
finish();
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$onBackPressed", th);
}
}
@Override
protected void onCreate(Bundle bundle) {
setRequestedOrientation(7);
super.onCreate(bundle);
try {
if (Interstitial.currentAd == null) {
finish();
return;
}
this.ao = new Interstitial(Interstitial.currentAd);
if (getRequestedOrientation() == 6) {
a(this, "loaded_landscape");
} else {
a(this, "loaded_portrait");
}
RelativeLayout relativeLayout = new RelativeLayout(this);
this.cv = relativeLayout;
setContentView(relativeLayout);
this.cv.getLayoutParams().width = -1;
this.cv.getLayoutParams().height = -1;
this.cv.setBackgroundColor(-1);
try {
this.placementID = getIntent().getExtras().getString("id");
if (getIntent().hasExtra("auto_play")) {
Boolean valueOf = Boolean.valueOf(getIntent().getBooleanExtra("auto_play", true));
this.autoPlay = valueOf;
if (valueOf.booleanValue()) {
a(this, "auto_play_on");
} else {
a(this, "auto_play_off");
}
}
if (getIntent().hasExtra("can_close")) {
this.canClose = Boolean.valueOf(getIntent().getBooleanExtra("can_close", false));
}
if (getIntent().hasExtra("mute")) {
Boolean valueOf2 = Boolean.valueOf(getIntent().getBooleanExtra("mute", true));
this.mute = valueOf2;
if (valueOf2.booleanValue()) {
a(this, "mute_on");
} else {
a(this, "mute_off");
}
}
if (getIntent().hasExtra("pview")) {
this.ct = getIntent().getStringExtra("pview");
this.banner = getIntent().getStringExtra("banner");
this.guid = getIntent().getStringExtra("guid");
}
if (getIntent().getSerializableExtra("ads") != null) {
this.ads = (ArrayList) getIntent().getSerializableExtra("ads");
}
this.at = new Handler();
AppnextWebView.q(this).a(this.ao.getPageUrl(), new AppnextWebView.c() {
@Override
public final void error(String str) {
try {
InterstitialActivity.this.r();
} catch (Throwable unused) {
}
}
@Override
public final void f(String str) {
InterstitialActivity.this.r();
}
});
this.au = new f.a() {
@Override
public final void error(String str) {
try {
if (((AppnextActivity) InterstitialActivity.this).handler != null) {
((AppnextActivity) InterstitialActivity.this).handler.removeCallbacks(null);
}
InterstitialActivity.this.S();
String unused = ((AppnextActivity) InterstitialActivity.this).placementID;
new InterstitialAd(InterstitialActivity.this.f11523j).getAppURL();
} catch (Throwable unused2) {
}
}
@Override
public final void onMarket(String str) {
try {
if (((AppnextActivity) InterstitialActivity.this).handler != null) {
((AppnextActivity) InterstitialActivity.this).handler.removeCallbacks(null);
}
InterstitialActivity.this.S();
} catch (Throwable unused) {
}
}
};
this.userAction = new p(this, new p.a() {
@Override
public final Ad c() {
return InterstitialActivity.this.ao;
}
@Override
public final AppnextAd d() {
return InterstitialActivity.this.f11523j;
}
@Override
public final SettingsManager e() {
return InterstitialActivity.this.getConfig();
}
@Override
public final void report(String str) {
}
});
n.aa().a(new Runnable() {
@Override
public final void run() {
try {
InterstitialActivity interstitialActivity = InterstitialActivity.this;
interstitialActivity.az = g.b((Context) interstitialActivity, true);
} catch (Throwable unused) {
}
}
});
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$onCreate", th);
finish();
}
} catch (Throwable th2) {
com.appnext.base.a.a("InterstitialActivity$onCreate", th2);
}
}
@Override
protected void onDestroy() {
super.onDestroy();
try {
com.appnext.ads.interstitial.a.C().g(this.ao);
this.ao.destroy();
this.ao = null;
Handler handler = this.at;
if (handler != null) {
handler.removeCallbacksAndMessages(null);
}
this.at = null;
this.aB = null;
this.ap = null;
WebView webView = this.am;
if (webView != null) {
webView.stopLoading();
if (this.am.getParent() != null) {
((ViewGroup) this.am.getParent()).removeView(this.am);
}
this.am.setWebChromeClient(null);
this.am.setWebViewClient(null);
this.am.destroy();
this.am = null;
}
AppnextWebView.q(this).a(s());
this.av = null;
this.au = null;
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$onDestroy", th);
}
}
@Override
protected final void onError(final String str) {
try {
runOnUiThread(new Runnable() {
@Override
public final void run() {
if (InterstitialActivity.this.ao != null) {
try {
OnAdError onAdErrorCallback = InterstitialActivity.this.ao.getOnAdErrorCallback();
if (onAdErrorCallback != null) {
onAdErrorCallback.adError(str);
}
} catch (Throwable unused) {
}
}
}
});
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$onError", th);
}
}
@Override
protected void onPause() {
super.onPause();
try {
if (this.ar) {
return;
}
try {
WebView webView = this.am;
if (webView != null) {
webView.loadUrl("javascript:(function() { Appnext.Layout.Video.pause();})()");
}
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$stop", th);
}
} catch (Throwable th2) {
com.appnext.base.a.a("InterstitialActivity$onPause", th2);
}
}
@Override
protected void onResume() {
Boolean bool;
super.onResume();
try {
if (this.aA) {
a();
finish();
return;
}
if (this.an && (bool = this.autoPlay) != null && bool.booleanValue()) {
loadJS("Appnext.Layout.Video.play();");
}
try {
this.am.loadUrl("javascript:(function() { try{Appnext.countToClose();}catch(e){}})()");
} catch (Throwable unused) {
}
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$onResume", th);
}
}
public void c(final String str) {
n.aa().a(new Runnable() {
@Override
public final void run() {
try {
if (TextUtils.isEmpty(((AppnextActivity) InterstitialActivity.this).placementID) || TextUtils.isEmpty(str)) {
return;
}
com.appnext.core.adswatched.a.l(InterstitialActivity.this).j(str, InterstitialActivity.this.ao.getAUID());
} catch (Throwable unused) {
}
}
});
}
public String d(String str) {
String t4 = c.E().t(str);
return t4 == null ? MaxReward.DEFAULT_LABEL : t4;
}
public void e(String str) {
OnAdClicked onAdClickedCallback;
try {
com.appnext.ads.interstitial.a.C();
AppnextAd appnextAd = (AppnextAd) com.appnext.core.d.parseAd(str);
if (appnextAd == null) {
return;
}
this.f11523j = new InterstitialAd(appnextAd);
Interstitial interstitial = this.ao;
if (interstitial != null && (onAdClickedCallback = interstitial.getOnAdClickedCallback()) != null) {
onAdClickedCallback.adClicked();
}
b(this.f11523j, this.au);
a(this, "click_event");
String bannerID = this.f11523j.getBannerID();
InterstitialAd interstitialAd = this.ap;
if (bannerID.equals(interstitialAd != null ? interstitialAd.getBannerID() : MaxReward.DEFAULT_LABEL)) {
if (this.aw) {
return;
}
this.aw = true;
a(this, "interstitial_main_click");
return;
}
if (this.ax) {
return;
}
this.ax = true;
a(this, "interstitial_suggested_click");
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$adClick", th);
}
}
public void r() {
try {
AppnextWebView q4 = AppnextWebView.q(this);
this.am = q4.C(this.ads != null ? "fullscreen" : "interstitial");
WebView a5 = q4.a(this, this.ao.getPlacementID(), this.ao.getAUID(), this.ao.getPageUrl(), s(), this.ao.getFallback(), this.ads != null ? "fullscreen" : "interstitial");
this.am = a5;
a5.setWebViewClient(new WebViewClient() {
@Override
public final void onPageFinished(WebView webView, String str) {
super.onPageFinished(webView, str);
InterstitialActivity.this.at.removeCallbacksAndMessages(null);
InterstitialActivity.this.pageFinished();
}
@Override
public final boolean shouldOverrideUrlLoading(WebView webView, String str) {
if (str == null) {
return false;
}
if (!str.startsWith("http")) {
return super.shouldOverrideUrlLoading(webView, str);
}
webView.loadUrl(str);
return true;
}
});
this.am.setWebChromeClient(new WebChromeClient() {
@Override
public final boolean onConsoleMessage(ConsoleMessage consoleMessage) {
consoleMessage.message();
if (consoleMessage.message().contains("pause")) {
return true;
}
if (!consoleMessage.message().contains("TypeError") && !consoleMessage.message().contains("has no method") && !consoleMessage.message().contains("is not a function")) {
return true;
}
InterstitialActivity.this.onError(AppnextError.INTERNAL_ERROR);
InterstitialActivity.this.finish();
return true;
}
});
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$initWebView", th);
onError(AppnextError.INTERNAL_ERROR);
finish();
}
}
@Override
protected final void b(AppnextAd appnextAd, f.a aVar) {
try {
a(this.cv, getResources().getDrawable(R.drawable.apnxt_loader));
super.b(appnextAd, aVar);
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$doClick", th);
}
}
protected final WebAppInterface s() {
if (this.av == null) {
this.av = new WebInterface();
}
return this.av;
}
protected final synchronized void t() {
throw new UnsupportedOperationException("Method not decompiled: com.appnext.ads.interstitial.InterstitialActivity.t():void");
}
protected final JSONObject u() throws JSONException {
String str;
try {
String d5 = this.ao.getButtonColor().equals(MaxReward.DEFAULT_LABEL) ? d("button_color") : this.ao.getButtonColor();
if (d5.startsWith("#")) {
d5 = d5.substring(1);
}
if (this.autoPlay == null) {
this.autoPlay = Boolean.valueOf(Boolean.parseBoolean(d("auto_play")));
}
if (this.mute == null) {
this.mute = Boolean.valueOf(Boolean.parseBoolean(d("mute")));
}
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("id", this.placementID);
jSONObject.put("cat", this.ao.getCategories());
jSONObject.put("lockcat", this.ao.getSpecificCategories());
jSONObject.put("pbk", this.ao.getPostback());
jSONObject.put("b_color", d5);
if (this.ads == null) {
jSONObject.put("skip_title", this.ao.getSkipText().equals(MaxReward.DEFAULT_LABEL) ? d("skip_title") : this.ao.getSkipText());
jSONObject.put("pview", this.ads != null ? "false" : d("pview"));
jSONObject.put("video_length", d("video_length"));
jSONObject.put("min_internet_connection", d("min_internet_connection"));
jSONObject.put("min_internet_connection_video", d("min_internet_connection_video"));
StringBuilder sb = new StringBuilder();
sb.append(this.mute);
jSONObject.put("mute", sb.toString());
StringBuilder sb2 = new StringBuilder();
sb2.append(this.autoPlay);
jSONObject.put("auto_play", sb2.toString());
jSONObject.put("remove_poster_on_auto_play", d("remove_poster_on_auto_play"));
jSONObject.put("show_rating", d("show_rating"));
jSONObject.put("show_desc", d("show_desc"));
jSONObject.put("creative", this.aq);
jSONObject.put("remote_auto_play", true);
}
jSONObject.put("stp_flag", d("stp_flag"));
jSONObject.put("ext", "t");
jSONObject.put("dct", g.c(this));
jSONObject.put("did", this.az);
jSONObject.put("devn", g.V());
jSONObject.put("dosv", Build.VERSION.SDK_INT);
jSONObject.put("dds", "0");
jSONObject.put("urlApp_protection", d("urlApp_protection"));
jSONObject.put("vid", this.ao.getVID());
jSONObject.put("tid", this.ao.getTID());
jSONObject.put("auid", this.ao.getAUID());
jSONObject.put("osid", "100");
jSONObject.put("ads_type", "interstitial");
jSONObject.put("country", this.ap.getCountry());
jSONObject.put("gdpr", i.a(this.ap, c.E()));
jSONObject.put("lang_settings", new JSONObject(com.appnext.core.a.a.n(this).ag()).toString());
String language = this.ao.getLanguage();
if (language == null || language.equals(MaxReward.DEFAULT_LABEL)) {
language = Locale.getDefault().getLanguage().toUpperCase();
}
jSONObject.put("lang", language);
jSONObject.put("tem", new JSONArray(d("S1")).toString());
jSONObject.put("click_x", d("clickType_A"));
if (getIntent() != null && getIntent().hasExtra("show_desc")) {
jSONObject.put("show_desc", getIntent().getStringExtra("show_desc"));
}
try {
Bitmap p4 = g.p(this.ap.getImageURL());
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
p4.compress(Bitmap.CompressFormat.PNG, 100, byteArrayOutputStream);
str = null;
String str2 = "data:image/" + this.ap.getImageURL().substring(this.ap.getImageURL().lastIndexOf(46) + 1) + ";base64," + Base64.encodeToString(byteArrayOutputStream.toByteArray(), 0);
try {
try {
b.d i5 = e3.b.b(p4).a().i();
if (i5 != null) {
jSONObject.put("icon_color", String.format("#%06X", Integer.valueOf(i5.e() & ViewCompat.MEASURED_SIZE_MASK)));
} else {
jSONObject.put("icon_color", MaxReward.DEFAULT_LABEL);
}
str = "InterstitialActivity$getAdParams";
} catch (Throwable th) {
str = "InterstitialActivity$getAdParams";
com.appnext.base.a.a(str, th);
jSONObject.put("icon_color", MaxReward.DEFAULT_LABEL);
}
jSONObject.put("icon_src", str2);
} catch (Throwable th2) {
th = th2;
try {
com.appnext.base.a.a(str, th);
return jSONObject;
} catch (Throwable th3) {
th = th3;
com.appnext.base.a.a(str, th);
return new JSONObject();
}
}
} catch (Throwable th4) {
th = th4;
str = "InterstitialActivity$getAdParams";
}
return jSONObject;
} catch (Throwable th5) {
th = th5;
str = "InterstitialActivity$getAdParams";
}
} catch (Throwable th6) {
th = th6;
str = "InterstitialActivity$getAdParams";
}
}
public void a() {
OnAdClosed onAdClosedCallback;
try {
Interstitial interstitial = this.ao;
if (interstitial == null || (onAdClosedCallback = interstitial.getOnAdClosedCallback()) == null) {
return;
}
onAdClosedCallback.onAdClosed();
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$onClose", th);
}
}
public void a(Context context, String str) {
try {
Interstitial interstitial = this.ao;
if (interstitial != null) {
String tid = interstitial.getTID();
String vid = this.ao.getVID();
String auid = this.ao.getAUID();
String placementID = this.ao.getPlacementID();
String sessionId = this.ao.getSessionId();
InterstitialAd interstitialAd = this.ap;
String bannerID = interstitialAd != null ? interstitialAd.getBannerID() : MaxReward.DEFAULT_LABEL;
InterstitialAd interstitialAd2 = this.ap;
g.a(context, tid, vid, auid, placementID, sessionId, str, "current_interstitial", bannerID, interstitialAd2 != null ? interstitialAd2.getCampaignID() : MaxReward.DEFAULT_LABEL);
}
} catch (Throwable th) {
com.appnext.base.a.a("InterstitialActivity$report", th);
}
}
}