光速虚拟机 v3.8.2版本的 MD5 值为:e0eecbee2ded4bfb58a5ca72845ca90b

以下内容为反编译后的 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.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.h;
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.applovin.sdk.R;
import com.iab.omid.library.applovin.adsession.FriendlyObstructionPurpose;
import com.safedk.android.internal.special.SpecialsBridge;
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 ImageView A;
    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 y;
    private final n z;

    private class a implements View.OnClickListener {
        private a() {
        }

        @Override
        public void onClick(View view) {
            if (view == g.this.z) {
                if (!g.this.t()) {
                    g.this.y();
                    return;
                }
                g.this.q();
                g.this.w.b();
            } else if (view == g.this.A) {
                g.this.A();
            } else {
                y yVar = g.this.c;
                if (y.a()) {
                    y yVar2 = g.this.c;
                    yVar2.e("AppLovinFullscreenActivity", "Unhandled click on widget: " + view);
                }
            }
        }
    }

    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.y = new com.applovin.impl.adview.activity.a.d(this.a, this.e, this.b);
        boolean f = this.a.f();
        this.C = f;
        this.F = new AtomicBoolean();
        this.G = new AtomicBoolean();
        this.H = w.c(this.b);
        this.I = -2L;
        this.J = 0L;
        a aVar = new a();
        if (eVar.r() >= 0) {
            n nVar = new n(eVar.x(), activity);
            this.z = nVar;
            nVar.setVisibility(8);
            nVar.setOnClickListener(aVar);
        } else {
            this.z = 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 (!f) {
            this.B = null;
            return;
        }
        com.applovin.impl.adview.a aVar2 = new com.applovin.impl.adview.a(activity, ((Integer) oVar.a(com.applovin.impl.sdk.c.b.cY)).intValue(), 16842874);
        this.B = aVar2;
        aVar2.setColor(Color.parseColor("#75FFFFFF"));
        aVar2.setBackgroundColor(Color.parseColor("#00000000"));
        aVar2.setVisibility(8);
    }

    public void B() {
        if (this.G.compareAndSet(false, true)) {
            a(this.z, this.a.r(), new Runnable() {
                @Override
                public void run() {
                    g.this.I = -1L;
                    g.this.J = SystemClock.elapsedRealtime();
                }
            });
        }
    }

    private static boolean a(boolean z, o oVar) {
        if (((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cN)).booleanValue()) {
            if (!((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cO)).booleanValue() || z) {
                return true;
            }
            return ((Boolean) oVar.a(com.applovin.impl.sdk.c.b.cQ)).booleanValue();
        }
        return false;
    }

    private void d(boolean z) {
        if (h.d()) {
            AnimatedVectorDrawable animatedVectorDrawable = (AnimatedVectorDrawable) this.e.getDrawable(z ? R.drawable.applovin_ic_unmute_to_mute : 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 = z ? this.a.aJ() : this.a.aK();
        StrictMode.ThreadPolicy allowThreadDiskReads = StrictMode.allowThreadDiskReads();
        this.A.setImageURI(aJ);
        StrictMode.setThreadPolicy(allowThreadDiskReads);
    }

    protected void A() {
        this.H = !this.H;
        b("javascript:al_setVideoMuted(" + this.H + ");");
        d(this.H);
        a(this.H, 0L);
    }

    @Override
    public void a() {
        y yVar = this.c;
        if (y.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.H + ");");
        com.applovin.impl.adview.a aVar = this.B;
        if (aVar != null) {
            aVar.b();
        }
        if (this.z != null) {
            B();
        }
        this.f.getController().m();
        this.E = d;
        v();
        if (this.a.ar()) {
            this.w.a(this.a, (Runnable) null);
        }
    }

    @Override
    public void a(long j) {
    }

    @Override
    public void a(ViewGroup viewGroup) {
        this.y.a(this.A, this.z, this.h, this.B, this.g, this.f, viewGroup);
        this.f.getController().a(this);
        a(false);
        com.applovin.impl.adview.a aVar = this.B;
        if (aVar != null) {
            aVar.a();
        }
        if (this.g != null) {
            this.g.a();
        }
        SpecialsBridge.appLovinAdViewRenderAd(this.f, this.a);
        if (this.z != null) {
            this.b.G().a(new ac(this.b, "scheduleSkipButton", new Runnable() {
                @Override
                public void run() {
                    g.this.B();
                }
            }), r.b.MAIN, this.a.s(), true);
        }
        this.b.G().a(new ac(this.b, "updateMainViewOM", 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.a.o().a(g.this.f, arrayList);
            }
        }), r.b.MAIN, 500L);
        super.b(this.H);
    }

    @Override
    public void b() {
        y yVar = this.c;
        if (y.a()) {
            this.c.b("AppLovinFullscreenActivity", "Skipping video from prompt");
        }
        y();
    }

    @Override
    public void b(double d) {
        this.D = d;
    }

    @Override
    public void c() {
        com.applovin.impl.adview.a aVar = this.B;
        if (aVar != null) {
            aVar.b();
        }
    }

    @Override
    public void d() {
        a((ViewGroup) null);
    }

    @Override
    public void e() {
    }

    @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
    protected void n() {
        super.a((int) this.D, this.C, s(), this.I);
    }

    @Override
    protected boolean s() {
        return this.D >= ((double) this.a.T());
    }

    @Override
    protected boolean t() {
        return u() && !s();
    }

    @Override
    protected void v() {
        long aj;
        long millis;
        if (this.a.ai() >= 0 || this.a.aj() >= 0) {
            if (this.a.ai() >= 0) {
                aj = this.a.ai();
            } else {
                com.applovin.impl.sdk.ad.a aVar = (com.applovin.impl.sdk.ad.a) this.a;
                long millis2 = this.E > 0.0d ? 0 + TimeUnit.SECONDS.toMillis((long) this.E) : 0L;
                if (aVar.ak()) {
                    int l = (int) ((com.applovin.impl.sdk.ad.a) this.a).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;
                }
                aj = (long) (millis2 * (this.a.aj() / 100.0d));
            }
            b(aj);
        }
    }

    @Override
    public void x() {
        super.x();
        this.y.a(this.i);
        this.k = SystemClock.elapsedRealtime();
        this.D = 100.0d;
    }

    public void y() {
        this.I = SystemClock.elapsedRealtime() - this.J;
        y yVar = this.c;
        if (y.a()) {
            this.c.b("AppLovinFullscreenActivity", "Skipping video with skip time: " + this.I + "ms");
        }
        this.d.f();
        this.p++;
        if (this.a.y()) {
            h();
        } else {
            z();
        }
    }

    public void z() {
        if (this.F.compareAndSet(false, true)) {
            y yVar = this.c;
            if (y.a()) {
                this.c.b("AppLovinFullscreenActivity", "Showing postitial...");
            }
            b("javascript:al_showPostitial();");
            n nVar = this.z;
            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.h != null) {
                if (this.a.t() >= 0) {
                    a(this.h, this.a.t(), new Runnable() {
                        @Override
                        public void run() {
                            g.this.k = SystemClock.elapsedRealtime();
                        }
                    });
                } else {
                    this.h.setVisibility(0);
                }
            }
            this.f.getController().n();
            w();
        }
    }
}