Recover Files v1.3.9版本的 MD5 值为:27a8b2c239c6cb7111d74d6bb07d21b2
以下内容为反编译后的 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.support.v4.media.session.h;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import androidx.annotation.Nullable;
import com.applovin.impl.adview.n;
import com.applovin.impl.adview.v;
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.w;
import com.applovin.impl.sdk.y;
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 {
@Nullable
private final ImageView A;
@Nullable
private final com.applovin.impl.adview.a B;
private final boolean C;
private double D;
private double E;
private final AtomicBoolean F;
private final AtomicBoolean G;
private boolean H;
private long I;
private long J;
private final com.applovin.impl.adview.activity.a.d f8872y;
@Nullable
private final n f8873z;
public class a implements View.OnClickListener {
private a() {
}
@Override
public void onClick(View view) {
if (view == g.this.f8873z) {
if (g.this.t()) {
g.this.q();
g.this.f8794w.b();
return;
} else {
g.this.y();
return;
}
}
if (view == g.this.A) {
g.this.A();
return;
}
y yVar = g.this.f8774c;
if (y.a()) {
g.this.f8774c.e("AppLovinFullscreenActivity", "Unhandled click on widget: " + view);
}
}
}
public g(com.applovin.impl.sdk.ad.e eVar, Activity activity, @Nullable Map<String, Object> map, o oVar, AppLovinAdClickListener appLovinAdClickListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
super(eVar, activity, map, oVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
this.f8872y = new com.applovin.impl.adview.activity.a.d(this.f8772a, this.f8776e, this.f8773b);
boolean f10 = this.f8772a.f();
this.C = f10;
this.F = new AtomicBoolean();
this.G = new AtomicBoolean();
this.H = w.c(this.f8773b);
this.I = -2L;
this.J = 0L;
a aVar = new a();
if (eVar.r() >= 0) {
n nVar = new n(eVar.x(), activity);
this.f8873z = nVar;
nVar.setVisibility(8);
nVar.setOnClickListener(aVar);
} else {
this.f8873z = null;
}
if (a(this.H, oVar)) {
ImageView imageView = new ImageView(activity);
this.A = imageView;
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
imageView.setClickable(true);
imageView.setOnClickListener(aVar);
d(this.H);
} else {
this.A = null;
}
if (f10) {
com.applovin.impl.adview.a aVar2 = new com.applovin.impl.adview.a(activity, ((Integer) oVar.a(com.applovin.impl.sdk.c.b.cY)).intValue(), R.attr.progressBarStyleLarge);
this.B = aVar2;
aVar2.setColor(Color.parseColor("#75FFFFFF"));
aVar2.setBackgroundColor(Color.parseColor("#00000000"));
aVar2.setVisibility(8);
return;
}
this.B = null;
}
public void B() {
if (this.G.compareAndSet(false, true)) {
a(this.f8873z, this.f8772a.r(), new Runnable() {
@Override
public void run() {
g.this.I = -1L;
g.this.J = SystemClock.elapsedRealtime();
}
});
}
}
public void A() {
this.H = !this.H;
b("javascript:al_setVideoMuted(" + this.H + ");");
d(this.H);
a(this.H, 0L);
}
@Override
public void a(long j10) {
}
@Override
public void d() {
a((ViewGroup) null);
}
@Override
public void g_() {
z();
}
@Override
public void h() {
n();
super.h();
}
@Override
public void h_() {
com.applovin.impl.adview.a aVar = this.B;
if (aVar != null) {
aVar.a();
}
}
@Override
public void n() {
super.a((int) this.D, this.C, s(), this.I);
}
@Override
public boolean s() {
if (this.D >= this.f8772a.T()) {
return true;
}
return false;
}
@Override
public boolean t() {
if (u() && !s()) {
return true;
}
return false;
}
@Override
public void v() {
long aj;
long millis;
long j10 = 0;
if (this.f8772a.ai() >= 0 || this.f8772a.aj() >= 0) {
if (this.f8772a.ai() >= 0) {
aj = this.f8772a.ai();
} else {
com.applovin.impl.sdk.ad.a aVar = (com.applovin.impl.sdk.ad.a) this.f8772a;
double d10 = this.E;
if (d10 > 0.0d) {
j10 = 0 + TimeUnit.SECONDS.toMillis((long) d10);
}
if (aVar.ak()) {
int l10 = (int) ((com.applovin.impl.sdk.ad.a) this.f8772a).l();
if (l10 > 0) {
millis = TimeUnit.SECONDS.toMillis(l10);
} else {
int t10 = (int) aVar.t();
if (t10 > 0) {
millis = TimeUnit.SECONDS.toMillis(t10);
}
}
j10 += millis;
}
aj = (long) ((this.f8772a.aj() / 100.0d) * j10);
}
b(aj);
}
}
@Override
public void x() {
super.x();
this.f8872y.a(this.f8780i);
this.f8782k = SystemClock.elapsedRealtime();
this.D = 100.0d;
}
public void y() {
this.I = SystemClock.elapsedRealtime() - this.J;
if (y.a()) {
this.f8774c.b("AppLovinFullscreenActivity", h.a(new StringBuilder("Skipping video with skip time: "), this.I, "ms"));
}
this.f8775d.f();
this.f8787p++;
if (this.f8772a.y()) {
h();
} else {
z();
}
}
public void z() {
if (this.F.compareAndSet(false, true)) {
if (y.a()) {
this.f8774c.b("AppLovinFullscreenActivity", "Showing postitial...");
}
b("javascript:al_showPostitial();");
n nVar = this.f8873z;
if (nVar != null) {
nVar.setVisibility(8);
}
ImageView imageView = this.A;
if (imageView != null) {
imageView.setVisibility(8);
}
com.applovin.impl.adview.a aVar = this.B;
if (aVar != null) {
aVar.b();
}
if (this.f8779h != null) {
if (this.f8772a.t() >= 0) {
a(this.f8779h, this.f8772a.t(), new Runnable() {
@Override
public void run() {
g.this.f8782k = SystemClock.elapsedRealtime();
}
});
} else {
this.f8779h.setVisibility(0);
}
}
this.f8777f.getController().n();
w();
}
}
private void d(boolean z10) {
if (com.applovin.impl.sdk.utils.h.d()) {
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) this.f8776e.getDrawable(z10 ? com.applovin.sdk.R.drawable.applovin_ic_unmute_to_mute : com.applovin.sdk.R.drawable.applovin_ic_mute_to_unmute);
if (animatedVectorDrawable != null) {
this.A.setScaleType(ImageView.ScaleType.FIT_XY);
this.A.setImageDrawable(animatedVectorDrawable);
animatedVectorDrawable.start();
return;
}
}
Uri aJ = z10 ? this.f8772a.aJ() : this.f8772a.aK();
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
this.A.setImageURI(aJ);
StrictMode.setThreadPolicy(allowThreadDiskReads);
}
@Override
public void c() {
com.applovin.impl.adview.a aVar = this.B;
if (aVar != null) {
aVar.b();
}
}
@Override
public void b(double d10) {
this.D = d10;
}
@Override
public void a(@Nullable ViewGroup viewGroup) {
this.f8872y.a(this.A, this.f8873z, this.f8779h, this.B, this.f8778g, this.f8777f, viewGroup);
this.f8777f.getController().a(this);
a(false);
com.applovin.impl.adview.a aVar = this.B;
if (aVar != null) {
aVar.a();
}
v vVar = this.f8778g;
if (vVar != null) {
vVar.a();
}
this.f8777f.renderAd(this.f8772a);
if (this.f8873z != null) {
this.f8773b.G().a(new ac(this.f8773b, "scheduleSkipButton", new Runnable() {
@Override
public void run() {
g.this.B();
}
}), r.b.MAIN, this.f8772a.s(), true);
}
this.f8773b.G().a(new ac(this.f8773b, "updateMainViewOM", new Runnable() {
@Override
public void run() {
ArrayList arrayList = new ArrayList();
n nVar = g.this.f8779h;
if (nVar != null) {
arrayList.add(new com.applovin.impl.sdk.a.d(nVar, FriendlyObstructionPurpose.CLOSE_AD, "close button"));
}
v vVar2 = g.this.f8778g;
if (vVar2 != null && vVar2.b()) {
v vVar3 = g.this.f8778g;
arrayList.add(new com.applovin.impl.sdk.a.d(vVar3, FriendlyObstructionPurpose.NOT_VISIBLE, vVar3.getIdentifier()));
}
g.this.f8772a.o().a(g.this.f8777f, arrayList);
}
}), r.b.MAIN, 500L);
super.b(this.H);
}
@Override
public void b() {
if (y.a()) {
this.f8774c.b("AppLovinFullscreenActivity", "Skipping video from prompt");
}
y();
}
@Override
public void a(double d10) {
b("javascript:al_setVideoMuted(" + this.H + ");");
com.applovin.impl.adview.a aVar = this.B;
if (aVar != null) {
aVar.b();
}
if (this.f8873z != null) {
B();
}
this.f8777f.getController().m();
this.E = d10;
v();
if (this.f8772a.ar()) {
this.f8794w.a(this.f8772a, (Runnable) null);
}
}
@Override
public void e() {
}
@Override
public void a() {
if (y.a()) {
this.f8774c.b("AppLovinFullscreenActivity", "Continue video from prompt - will resume in onWindowFocusChanged(true) when alert dismisses");
}
}
private static boolean a(boolean z10, o oVar) {
if (!((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cN)).booleanValue()) {
return false;
}
if (!((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cO)).booleanValue() || z10) {
return true;
}
return ((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cQ)).booleanValue();
}
}