Puzzle King v2.3.8版本的 MD5 值为:1734eb975c9d2843afa462aec387292e
以下内容为反编译后的 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.m;
import com.applovin.impl.sdk.f.o;
import com.applovin.impl.sdk.f.z;
import com.applovin.impl.sdk.n;
import com.applovin.impl.sdk.utils.Utils;
import com.applovin.impl.sdk.utils.h;
import com.applovin.impl.sdk.w;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdVideoPlaybackListener;
import com.google.firebase.remoteconfig.FirebaseRemoteConfig;
import com.iab.omid.library.applovin.adsession.FriendlyObstructionPurpose;
import com.safedk.android.internal.special.SpecialsBridge;
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 double A;
private AtomicBoolean B;
private AtomicBoolean C;
private boolean D;
private long E;
private long F;
private final com.applovin.impl.adview.activity.a.d u;
private final m v;
private final ImageView w;
private final com.applovin.impl.adview.a x;
private final boolean y;
private double z;
private class a implements View.OnClickListener {
private a() {
}
@Override
public void onClick(View view) {
if (view == g.this.v) {
if (!g.this.s()) {
g.this.x();
return;
} else {
g.this.p();
g.this.s.b();
return;
}
}
if (view == g.this.w) {
g.this.z();
return;
}
if (w.a()) {
g.this.c.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.u = new com.applovin.impl.adview.activity.a.d(this.a, this.e, this.b);
this.y = this.a.f();
this.B = new AtomicBoolean();
this.C = new AtomicBoolean();
this.D = Utils.isVideoMutedInitially(this.b);
this.E = -2L;
this.F = 0L;
a aVar = new a();
if (eVar.r() >= 0) {
m mVar = new m(eVar.x(), activity);
this.v = mVar;
mVar.setVisibility(8);
this.v.setOnClickListener(aVar);
} else {
this.v = null;
}
if (a(this.D, nVar)) {
ImageView imageView = new ImageView(activity);
this.w = imageView;
imageView.setScaleType(ImageView.ScaleType.FIT_CENTER);
this.w.setClickable(true);
this.w.setOnClickListener(aVar);
d(this.D);
} else {
this.w = null;
}
if (!this.y) {
this.x = null;
return;
}
com.applovin.impl.adview.a aVar2 = new com.applovin.impl.adview.a(activity, ((Integer) nVar.a(com.applovin.impl.sdk.d.b.cF)).intValue(), R.attr.progressBarStyleLarge);
this.x = aVar2;
aVar2.setColor(Color.parseColor("#75FFFFFF"));
this.x.setBackgroundColor(Color.parseColor("#00000000"));
this.x.setVisibility(8);
}
public void A() {
if (this.C.compareAndSet(false, true)) {
a(this.v, this.a.r(), new Runnable() {
@Override
public void run() {
g.this.E = -1L;
g.this.F = SystemClock.elapsedRealtime();
}
});
}
}
private static boolean a(boolean z, n nVar) {
if (!((Boolean) nVar.a(com.applovin.impl.sdk.d.b.cu)).booleanValue()) {
return false;
}
if (!((Boolean) nVar.a(com.applovin.impl.sdk.d.b.cv)).booleanValue() || z) {
return true;
}
return ((Boolean) nVar.a(com.applovin.impl.sdk.d.b.cx)).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.w.setScaleType(ImageView.ScaleType.FIT_XY);
this.w.setImageDrawable(animatedVectorDrawable);
animatedVectorDrawable.start();
return;
}
}
Uri aC = z ? this.a.aC() : this.a.aD();
StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
this.w.setImageURI(aC);
StrictMode.setThreadPolicy(allowThreadDiskReads);
}
@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.D + ");");
com.applovin.impl.adview.a aVar = this.x;
if (aVar != null) {
aVar.b();
}
if (this.v != null) {
A();
}
this.f.getController().m();
this.A = d;
u();
if (this.a.am()) {
this.s.a(this.a, (Runnable) null);
}
}
@Override
public void a(long j) {
}
@Override
public void a(ViewGroup viewGroup) {
this.u.a(this.w, this.v, this.g, this.x, this.f, viewGroup);
this.f.getController().a(this);
a(false);
com.applovin.impl.adview.a aVar = this.x;
if (aVar != null) {
aVar.a();
}
SpecialsBridge.appLovinAdViewRenderAd(this.f, this.a);
if (this.v != null) {
this.b.U().a(new z(this.b, new Runnable() {
@Override
public void run() {
g.this.A();
}
}), o.a.MAIN, this.a.s(), true);
}
this.b.U().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.b.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.D);
}
@Override
public void b() {
if (w.a()) {
this.c.b("AppLovinFullscreenActivity", "Skipping video from prompt");
}
x();
}
@Override
public void b(double d) {
this.z = d;
}
@Override
public void c() {
com.applovin.impl.adview.a aVar = this.x;
if (aVar != null) {
aVar.b();
}
}
@Override
public void d() {
a((ViewGroup) null);
}
@Override
public void e() {
}
@Override
public void g_() {
y();
}
@Override
public void h() {
m();
super.h();
}
@Override
public void h_() {
com.applovin.impl.adview.a aVar = this.x;
if (aVar != null) {
aVar.a();
}
}
@Override
protected void m() {
super.a((int) this.z, this.y, r(), this.E);
}
@Override
protected boolean r() {
return this.z >= ((double) this.a.Q());
}
@Override
protected boolean s() {
return t() && !r();
}
@Override
protected void u() {
long ae;
int l;
if (this.a.ad() >= 0 || this.a.ae() >= 0) {
long ad = this.a.ad();
com.applovin.impl.sdk.ad.e eVar = this.a;
if (ad >= 0) {
ae = eVar.ad();
} else {
com.applovin.impl.sdk.ad.a aVar = (com.applovin.impl.sdk.ad.a) eVar;
long millis = this.A > FirebaseRemoteConfig.DEFAULT_VALUE_FOR_DOUBLE ? 0 + TimeUnit.SECONDS.toMillis((long) this.A) : 0L;
if (aVar.af() && ((l = (int) ((com.applovin.impl.sdk.ad.a) this.a).l()) > 0 || (l = (int) aVar.t()) > 0)) {
millis += TimeUnit.SECONDS.toMillis(l);
}
ae = (long) (millis * (this.a.ae() / 100.0d));
}
b(ae);
}
}
@Override
public void w() {
super.w();
this.u.a(this.h);
this.j = SystemClock.elapsedRealtime();
this.z = 100.0d;
}
public void x() {
this.E = SystemClock.elapsedRealtime() - this.F;
if (w.a()) {
this.c.b("AppLovinFullscreenActivity", "Skipping video with skip time: " + this.E + "ms");
}
this.d.f();
this.l++;
if (this.a.y()) {
h();
} else {
y();
}
}
public void y() {
if (this.B.compareAndSet(false, true)) {
if (w.a()) {
this.c.b("AppLovinFullscreenActivity", "Showing postitial...");
}
b("javascript:al_showPostitial();");
m mVar = this.v;
if (mVar != null) {
mVar.setVisibility(8);
}
ImageView imageView = this.w;
if (imageView != null) {
imageView.setVisibility(8);
}
com.applovin.impl.adview.a aVar = this.x;
if (aVar != null) {
aVar.b();
}
if (this.g != null) {
if (this.a.t() >= 0) {
a(this.g, this.a.t(), new Runnable() {
@Override
public void run() {
g.this.j = SystemClock.elapsedRealtime();
}
});
} else {
this.g.setVisibility(0);
}
}
this.f.getController().n();
v();
}
}
protected void z() {
this.D = !this.D;
b("javascript:al_setVideoMuted(" + this.D + ");");
d(this.D);
a(this.D, 0L);
}
}