光速虚拟机 v3.8.2版本的 MD5 值为:a73059742a0ed25d6979f838470f59dd
以下内容为反编译后的 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 a;
private final com.applovin.impl.sdk.o b;
private final com.applovin.impl.sdk.y c;
private final d d;
private final com.applovin.impl.sdk.ad.a e;
private RelativeLayout f;
private j g;
public m(com.applovin.impl.sdk.ad.a aVar, d dVar, Activity activity, com.applovin.impl.sdk.o oVar) {
super(activity, 16973840);
if (aVar == null) {
throw new IllegalArgumentException("No ad specified");
}
if (dVar == null) {
throw new IllegalArgumentException("No main view specified");
}
if (oVar == null) {
throw new IllegalArgumentException("No sdk specified");
}
if (activity == null) {
throw new IllegalArgumentException("No activity specified");
}
this.b = oVar;
this.c = oVar.F();
this.a = activity;
this.d = dVar;
this.e = aVar;
requestWindowFeature(1);
setCancelable(false);
}
private int a(int i) {
return AppLovinSdkUtils.dpToPx(this.a, i);
}
private void a(j.a aVar) {
if (this.g != null) {
if (com.applovin.impl.sdk.y.a()) {
this.c.d("ExpandedAdDialog", "Attempting to create duplicate close button");
return;
}
return;
}
j a = j.a(aVar, this.a);
this.g = a;
a.setVisibility(8);
this.g.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
m.this.d();
}
});
this.g.setClickable(false);
int a2 = a(((Integer) this.b.a(com.applovin.impl.sdk.c.b.cm)).intValue());
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(a2, a2);
layoutParams.addRule(10);
layoutParams.addRule(((Boolean) this.b.a(com.applovin.impl.sdk.c.b.cp)).booleanValue() ? 9 : 11);
this.g.a(a2);
int a3 = a(((Integer) this.b.a(com.applovin.impl.sdk.c.b.co)).intValue());
int a4 = a(((Integer) this.b.a(com.applovin.impl.sdk.c.b.f19cn)).intValue());
layoutParams.setMargins(a4, a3, a4, 0);
this.f.addView(this.g, layoutParams);
this.g.bringToFront();
int a5 = a(((Integer) this.b.a(com.applovin.impl.sdk.c.b.cq)).intValue());
View view = new View(this.a);
view.setBackgroundColor(0);
int i = a2 + a5;
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(i, i);
layoutParams2.addRule(10);
layoutParams2.addRule(((Boolean) this.b.a(com.applovin.impl.sdk.c.b.cp)).booleanValue() ? 9 : 11);
layoutParams2.setMargins(a4 - a(5), a3 - a(5), a4 - a(5), 0);
view.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view2) {
if (m.this.g.isClickable()) {
m.this.g.performClick();
}
}
});
this.f.addView(view, layoutParams2);
view.bringToFront();
}
private void c() {
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
layoutParams.addRule(13);
this.d.setLayoutParams(layoutParams);
RelativeLayout relativeLayout = new RelativeLayout(this.a);
this.f = relativeLayout;
relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
this.f.setBackgroundColor(-1157627904);
this.f.addView(this.d);
if (!this.e.m()) {
a(this.e.n());
e();
}
setContentView(this.f);
}
public void d() {
this.d.a("javascript:al_onCloseTapped();");
dismiss();
}
private void e() {
this.a.runOnUiThread(new Runnable() {
@Override
public void run() {
try {
if (m.this.g == null) {
m.this.d();
}
m.this.g.setVisibility(0);
m.this.g.bringToFront();
AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f);
alphaAnimation.setDuration(300L);
alphaAnimation.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationEnd(Animation animation) {
m.this.g.setClickable(true);
}
@Override
public void onAnimationRepeat(Animation animation) {
}
@Override
public void onAnimationStart(Animation animation) {
}
});
m.this.g.startAnimation(alphaAnimation);
} catch (Throwable th) {
com.applovin.impl.sdk.y unused = m.this.c;
if (com.applovin.impl.sdk.y.a()) {
m.this.c.b("ExpandedAdDialog", "Unable to fade in close button", th);
}
m.this.d();
}
}
});
}
public com.applovin.impl.sdk.ad.a a() {
return this.e;
}
public d b() {
return this.d;
}
@Override
public void dismiss() {
com.applovin.impl.sdk.d.d statsManagerHelper = this.d.getStatsManagerHelper();
if (statsManagerHelper != null) {
statsManagerHelper.e();
}
this.a.runOnUiThread(new Runnable() {
@Override
public void run() {
m.this.f.removeView(m.this.d);
m.super.dismiss();
}
});
}
@Override
public void onBackPressed() {
this.d.a("javascript:al_onBackPressed();", new Runnable() {
@Override
public void run() {
m.this.dismiss();
}
});
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
c();
}
@Override
protected void onStart() {
super.onStart();
try {
Window window = getWindow();
if (window != null) {
window.setFlags(this.a.getWindow().getAttributes().flags, this.a.getWindow().getAttributes().flags);
window.addFlags(16777216);
} else if (com.applovin.impl.sdk.y.a()) {
this.c.e("ExpandedAdDialog", "Unable to turn on hardware acceleration - window is null");
}
} catch (Throwable th) {
if (com.applovin.impl.sdk.y.a()) {
this.c.b("ExpandedAdDialog", "Setting window flags failed.", th);
}
}
}
}