atsameip v0.1版本的 MD5 值为:28547cf98b0a2d02acb37969dcfb83e9
以下内容为反编译后的 g.java 源代码,内容仅作参考
package com.applovin.impl.adview.activity.b;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.drawable.AnimatedVectorDrawable;
import android.net.Uri;
import android.os.StrictMode;
import android.os.SystemClock;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.applovin.impl.adview.m;
import com.applovin.impl.sdk.e.o;
import com.applovin.impl.sdk.e.z;
import com.applovin.impl.sdk.n;
import com.applovin.impl.sdk.utils.Utils;
import com.applovin.impl.sdk.w;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdVideoPlaybackListener;
import com.applovin.sdk.R;
import com.iab.omid.library.applovin.adsession.FriendlyObstructionPurpose;
import java.util.Collections;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
public class g extends com.applovin.impl.adview.activity.b.a implements com.applovin.impl.adview.g {
private AtomicBoolean A;
private AtomicBoolean B;
private boolean C;
private long D;
private long E;
private final com.applovin.impl.adview.activity.a.d t;
private final m u;
private final ImageView v;
private final com.applovin.impl.adview.a w;
private final boolean x;
private double y;
private double z;
private class a implements View.OnClickListener {
private a() {
}
@Override
public void onClick(View view) {
if (view == g.this.u) {
if (!g.this.r()) {
g.this.u();
return;
}
g.this.o();
g.this.q.b();
} else if (view == g.this.v) {
g.this.w();
} else if (w.a()) {
w wVar = g.this.c;
wVar.e("AppLovinFullscreenActivity", "Unhandled click on widget: " + view);
}
}
}
public g(com.applovin.impl.sdk.ad.e eVar, Activity activity, n nVar, AppLovinAdClickListener appLovinAdClickListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
super(eVar, activity, nVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
this.t = new com.applovin.impl.adview.activity.a.d(this.a, this.e, this.b);
this.x = this.a.f();
this.A = new AtomicBoolean();
this.B = new AtomicBoolean();
this.C = Utils.isVideoMutedInitially(this.b);
this.D = -2L;
this.E = 0L;
a aVar = new a();
if (eVar.q() >= 0) {
m mVar = new m(eVar.w(), activity);
this.u = mVar;
mVar.setVisibility(8);
this.u.setOnClickListener(aVar);
} else {
this.u = null;
}
if (a(this.C, nVar)) {
ImageView imageView = new ImageView(activity);
this.v = imageView;
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
this.v.setClickable(true);
this.v.setOnClickListener(aVar);
d(this.C);
} else {
this.v = null;
}
if (!this.x) {
this.w = null;
return;
}
com.applovin.impl.adview.a aVar2 = new com.applovin.impl.adview.a(activity, ((Integer) nVar.a(com.applovin.impl.sdk.c.b.cC)).intValue(), 16842874);
this.w = aVar2;
aVar2.setColor(Color.parseColor("#75FFFFFF"));
this.w.setBackgroundColor(Color.parseColor("#00000000"));
this.w.setVisibility(8);
}
private static boolean a(boolean z, n nVar) {
if (((Boolean) nVar.a(com.applovin.impl.sdk.c.b.cr)).booleanValue()) {
if (!((Boolean) nVar.a(com.applovin.impl.sdk.c.b.cs)).booleanValue() || z) {
return true;
}
return ((Boolean) nVar.a(com.applovin.impl.sdk.c.b.cu)).booleanValue();
}
return false;
}
private void d(boolean z) {
if (com.applovin.impl.sdk.utils.g.d()) {
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) this.e.getDrawable(z ? R.drawable.unmute_to_mute : R.drawable.mute_to_unmute);
if (animatedVectorDrawable != null) {
this.v.setScaleType(ImageView.ScaleType.FIT_XY);
this.v.setImageDrawable(animatedVectorDrawable);
animatedVectorDrawable.start();
return;
}
}
Uri aA = z ? this.a.aA() : this.a.aB();
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
this.v.setImageURI(aA);
StrictMode.setThreadPolicy(allowThreadDiskReads);
}
public void x() {
if (this.B.compareAndSet(false, true)) {
a(this.u, this.a.q(), new Runnable() {
@Override
public void run() {
g.this.D = -1L;
g.this.E = SystemClock.elapsedRealtime();
}
});
}
}
@Override
public void a() {
if (w.a()) {
this.c.b("AppLovinFullscreenActivity", "Continue video from prompt - will resume in onWindowFocusChanged(true) when alert dismisses");
}
}
@Override
public void a(double d) {
b("javascript:al_setVideoMuted(" + this.C + ");");
com.applovin.impl.adview.a aVar = this.w;
if (aVar != null) {
aVar.b();
}
if (this.u != null) {
x();
}
this.f.getController().m();
this.z = d;
t();
if (this.a.ak()) {
this.q.a(this.a, (Runnable) null);
}
}
@Override
public void a(long j) {
}
@Override
public void a(ViewGroup viewGroup) {
this.t.a(this.v, this.u, this.g, this.w, this.f, viewGroup);
this.f.getController().a(this);
a(false);
com.applovin.impl.adview.a aVar = this.w;
if (aVar != null) {
aVar.a();
}
this.f.renderAd(this.a);
if (this.u != null) {
this.b.S().a(new z(this.b, new Runnable() {
@Override
public void run() {
g.this.x();
}
}), o.a.MAIN, this.a.r(), true);
}
this.b.S().a(new z(this.b, new Runnable() {
@Override
public void run() {
if (g.this.g != null) {
g.this.a.o().a(g.this.f, Collections.singletonList(new com.applovin.impl.sdk.a.d(g.this.g, FriendlyObstructionPurpose.CLOSE_AD, "close button")));
} else {
g.this.a.o().a(g.this.f);
}
}
}), o.a.MAIN, 500L);
super.b(this.C);
}
@Override
public void a_() {
v();
}
@Override
public void b() {
if (w.a()) {
this.c.b("AppLovinFullscreenActivity", "Skipping video from prompt");
}
u();
}
@Override
public void b(double d) {
this.y = d;
}
@Override
public void b_() {
com.applovin.impl.adview.a aVar = this.w;
if (aVar != null) {
aVar.a();
}
}
@Override
public void c() {
com.applovin.impl.adview.a aVar = this.w;
if (aVar != null) {
aVar.b();
}
}
@Override
public void d() {
a((ViewGroup) null);
}
@Override
public void e() {
}
@Override
public void h() {
l();
this.a.o().e();
super.h();
}
@Override
protected void l() {
super.a((int) this.y, this.x, q(), this.D);
}
@Override
protected boolean q() {
return this.y >= ((double) this.a.N());
}
@Override
protected boolean r() {
return s() && !q();
}
@Override
protected void t() {
long j;
int l;
if (this.a.aa() >= 0 || this.a.ab() >= 0) {
int i = (this.a.aa() > 0L ? 1 : (this.a.aa() == 0L ? 0 : -1));
com.applovin.impl.sdk.ad.e eVar = this.a;
if (i >= 0) {
j = eVar.aa();
} else {
com.applovin.impl.sdk.ad.a aVar = (com.applovin.impl.sdk.ad.a) eVar;
long millis = this.z > 0.0d ? 0 + TimeUnit.SECONDS.toMillis((long) this.z) : 0L;
if (aVar.ac() && ((l = (int) ((com.applovin.impl.sdk.ad.a) this.a).l()) > 0 || (l = (int) aVar.s()) > 0)) {
millis += TimeUnit.SECONDS.toMillis(l);
}
double d = millis;
double ab = this.a.ab();
Double.isNaN(ab);
Double.isNaN(d);
j = (long) (d * (ab / 100.0d));
}
b(j);
}
}
public void u() {
this.D = SystemClock.elapsedRealtime() - this.E;
if (w.a()) {
this.c.b("AppLovinFullscreenActivity", "Skipping video with skip time: " + this.D + "ms");
}
this.d.f();
this.j++;
if (this.a.x()) {
h();
} else {
v();
}
}
public void v() {
if (this.A.compareAndSet(false, true)) {
if (w.a()) {
this.c.b("AppLovinFullscreenActivity", "Showing postitial...");
}
b("javascript:al_showPostitial();");
m mVar = this.u;
if (mVar != null) {
mVar.setVisibility(8);
}
ImageView imageView = this.v;
if (imageView != null) {
imageView.setVisibility(8);
}
com.applovin.impl.adview.a aVar = this.w;
if (aVar != null) {
aVar.b();
}
if (this.g != null) {
if (this.a.s() >= 0) {
a(this.g, this.a.s(), new Runnable() {
@Override
public void run() {
g.this.i = SystemClock.elapsedRealtime();
}
});
} else {
this.g.setVisibility(0);
}
}
this.f.getController().n();
}
}
protected void w() {
this.C = !this.C;
b("javascript:al_setVideoMuted(" + this.C + ");");
d(this.C);
a(this.C, 0L);
}
}