Idle Tower v2.48版本的 MD5 值为:56f20496f6a85726b376356ed2ecee23
以下内容为反编译后的 g.java 源代码,内容仅作参考
package com.applovin.impl.adview.activity.b;
import android.R;
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.n;
import com.applovin.impl.sdk.e.ac;
import com.applovin.impl.sdk.e.r;
import com.applovin.impl.sdk.o;
import com.applovin.impl.sdk.utils.Utils;
import com.applovin.impl.sdk.utils.h;
import com.applovin.impl.sdk.x;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdVideoPlaybackListener;
import com.iab.omid.library.applovin.adsession.FriendlyObstructionPurpose;
import java.util.ArrayList;
import java.util.Map;
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 final com.applovin.impl.adview.a A;
private final boolean B;
private double C;
private double D;
private final AtomicBoolean E;
private final AtomicBoolean F;
private boolean G;
private long H;
private long I;
private final com.applovin.impl.adview.activity.a.d x;
private final n y;
private final ImageView z;
@Override
public void a(long j) {
}
@Override
public void e() {
}
public g(com.applovin.impl.sdk.ad.e eVar, Activity activity, Map<String, Object> map, o oVar, AppLovinAdClickListener appLovinAdClickListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
super(eVar, activity, map, oVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
this.x = new com.applovin.impl.adview.activity.a.d(this.f913a, this.e, this.b);
this.B = this.f913a.f();
this.E = new AtomicBoolean();
this.F = new AtomicBoolean();
this.G = Utils.isVideoMutedInitially(this.b);
this.H = -2L;
this.I = 0L;
a aVar = new a();
if (eVar.r() >= 0) {
n nVar = new n(eVar.x(), activity);
this.y = nVar;
nVar.setVisibility(8);
this.y.setOnClickListener(aVar);
} else {
this.y = null;
}
if (a(this.G, oVar)) {
ImageView imageView = new ImageView(activity);
this.z = imageView;
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
this.z.setClickable(true);
this.z.setOnClickListener(aVar);
d(this.G);
} else {
this.z = null;
}
if (this.B) {
com.applovin.impl.adview.a aVar2 = new com.applovin.impl.adview.a(activity, ((Integer) oVar.a(com.applovin.impl.sdk.c.b.cU)).intValue(), R.attr.progressBarStyleLarge);
this.A = aVar2;
aVar2.setColor(Color.parseColor("#75FFFFFF"));
this.A.setBackgroundColor(Color.parseColor("#00000000"));
this.A.setVisibility(8);
return;
}
this.A = null;
}
@Override
public void d() {
a((ViewGroup) null);
}
@Override
public void a(ViewGroup viewGroup) {
this.x.a(this.z, this.y, this.h, this.A, this.g, this.f, viewGroup);
this.f.getController().a(this);
a(false);
com.applovin.impl.adview.a aVar = this.A;
if (aVar != null) {
aVar.a();
}
if (this.g != null) {
this.g.a();
}
this.f.renderAd(this.f913a);
if (this.y != null) {
this.b.N().a(new ac(this.b, new Runnable() {
@Override
public void run() {
g.this.B();
}
}), r.b.MAIN, this.f913a.s(), true);
}
this.b.N().a(new ac(this.b, new Runnable() {
@Override
public void run() {
ArrayList arrayList = new ArrayList();
if (g.this.h != null) {
arrayList.add(new com.applovin.impl.sdk.a.d(g.this.h, FriendlyObstructionPurpose.CLOSE_AD, "close button"));
}
if (g.this.g != null && g.this.g.b()) {
arrayList.add(new com.applovin.impl.sdk.a.d(g.this.g, FriendlyObstructionPurpose.NOT_VISIBLE, g.this.g.getIdentifier()));
}
g.this.f913a.o().a(g.this.f, arrayList);
}
}), r.b.MAIN, 500L);
super.b(this.G);
}
public void B() {
if (this.F.compareAndSet(false, true)) {
a(this.y, this.f913a.r(), new Runnable() {
@Override
public void run() {
g.this.H = -1L;
g.this.I = SystemClock.elapsedRealtime();
}
});
}
}
public void y() {
this.H = SystemClock.elapsedRealtime() - this.I;
x xVar = this.c;
if (x.a()) {
this.c.b("AppLovinFullscreenActivity", "Skipping video with skip time: " + this.H + "ms");
}
this.d.f();
this.o++;
if (this.f913a.y()) {
h();
} else {
z();
}
}
public void z() {
if (this.E.compareAndSet(false, true)) {
x xVar = this.c;
if (x.a()) {
this.c.b("AppLovinFullscreenActivity", "Showing postitial...");
}
b("javascript:al_showPostitial();");
n nVar = this.y;
if (nVar != null) {
nVar.setVisibility(8);
}
ImageView imageView = this.z;
if (imageView != null) {
imageView.setVisibility(8);
}
com.applovin.impl.adview.a aVar = this.A;
if (aVar != null) {
aVar.b();
}
if (this.h != null) {
if (this.f913a.t() >= 0) {
a(this.h, this.f913a.t(), new Runnable() {
@Override
public void run() {
g.this.k = SystemClock.elapsedRealtime();
}
});
} else {
this.h.setVisibility(0);
}
}
this.f.getController().n();
w();
}
}
@Override
public void x() {
super.x();
this.x.a(this.i);
this.k = SystemClock.elapsedRealtime();
this.C = 100.0d;
}
@Override
public void a(double d) {
b("javascript:al_setVideoMuted(" + this.G + ");");
com.applovin.impl.adview.a aVar = this.A;
if (aVar != null) {
aVar.b();
}
if (this.y != null) {
B();
}
this.f.getController().m();
this.D = d;
v();
if (this.f913a.ap()) {
this.v.a(this.f913a, (Runnable) null);
}
}
@Override
public void g_() {
z();
}
@Override
public void b(double d) {
this.C = d;
}
@Override
public void h_() {
com.applovin.impl.adview.a aVar = this.A;
if (aVar != null) {
aVar.a();
}
}
@Override
public void c() {
com.applovin.impl.adview.a aVar = this.A;
if (aVar != null) {
aVar.b();
}
}
@Override
public void h() {
n();
super.h();
}
@Override
protected boolean t() {
return u() && !s();
}
@Override
protected boolean s() {
return this.C >= ((double) this.f913a.T());
}
@Override
public void a() {
x xVar = this.c;
if (x.a()) {
this.c.b("AppLovinFullscreenActivity", "Continue video from prompt - will resume in onWindowFocusChanged(true) when alert dismisses");
}
}
@Override
public void b() {
x xVar = this.c;
if (x.a()) {
this.c.b("AppLovinFullscreenActivity", "Skipping video from prompt");
}
y();
}
@Override
protected void n() {
super.a((int) this.C, this.B, s(), this.H);
}
@Override
protected void v() {
long ah;
long millis;
if (this.f913a.ag() >= 0 || this.f913a.ah() >= 0) {
if (this.f913a.ag() >= 0) {
ah = this.f913a.ag();
} else {
com.applovin.impl.sdk.ad.a aVar = (com.applovin.impl.sdk.ad.a) this.f913a;
long millis2 = this.D > 0.0d ? 0 + TimeUnit.SECONDS.toMillis((long) this.D) : 0L;
if (aVar.ai()) {
int l = (int) ((com.applovin.impl.sdk.ad.a) this.f913a).l();
if (l > 0) {
millis = TimeUnit.SECONDS.toMillis(l);
} else {
int t = (int) aVar.t();
if (t > 0) {
millis = TimeUnit.SECONDS.toMillis(t);
}
}
millis2 += millis;
}
ah = (long) (millis2 * (this.f913a.ah() / 100.0d));
}
b(ah);
}
}
private static boolean a(boolean z, o oVar) {
if (!((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cJ)).booleanValue()) {
return false;
}
if (!((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cK)).booleanValue() || z) {
return true;
}
return ((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cM)).booleanValue();
}
private void d(boolean z) {
if (h.d()) {
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) this.e.getDrawable(z ? com.applovin.sdk.R.drawable.applovin_ic_unmute_to_mute : com.applovin.sdk.R.drawable.applovin_ic_mute_to_unmute);
if (animatedVectorDrawable != null) {
this.z.setScaleType(ImageView.ScaleType.FIT_XY);
this.z.setImageDrawable(animatedVectorDrawable);
animatedVectorDrawable.start();
return;
}
}
Uri aH = z ? this.f913a.aH() : this.f913a.aI();
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
this.z.setImageURI(aH);
StrictMode.setThreadPolicy(allowThreadDiskReads);
}
protected void A() {
this.G = !this.G;
b("javascript:al_setVideoMuted(" + this.G + ");");
d(this.G);
a(this.G, 0L);
}
private class a implements View.OnClickListener {
private a() {
}
@Override
public void onClick(View view) {
if (view != g.this.y) {
if (view == g.this.z) {
g.this.A();
return;
}
x xVar = g.this.c;
if (x.a()) {
g.this.c.e("AppLovinFullscreenActivity", "Unhandled click on widget: " + view);
return;
}
return;
}
if (g.this.t()) {
g.this.q();
g.this.v.b();
} else {
g.this.y();
}
}
}
}