Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f
以下内容为反编译后的 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 androidx.annotation.Nullable;
import com.applovin.impl.adview.m;
import com.applovin.impl.adview.u;
import com.applovin.impl.sdk.e.o;
import com.applovin.impl.sdk.e.z;
import com.applovin.impl.sdk.p;
import com.applovin.impl.sdk.utils.Utils;
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 {
private double A;
private double B;
private final AtomicBoolean C;
private final AtomicBoolean D;
private boolean E;
private long F;
private long G;
private final com.applovin.impl.adview.activity.a.d f29702v;
@Nullable
private final m f29703w;
@Nullable
private final ImageView f29704x;
@Nullable
private final com.applovin.impl.adview.a f29705y;
private final boolean f29706z;
public class a implements View.OnClickListener {
private a() {
}
@Override
public void onClick(View view) {
if (view == g.this.f29703w) {
if (g.this.s()) {
g.this.p();
g.this.f29623t.b();
return;
} else {
g.this.x();
return;
}
}
if (view == g.this.f29704x) {
g.this.z();
return;
}
y yVar = g.this.f29606c;
if (y.a()) {
g.this.f29606c.e("AppLovinFullscreenActivity", "Unhandled click on widget: " + view);
}
}
}
public g(com.applovin.impl.sdk.ad.e eVar, Activity activity, @Nullable Map<String, Object> map, p pVar, AppLovinAdClickListener appLovinAdClickListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
super(eVar, activity, map, pVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
this.f29702v = new com.applovin.impl.adview.activity.a.d(this.f29604a, this.f29608e, this.f29605b);
boolean f11 = this.f29604a.f();
this.f29706z = f11;
this.C = new AtomicBoolean();
this.D = new AtomicBoolean();
this.E = Utils.isVideoMutedInitially(this.f29605b);
this.F = -2L;
this.G = 0L;
a aVar = new a();
if (eVar.r() >= 0) {
m mVar = new m(eVar.x(), activity);
this.f29703w = mVar;
mVar.setVisibility(8);
mVar.setOnClickListener(aVar);
} else {
this.f29703w = null;
}
if (a(this.E, pVar)) {
ImageView imageView = new ImageView(activity);
this.f29704x = imageView;
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
imageView.setClickable(true);
imageView.setOnClickListener(aVar);
d(this.E);
} else {
this.f29704x = null;
}
if (f11) {
com.applovin.impl.adview.a aVar2 = new com.applovin.impl.adview.a(activity, ((Integer) pVar.a(com.applovin.impl.sdk.c.b.cQ)).intValue(), R.attr.progressBarStyleLarge);
this.f29705y = aVar2;
aVar2.setColor(Color.parseColor("#75FFFFFF"));
aVar2.setBackgroundColor(Color.parseColor("#00000000"));
aVar2.setVisibility(8);
return;
}
this.f29705y = null;
}
public void A() {
if (this.D.compareAndSet(false, true)) {
a(this.f29703w, this.f29604a.r(), new Runnable() {
@Override
public void run() {
g.this.F = -1L;
g.this.G = SystemClock.elapsedRealtime();
}
});
}
}
@Override
public void a(long j11) {
}
@Override
public void d() {
a((ViewGroup) null);
}
@Override
public void g_() {
y();
}
@Override
public void h() {
m();
super.h();
}
@Override
public void h_() {
com.applovin.impl.adview.a aVar = this.f29705y;
if (aVar != null) {
aVar.a();
}
}
@Override
public void m() {
super.a((int) this.A, this.f29706z, r(), this.F);
}
@Override
public boolean r() {
if (this.A >= this.f29604a.Q()) {
return true;
}
return false;
}
@Override
public boolean s() {
if (t() && !r()) {
return true;
}
return false;
}
@Override
public void u() {
long ae2;
long millis;
long j11 = 0;
if (this.f29604a.ad() >= 0 || this.f29604a.ae() >= 0) {
if (this.f29604a.ad() >= 0) {
ae2 = this.f29604a.ad();
} else {
com.applovin.impl.sdk.ad.a aVar = (com.applovin.impl.sdk.ad.a) this.f29604a;
double d11 = this.B;
if (d11 > 0.0d) {
j11 = 0 + TimeUnit.SECONDS.toMillis((long) d11);
}
if (aVar.af()) {
int l11 = (int) ((com.applovin.impl.sdk.ad.a) this.f29604a).l();
if (l11 > 0) {
millis = TimeUnit.SECONDS.toMillis(l11);
} else {
int t11 = (int) aVar.t();
if (t11 > 0) {
millis = TimeUnit.SECONDS.toMillis(t11);
}
}
j11 += millis;
}
ae2 = (long) (j11 * (this.f29604a.ae() / 100.0d));
}
b(ae2);
}
}
@Override
public void w() {
super.w();
this.f29702v.a(this.f29612i);
this.f29614k = SystemClock.elapsedRealtime();
this.A = 100.0d;
}
public void x() {
this.F = SystemClock.elapsedRealtime() - this.G;
if (y.a()) {
this.f29606c.b("AppLovinFullscreenActivity", "Skipping video with skip time: " + this.F + "ms");
}
this.f29607d.f();
this.f29616m++;
if (this.f29604a.y()) {
h();
} else {
y();
}
}
public void y() {
if (this.C.compareAndSet(false, true)) {
if (y.a()) {
this.f29606c.b("AppLovinFullscreenActivity", "Showing postitial...");
}
b("javascript:al_showPostitial();");
m mVar = this.f29703w;
if (mVar != null) {
mVar.setVisibility(8);
}
ImageView imageView = this.f29704x;
if (imageView != null) {
imageView.setVisibility(8);
}
com.applovin.impl.adview.a aVar = this.f29705y;
if (aVar != null) {
aVar.b();
}
if (this.f29611h != null) {
if (this.f29604a.t() >= 0) {
a(this.f29611h, this.f29604a.t(), new Runnable() {
@Override
public void run() {
g.this.f29614k = SystemClock.elapsedRealtime();
}
});
} else {
this.f29611h.setVisibility(0);
}
}
this.f29609f.getController().n();
v();
}
}
public void z() {
this.E = !this.E;
b("javascript:al_setVideoMuted(" + this.E + ");");
d(this.E);
a(this.E, 0L);
}
private void d(boolean z11) {
if (com.applovin.impl.sdk.utils.h.d()) {
AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) this.f29608e.getDrawable(z11 ? com.applovin.sdk.R.drawable.applovin_ic_unmute_to_mute : com.applovin.sdk.R.drawable.applovin_ic_mute_to_unmute);
if (animatedVectorDrawable != null) {
this.f29704x.setScaleType(ImageView.ScaleType.FIT_XY);
this.f29704x.setImageDrawable(animatedVectorDrawable);
animatedVectorDrawable.start();
return;
}
}
Uri aE = z11 ? this.f29604a.aE() : this.f29604a.aF();
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
this.f29704x.setImageURI(aE);
StrictMode.setThreadPolicy(allowThreadDiskReads);
}
@Override
public void c() {
com.applovin.impl.adview.a aVar = this.f29705y;
if (aVar != null) {
aVar.b();
}
}
@Override
public void b(double d11) {
this.A = d11;
}
@Override
public void a(@Nullable ViewGroup viewGroup) {
this.f29702v.a(this.f29704x, this.f29703w, this.f29611h, this.f29705y, this.f29610g, this.f29609f, viewGroup);
this.f29609f.getController().a(this);
a(false);
com.applovin.impl.adview.a aVar = this.f29705y;
if (aVar != null) {
aVar.a();
}
u uVar = this.f29610g;
if (uVar != null) {
uVar.a();
}
this.f29609f.renderAd(this.f29604a);
if (this.f29703w != null) {
this.f29605b.M().a(new z(this.f29605b, new Runnable() {
@Override
public void run() {
g.this.A();
}
}), o.a.MAIN, this.f29604a.s(), true);
}
this.f29605b.M().a(new z(this.f29605b, new Runnable() {
@Override
public void run() {
ArrayList arrayList = new ArrayList();
m mVar = g.this.f29611h;
if (mVar != null) {
arrayList.add(new com.applovin.impl.sdk.a.d(mVar, FriendlyObstructionPurpose.CLOSE_AD, "close button"));
}
u uVar2 = g.this.f29610g;
if (uVar2 != null && uVar2.b()) {
u uVar3 = g.this.f29610g;
arrayList.add(new com.applovin.impl.sdk.a.d(uVar3, FriendlyObstructionPurpose.NOT_VISIBLE, uVar3.getIdentifier()));
}
g.this.f29604a.o().a(g.this.f29609f, arrayList);
}
}), o.a.MAIN, 500L);
super.b(this.E);
}
@Override
public void b() {
if (y.a()) {
this.f29606c.b("AppLovinFullscreenActivity", "Skipping video from prompt");
}
x();
}
@Override
public void a(double d11) {
b("javascript:al_setVideoMuted(" + this.E + ");");
com.applovin.impl.adview.a aVar = this.f29705y;
if (aVar != null) {
aVar.b();
}
if (this.f29703w != null) {
A();
}
this.f29609f.getController().m();
this.B = d11;
u();
if (this.f29604a.am()) {
this.f29623t.a(this.f29604a, (Runnable) null);
}
}
@Override
public void e() {
}
@Override
public void a() {
if (y.a()) {
this.f29606c.b("AppLovinFullscreenActivity", "Continue video from prompt - will resume in onWindowFocusChanged(true) when alert dismisses");
}
}
private static boolean a(boolean z11, p pVar) {
if (!((Boolean) pVar.a(com.applovin.impl.sdk.c.b.cF)).booleanValue()) {
return false;
}
if (!((Boolean) pVar.a(com.applovin.impl.sdk.c.b.cG)).booleanValue() || z11) {
return true;
}
return ((Boolean) pVar.a(com.applovin.impl.sdk.c.b.cI)).booleanValue();
}
}