Anti Spy v30.16.1.24版本的 MD5 值为:c71fa7f3f1aa08291411b9a5a8b2e65d
以下内容为反编译后的 m.java 源代码,内容仅作参考
package com.applovin.impl.adview;
import android.app.Activity;
import android.app.Dialog;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.widget.RelativeLayout;
import com.applovin.impl.adview.j;
import com.applovin.sdk.AppLovinSdkUtils;
public class m extends Dialog implements l {
private final Activity ahM;
private final d ahN;
private final com.applovin.impl.sdk.ad.a ahO;
private RelativeLayout ahP;
private j ahQ;
private final com.applovin.impl.sdk.x logger;
private final com.applovin.impl.sdk.n sdk;
public m(com.applovin.impl.sdk.ad.a aVar, d dVar, Activity activity, com.applovin.impl.sdk.n nVar) {
super(activity, 16973840);
if (aVar == null) {
throw new IllegalArgumentException("No ad specified");
}
if (dVar == null) {
throw new IllegalArgumentException("No main view specified");
}
if (nVar == null) {
throw new IllegalArgumentException("No sdk specified");
}
if (activity == null) {
throw new IllegalArgumentException("No activity specified");
}
this.sdk = nVar;
this.logger = nVar.BN();
this.ahM = activity;
this.ahN = dVar;
this.ahO = aVar;
requestWindowFeature(1);
setCancelable(false);
}
private void a(j.a aVar) {
if (this.ahQ != null) {
if (com.applovin.impl.sdk.x.Fn()) {
this.logger.h("ExpandedAdDialog", "Attempting to create duplicate close button");
return;
}
return;
}
j a10 = j.a(aVar, this.ahM);
this.ahQ = a10;
a10.setVisibility(8);
this.ahQ.setOnClickListener(new View.OnClickListener(this) {
public final m f2987b;
{
this.f2987b = this;
}
@Override
public final void onClick(View view) {
int i10 = r2;
m mVar = this.f2987b;
switch (i10) {
case 0:
mVar.j(view);
return;
default:
mVar.i(view);
return;
}
}
});
this.ahQ.setClickable(false);
int ga2 = ga(((Integer) this.sdk.a(com.applovin.impl.sdk.c.b.aME)).intValue());
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(ga2, ga2);
layoutParams.addRule(10);
com.applovin.impl.sdk.n nVar = this.sdk;
com.applovin.impl.sdk.c.b<Boolean> bVar = com.applovin.impl.sdk.c.b.aMH;
layoutParams.addRule(((Boolean) nVar.a(bVar)).booleanValue() ? 9 : 11);
this.ahQ.fZ(ga2);
int ga3 = ga(((Integer) this.sdk.a(com.applovin.impl.sdk.c.b.aMG)).intValue());
int ga4 = ga(((Integer) this.sdk.a(com.applovin.impl.sdk.c.b.aMF)).intValue());
layoutParams.setMargins(ga4, ga3, ga4, 0);
this.ahP.addView(this.ahQ, layoutParams);
this.ahQ.bringToFront();
int ga5 = ga(((Integer) this.sdk.a(com.applovin.impl.sdk.c.b.aMI)).intValue());
View view = new View(this.ahM);
view.setBackgroundColor(0);
int i10 = ga2 + ga5;
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(i10, i10);
layoutParams2.addRule(10);
layoutParams2.addRule(((Boolean) this.sdk.a(bVar)).booleanValue() ? 9 : 11);
layoutParams2.setMargins(ga4 - ga(5), ga3 - ga(5), ga4 - ga(5), 0);
view.setOnClickListener(new View.OnClickListener(this) {
public final m f2987b;
{
this.f2987b = this;
}
@Override
public final void onClick(View view2) {
int i102 = r2;
m mVar = this.f2987b;
switch (i102) {
case 0:
mVar.j(view2);
return;
default:
mVar.i(view2);
return;
}
}
});
this.ahP.addView(view, layoutParams2);
view.bringToFront();
}
private int ga(int i10) {
return AppLovinSdkUtils.dpToPx(this.ahM, i10);
}
public void i(View view) {
if (this.ahQ.isClickable()) {
this.ahQ.performClick();
}
}
public void j(View view) {
rG();
}
private void rF() {
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
layoutParams.addRule(13);
this.ahN.setLayoutParams(layoutParams);
RelativeLayout relativeLayout = new RelativeLayout(this.ahM);
this.ahP = relativeLayout;
relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
this.ahP.setBackgroundColor(-1157627904);
this.ahP.addView(this.ahN);
if (!this.ahO.FN()) {
a(this.ahO.FO());
rH();
}
setContentView(this.ahP);
}
private void rG() {
this.ahN.bq("javascript:al_onCloseTapped();");
dismiss();
}
private void rH() {
this.ahM.runOnUiThread(new g0(this, 0));
}
public void rK() {
try {
if (this.ahQ == null) {
rG();
}
this.ahQ.setVisibility(0);
this.ahQ.bringToFront();
AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f);
alphaAnimation.setDuration(300L);
alphaAnimation.setAnimationListener(new Animation.AnimationListener() {
{
m.this = this;
}
@Override
public void onAnimationEnd(Animation animation) {
m.this.ahQ.setClickable(true);
}
@Override
public void onAnimationRepeat(Animation animation) {
}
@Override
public void onAnimationStart(Animation animation) {
}
});
this.ahQ.startAnimation(alphaAnimation);
} catch (Throwable th) {
if (com.applovin.impl.sdk.x.Fn()) {
this.logger.c("ExpandedAdDialog", "Unable to fade in close button", th);
}
rG();
}
}
public void rL() {
this.ahP.removeView(this.ahN);
super.dismiss();
}
@Override
public void dismiss() {
com.applovin.impl.sdk.d.d statsManagerHelper = this.ahN.getStatsManagerHelper();
if (statsManagerHelper != null) {
statsManagerHelper.JP();
}
this.ahM.runOnUiThread(new g0(this, 1));
}
@Override
public void onBackPressed() {
this.ahN.bq("javascript:al_onBackPressed();");
dismiss();
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
rF();
}
@Override
public void onStart() {
super.onStart();
try {
Window window = getWindow();
if (window != null) {
window.setFlags(this.ahM.getWindow().getAttributes().flags, this.ahM.getWindow().getAttributes().flags);
window.addFlags(16777216);
} else if (com.applovin.impl.sdk.x.Fn()) {
this.logger.i("ExpandedAdDialog", "Unable to turn on hardware acceleration - window is null");
}
} catch (Throwable th) {
if (com.applovin.impl.sdk.x.Fn()) {
this.logger.c("ExpandedAdDialog", "Setting window flags failed.", th);
}
}
}
public com.applovin.impl.sdk.ad.a rI() {
return this.ahO;
}
public d rJ() {
return this.ahN;
}
}