ZStore v1.7版本的 MD5 值为:ca9bb200afd8d690876bd39318f8215c
以下内容为反编译后的 m.java 源代码,内容仅作参考
package com.applovin.impl.adview;
import android.R;
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.x 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, R.style.Theme.Translucent.NoTitleBar);
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.M();
this.a = activity;
this.d = dVar;
this.e = aVar;
requestWindowFeature(1);
setCancelable(false);
}
@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 {
com.applovin.impl.sdk.x xVar = this.c;
if (com.applovin.impl.sdk.x.a()) {
this.c.e("ExpandedAdDialog", "Unable to turn on hardware acceleration - window is null");
}
}
} catch (Throwable th) {
com.applovin.impl.sdk.x xVar2 = this.c;
if (com.applovin.impl.sdk.x.a()) {
this.c.b("ExpandedAdDialog", "Setting window flags failed.", th);
}
}
}
private void c() {
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
layoutParams.addRule(13);
this.d.setLayoutParams(layoutParams);
this.f = new RelativeLayout(this.a);
this.f.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();
}
@Override
public void onBackPressed() {
this.d.a("javascript:al_onBackPressed();", new Runnable() {
@Override
public void run() {
m.this.dismiss();
}
});
}
@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();
}
});
}
private void a(j.a aVar) {
if (this.g != null) {
com.applovin.impl.sdk.x xVar = this.c;
if (com.applovin.impl.sdk.x.a()) {
this.c.d("ExpandedAdDialog", "Attempting to create duplicate close button");
return;
}
return;
}
this.g = j.a(aVar, this.a);
this.g.setVisibility(8);
this.g.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
m.this.d();
}
});
this.g.setClickable(false);
int a = a(((Integer) this.b.a(com.applovin.impl.sdk.c.b.ci)).intValue());
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(a, a);
layoutParams.addRule(10);
layoutParams.addRule(((Boolean) this.b.a(com.applovin.impl.sdk.c.b.cl)).booleanValue() ? 9 : 11);
this.g.a(a);
int a2 = a(((Integer) this.b.a(com.applovin.impl.sdk.c.b.ck)).intValue());
int a3 = a(((Integer) this.b.a(com.applovin.impl.sdk.c.b.cj)).intValue());
layoutParams.setMargins(a3, a2, a3, 0);
this.f.addView(this.g, layoutParams);
this.g.bringToFront();
int a4 = a(((Integer) this.b.a(com.applovin.impl.sdk.c.b.cm)).intValue());
View view = new View(this.a);
view.setBackgroundColor(0);
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(a + a4, a4 + a);
layoutParams2.addRule(10);
layoutParams2.addRule(((Boolean) this.b.a(com.applovin.impl.sdk.c.b.cl)).booleanValue() ? 9 : 11);
layoutParams2.setMargins(a3 - a(5), a2 - a(5), a3 - 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 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 onAnimationStart(Animation animation) {
}
@Override
public void onAnimationEnd(Animation animation) {
m.this.g.setClickable(true);
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
m.this.g.startAnimation(alphaAnimation);
} catch (Throwable th) {
com.applovin.impl.sdk.x unused = m.this.c;
if (com.applovin.impl.sdk.x.a()) {
m.this.c.b("ExpandedAdDialog", "Unable to fade in close button", th);
}
m.this.d();
}
}
});
}
private int a(int i) {
return AppLovinSdkUtils.dpToPx(this.a, i);
}
public com.applovin.impl.sdk.ad.a a() {
return this.e;
}
public d b() {
return this.d;
}
}