正在查看: Antivirus Cleaner v1.2.0.0 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Antivirus Cleaner v1.2.0.0 应用的 f.java JAVA 源代码文件
本页面展示 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.e;
import com.applovin.impl.g1;
import com.applovin.impl.l4;
import com.applovin.sdk.AppLovinSdkUtils;
import okhttp3.internal.http2.Http2Connection;
class f extends Dialog implements g1 {
private final Activity f5364a;
private final com.applovin.impl.sdk.j f5365b;
private final com.applovin.impl.sdk.n f5366c;
private final b f5367d;
private final com.applovin.impl.sdk.ad.a f5368e;
private RelativeLayout f5369f;
private e f5370g;
public f(com.applovin.impl.sdk.ad.a aVar, b bVar, Activity activity, com.applovin.impl.sdk.j jVar) {
super(activity, R.style.Theme.Translucent.NoTitleBar);
if (aVar == null) {
throw new IllegalArgumentException("No ad specified");
}
if (bVar == null) {
throw new IllegalArgumentException("No main view specified");
}
if (jVar == null) {
throw new IllegalArgumentException("No sdk specified");
}
if (activity == null) {
throw new IllegalArgumentException("No activity specified");
}
this.f5365b = jVar;
this.f5366c = jVar.I();
this.f5364a = activity;
this.f5367d = bVar;
this.f5368e = aVar;
requestWindowFeature(1);
setCancelable(false);
}
private void g() {
this.f5364a.runOnUiThread(new Runnable() {
@Override
public final void run() {
f.this.f();
}
});
}
@Override
public void dismiss() {
this.f5364a.runOnUiThread(new Runnable() {
@Override
public final void run() {
f.this.e();
}
});
}
@Override
public void onBackPressed() {
this.f5367d.a("javascript:al_onBackPressed();");
dismiss();
}
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
d();
}
@Override
public void onStart() {
super.onStart();
try {
Window window = getWindow();
if (window != null) {
window.setFlags(this.f5364a.getWindow().getAttributes().flags, this.f5364a.getWindow().getAttributes().flags);
window.addFlags(Http2Connection.OKHTTP_CLIENT_WINDOW_SIZE);
} else if (com.applovin.impl.sdk.n.a()) {
this.f5366c.b("ExpandedAdDialog", "Unable to turn on hardware acceleration - window is null");
}
} catch (Throwable th) {
if (com.applovin.impl.sdk.n.a()) {
this.f5366c.a("ExpandedAdDialog", "Setting window flags failed.", th);
}
}
}
private void a() {
this.f5367d.a("javascript:al_onCloseTapped();");
dismiss();
}
public void b(View view) {
if (this.f5370g.isClickable()) {
this.f5370g.performClick();
}
}
private void d() {
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(-1, -1);
layoutParams.addRule(13);
this.f5367d.setLayoutParams(layoutParams);
RelativeLayout relativeLayout = new RelativeLayout(this.f5364a);
this.f5369f = relativeLayout;
relativeLayout.setLayoutParams(new RelativeLayout.LayoutParams(-1, -1));
this.f5369f.setBackgroundColor(-1157627904);
this.f5369f.addView(this.f5367d);
if (!this.f5368e.k1()) {
a(this.f5368e.e1());
g();
}
setContentView(this.f5369f);
}
public void e() {
this.f5369f.removeView(this.f5367d);
super.dismiss();
}
public void f() {
try {
if (this.f5370g == null) {
a();
}
this.f5370g.setVisibility(0);
this.f5370g.bringToFront();
AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f);
alphaAnimation.setDuration(300L);
alphaAnimation.setAnimationListener(new a());
this.f5370g.startAnimation(alphaAnimation);
} catch (Throwable th) {
if (com.applovin.impl.sdk.n.a()) {
this.f5366c.a("ExpandedAdDialog", "Unable to fade in close button", th);
}
a();
}
}
public b c() {
return this.f5367d;
}
private void a(e.a aVar) {
if (this.f5370g != null) {
if (com.applovin.impl.sdk.n.a()) {
this.f5366c.k("ExpandedAdDialog", "Attempting to create duplicate close button");
return;
}
return;
}
e a4 = e.a(aVar, this.f5364a);
this.f5370g = a4;
a4.setVisibility(8);
this.f5370g.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
f.this.a(view);
}
});
this.f5370g.setClickable(false);
int a5 = a(((Integer) this.f5365b.a(l4.f6183u1)).intValue());
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(a5, a5);
layoutParams.addRule(10);
com.applovin.impl.sdk.j jVar = this.f5365b;
l4 l4Var = l4.f6198x1;
layoutParams.addRule(((Boolean) jVar.a(l4Var)).booleanValue() ? 9 : 11);
this.f5370g.a(a5);
int a6 = a(((Integer) this.f5365b.a(l4.f6193w1)).intValue());
int a7 = a(((Integer) this.f5365b.a(l4.f6188v1)).intValue());
layoutParams.setMargins(a7, a6, a7, 0);
this.f5369f.addView(this.f5370g, layoutParams);
this.f5370g.bringToFront();
int a8 = a(((Integer) this.f5365b.a(l4.f6202y1)).intValue());
View view = new View(this.f5364a);
view.setBackgroundColor(0);
int i4 = a5 + a8;
RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(i4, i4);
layoutParams2.addRule(10);
layoutParams2.addRule(((Boolean) this.f5365b.a(l4Var)).booleanValue() ? 9 : 11);
layoutParams2.setMargins(a7 - a(5), a6 - a(5), a7 - a(5), 0);
view.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
f.this.b(view2);
}
});
this.f5369f.addView(view, layoutParams2);
view.bringToFront();
}
public com.applovin.impl.sdk.ad.a b() {
return this.f5368e;
}
public class a implements Animation.AnimationListener {
public a() {
}
@Override
public void onAnimationEnd(Animation animation) {
f.this.f5370g.setClickable(true);
}
@Override
public void onAnimationRepeat(Animation animation) {
}
@Override
public void onAnimationStart(Animation animation) {
}
}
public void a(View view) {
a();
}
private int a(int i4) {
return AppLovinSdkUtils.dpToPx(this.f5364a, i4);
}
}