导航菜单

页面标题

页面副标题

Fancy Optimizer v4.6.3 - a.java 源代码

正在查看: Fancy Optimizer v4.6.3 应用的 a.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.applovin.impl.adview.activity.b;

import android.app.Activity;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import androidx.annotation.Nullable;
import com.applovin.adview.AppLovinAdView;
import com.applovin.adview.AppLovinFullscreenActivity;
import com.applovin.impl.adview.i;
import com.applovin.impl.adview.m;
import com.applovin.impl.sdk.AppLovinBroadcastManager;
import com.applovin.impl.sdk.b.b;
import com.applovin.impl.sdk.e.o;
import com.applovin.impl.sdk.e.z;
import com.applovin.impl.sdk.h;
import com.applovin.impl.sdk.i;
import com.applovin.impl.sdk.n;
import com.applovin.impl.sdk.utils.AppKilledService;
import com.applovin.impl.sdk.utils.CollectionUtils;
import com.applovin.impl.sdk.utils.StringUtils;
import com.applovin.impl.sdk.utils.Utils;
import com.applovin.impl.sdk.utils.k;
import com.applovin.impl.sdk.utils.p;
import com.applovin.impl.sdk.utils.r;
import com.applovin.impl.sdk.v;
import com.applovin.sdk.AppLovinAd;
import com.applovin.sdk.AppLovinAdClickListener;
import com.applovin.sdk.AppLovinAdDisplayListener;
import com.applovin.sdk.AppLovinAdSize;
import com.applovin.sdk.AppLovinAdType;
import com.applovin.sdk.AppLovinAdVideoPlaybackListener;
import com.applovin.sdk.AppLovinSdkUtils;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;

public abstract class a implements AppLovinBroadcastManager.Receiver, b.a {
    private long A;
    private boolean B;
    private final i E;

    protected final com.applovin.impl.sdk.ad.e f4606a;
    protected final n b;

    protected final v f4607c;

    protected final com.applovin.impl.sdk.d.d f4608d;

    protected Activity f4609e;

    protected AppLovinAdView f4610f;

    @Nullable
    protected final m f4611g;

    protected final m f4612h;

    protected boolean f4615k;

    protected boolean f4619o;

    protected AppLovinAdClickListener f4620p;

    protected AppLovinAdDisplayListener f4621q;

    protected AppLovinAdVideoPlaybackListener f4622r;

    protected final com.applovin.impl.sdk.b.b f4623s;

    @Nullable
    protected p f4624t;

    @Nullable
    private final com.applovin.impl.sdk.utils.a f4626v;

    @Nullable
    private final AppLovinBroadcastManager.Receiver f4627w;

    @Nullable
    private final h.a x;

    private final Handler f4625u = new Handler(Looper.getMainLooper());

    protected final long f4613i = SystemClock.elapsedRealtime();
    private final AtomicBoolean y = new AtomicBoolean();
    private final AtomicBoolean z = new AtomicBoolean();

    protected long f4614j = -1;
    private int C = 0;
    private final ArrayList<Long> D = new ArrayList<>();

    protected int f4616l = 0;

    protected int f4617m = 0;

    protected int f4618n = h.f6178a;
    private boolean F = false;

    public class AnonymousClass9 implements Runnable {

        final m f4639a;
        final Runnable b;

        public AnonymousClass9(m mVar, Runnable runnable) {
            this.f4639a = mVar;
            this.b = runnable;
        }

        @Override
        public void run() {
            AppLovinSdkUtils.runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    r.a(AnonymousClass9.this.f4639a, 400L, new Runnable() {
                        @Override
                        public void run() {
                            AnonymousClass9.this.f4639a.bringToFront();
                            AnonymousClass9.this.b.run();
                        }
                    });
                }
            });
        }
    }

    public interface InterfaceC0065a {
        void a(a aVar);

        void a(String str, Throwable th);
    }

    public class b implements View.OnClickListener, AppLovinAdClickListener {
        private b() {
        }

        public void adClicked(AppLovinAd appLovinAd) {
            v vVar = a.this.f4607c;
            if (v.a()) {
                a.this.f4607c.b("AppLovinFullscreenActivity", "Clicking through graphic");
            }
            k.a(a.this.f4620p, appLovinAd);
            a.this.f4608d.b();
            a.this.f4617m++;
        }

        @Override
        public void onClick(View view) {
            a aVar = a.this;
            if (view != aVar.f4611g || !((Boolean) aVar.b.a(com.applovin.impl.sdk.c.b.cB)).booleanValue()) {
                v vVar = a.this.f4607c;
                if (v.a()) {
                    a.this.f4607c.e("AppLovinFullscreenActivity", "Unhandled click on widget: " + view);
                    return;
                }
                return;
            }
            a.d(a.this);
            if (a.this.f4606a.V()) {
                a.this.b("javascript:al_onCloseButtonTapped(" + a.this.C + "," + a.this.f4616l + "," + a.this.f4617m + ");");
            }
            List<Integer> u2 = a.this.f4606a.u();
            v vVar2 = a.this.f4607c;
            if (v.a()) {
                a.this.f4607c.b("AppLovinFullscreenActivity", "Handling close button tap " + a.this.C + " with multi close delay: " + u2);
            }
            if (u2 == null || u2.size() <= a.this.C) {
                a.this.h();
                return;
            }
            a.this.D.add(Long.valueOf(SystemClock.elapsedRealtime() - a.this.f4614j));
            List<i.a> w2 = a.this.f4606a.w();
            if (w2 != null && w2.size() > a.this.C) {
                a aVar2 = a.this;
                aVar2.f4611g.a(w2.get(aVar2.C));
            }
            v vVar3 = a.this.f4607c;
            if (v.a()) {
                a.this.f4607c.b("AppLovinFullscreenActivity", "Scheduling next close button with delay: " + u2.get(a.this.C));
            }
            a.this.f4611g.setVisibility(8);
            a aVar3 = a.this;
            aVar3.a(aVar3.f4611g, u2.get(aVar3.C).intValue(), new Runnable() {
                @Override
                public void run() {
                    a.this.f4614j = SystemClock.elapsedRealtime();
                }
            });
        }
    }

    public a(final com.applovin.impl.sdk.ad.e eVar, Activity activity, final n nVar, AppLovinAdClickListener appLovinAdClickListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
        this.f4606a = eVar;
        this.b = nVar;
        this.f4607c = nVar.J();
        this.f4609e = activity;
        this.f4620p = appLovinAdClickListener;
        this.f4621q = appLovinAdDisplayListener;
        this.f4622r = appLovinAdVideoPlaybackListener;
        com.applovin.impl.sdk.b.b bVar = new com.applovin.impl.sdk.b.b(activity, nVar);
        this.f4623s = bVar;
        bVar.a(this);
        com.applovin.impl.sdk.d.d dVar = new com.applovin.impl.sdk.d.d(eVar, nVar);
        this.f4608d = dVar;
        this.E = new com.applovin.impl.sdk.i(nVar);
        b bVar2 = new b();
        if (((Boolean) nVar.a(com.applovin.impl.sdk.c.b.cT)).booleanValue()) {
            AppLovinBroadcastManager.registerReceiver(this, new IntentFilter("com.applovin.render_process_gone"));
        }
        com.applovin.impl.adview.n nVar2 = new com.applovin.impl.adview.n(nVar.I(), AppLovinAdSize.INTERSTITIAL, activity);
        this.f4610f = nVar2;
        nVar2.setAdClickListener(bVar2);
        this.f4610f.setAdDisplayListener(new AppLovinAdDisplayListener() {
            public void adDisplayed(AppLovinAd appLovinAd) {
                v vVar = a.this.f4607c;
                if (v.a()) {
                    a.this.f4607c.b("AppLovinFullscreenActivity", "Web content rendered");
                }
            }

            public void adHidden(AppLovinAd appLovinAd) {
                v vVar = a.this.f4607c;
                if (v.a()) {
                    a.this.f4607c.b("AppLovinFullscreenActivity", "Closing from WebView");
                }
                a.this.h();
            }
        });
        this.f4610f.getController().a(dVar);
        nVar.D().trackImpression(eVar);
        List<Integer> u2 = eVar.u();
        if (eVar.t() >= 0 || u2 != null) {
            m mVar = new m(eVar.v(), activity);
            this.f4611g = mVar;
            mVar.setVisibility(8);
            mVar.setOnClickListener(bVar2);
        } else {
            this.f4611g = null;
        }
        m mVar2 = new m(i.a.WHITE_ON_TRANSPARENT, activity);
        this.f4612h = mVar2;
        mVar2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                a.this.h();
            }
        });
        if (((Boolean) nVar.a(com.applovin.impl.sdk.c.b.cD)).booleanValue()) {
            this.f4627w = new AppLovinBroadcastManager.Receiver() {
                @Override
                public void onReceive(Intent intent, @Nullable Map<String, Object> map) {
                    nVar.D().trackAppKilled(eVar);
                    AppLovinBroadcastManager.unregisterReceiver(this);
                }
            };
        } else {
            this.f4627w = null;
        }
        if (eVar.al()) {
            this.x = new h.a() {
                @Override
                public void a(int i2) {
                    String str;
                    a aVar = a.this;
                    if (aVar.f4618n != h.f6178a) {
                        aVar.f4619o = true;
                    }
                    com.applovin.impl.adview.d s2 = aVar.f4610f.getController().s();
                    if (!h.a(i2) || h.a(a.this.f4618n)) {
                        str = i2 == 2 ? "javascript:al_muteSwitchOff();" : "javascript:al_muteSwitchOn();";
                        a.this.f4618n = i2;
                    }
                    s2.a(str);
                    a.this.f4618n = i2;
                }
            };
        } else {
            this.x = null;
        }
        if (((Boolean) nVar.a(com.applovin.impl.sdk.c.b.eW)).booleanValue()) {
            this.f4626v = new com.applovin.impl.sdk.utils.a() {
                @Override
                public void onActivityCreated(Activity activity2, Bundle bundle) {
                    if (a.this.z.get()) {
                        return;
                    }
                    if (activity2.getClass().getName().equals(Utils.retrieveLauncherActivityFullyQualifiedName(activity2.getApplicationContext()))) {
                        AppLovinSdkUtils.runOnUiThread(new Runnable() {
                            @Override
                            public void run() {
                                v.i("AppLovinFullscreenActivity", "Dismissing on-screen ad due to app relaunched via launcher.");
                                try {
                                    a.this.h();
                                } catch (Throwable th) {
                                    v.c("AppLovinFullscreenActivity", "Failed to dismiss ad.", th);
                                    try {
                                        a.this.n();
                                    } catch (Throwable unused) {
                                    }
                                }
                            }
                        });
                    }
                }
            };
        } else {
            this.f4626v = null;
        }
    }

    public static int d(a aVar) {
        int i2 = aVar.C;
        aVar.C = i2 + 1;
        return i2;
    }

    public abstract void a(long j2);

    public abstract void a(@Nullable ViewGroup viewGroup);

    public abstract void d();

    public abstract void e();

    public void g() {
        if (v.a()) {
            this.f4607c.c("AppLovinFullscreenActivity", "onPause()");
        }
        this.A = SystemClock.elapsedRealtime();
        a("javascript:al_onAppPaused();");
        if (this.f4623s.c()) {
            this.f4623s.a();
        }
        p();
    }

    public void h() {
        this.B = true;
        if (v.a()) {
            this.f4607c.c("AppLovinFullscreenActivity", "dismiss()");
        }
        com.applovin.impl.sdk.ad.e eVar = this.f4606a;
        if (eVar != null) {
            eVar.o().e();
        }
        this.f4625u.removeCallbacksAndMessages(null);
        a("javascript:al_onPoststitialDismiss();", this.f4606a.T());
        n();
        this.f4608d.c();
        this.E.a();
        if (this.f4627w != null) {
            p.a(TimeUnit.SECONDS.toMillis(2L), this.b, new Runnable() {
                @Override
                public void run() {
                    a.this.f4609e.stopService(new Intent(a.this.f4609e.getApplicationContext(), (Class<?>) AppKilledService.class));
                    AppLovinBroadcastManager.unregisterReceiver(a.this.f4627w);
                }
            });
        }
        if (this.x != null) {
            this.b.Z().b(this.x);
        }
        if (this.f4626v != null) {
            this.b.v().b(this.f4626v);
        }
        if (o()) {
            this.f4609e.finish();
            return;
        }
        this.b.J();
        if (v.a()) {
            this.b.J().b("AppLovinFullscreenActivity", "Fullscreen ad shown in container view dismissed, destroying the presenter.");
        }
        k();
    }

    public boolean i() {
        return this.B;
    }

    public void j() {
        if (v.a()) {
            this.f4607c.c("AppLovinFullscreenActivity", "onStop()");
        }
    }

    public void k() {
        AppLovinAdView appLovinAdView = this.f4610f;
        if (appLovinAdView != null) {
            ViewParent parent = appLovinAdView.getParent();
            this.f4610f.destroy();
            this.f4610f = null;
            if ((parent instanceof ViewGroup) && o()) {
                ((ViewGroup) parent).removeAllViews();
            }
        }
        m();
        n();
        this.f4620p = null;
        this.f4621q = null;
        this.f4622r = null;
        this.f4609e = null;
        AppLovinBroadcastManager.unregisterReceiver(this);
    }

    public void l() {
        if (v.a()) {
            this.f4607c.c("AppLovinFullscreenActivity", "onBackPressed()");
        }
        if (this.F) {
            h();
        }
        if (this.f4606a.V()) {
            b("javascript:onBackPressed();");
        }
    }

    public abstract void m();

    public void n() {
        if (this.z.compareAndSet(false, true)) {
            k.b(this.f4621q, this.f4606a);
            this.b.V().b(this.f4606a);
        }
    }

    public boolean o() {
        return this.f4609e instanceof AppLovinFullscreenActivity;
    }

    @Override
    public void onReceive(Intent intent, @Nullable Map<String, Object> map) {
        if (!"com.applovin.render_process_gone".equals(intent.getAction()) || this.f4615k) {
            return;
        }
        w();
    }

    public void p() {
        p pVar = this.f4624t;
        if (pVar != null) {
            pVar.b();
        }
    }

    public void q() {
        p pVar = this.f4624t;
        if (pVar != null) {
            pVar.c();
        }
    }

    public abstract boolean r();

    public abstract boolean s();

    public boolean t() {
        return AppLovinAdType.INCENTIVIZED == this.f4606a.getType() || AppLovinAdType.AUTO_INCENTIVIZED == this.f4606a.getType();
    }

    public abstract void u();

    public void v() {
        com.applovin.impl.adview.d s2;
        AppLovinAdView appLovinAdView = this.f4610f;
        if (appLovinAdView == null || (s2 = appLovinAdView.getController().s()) == null) {
            return;
        }
        this.E.a(s2, new i.a() {
            @Override
            public void a(View view) {
                m mVar;
                a.this.E.a(CollectionUtils.map("clcode", a.this.f4606a.getClCode()));
                if (((Boolean) a.this.b.a(com.applovin.impl.sdk.c.b.fu)).booleanValue()) {
                    a.this.h();
                    return;
                }
                a aVar = a.this;
                aVar.F = ((Boolean) aVar.b.a(com.applovin.impl.sdk.c.b.fv)).booleanValue();
                if (!((Boolean) a.this.b.a(com.applovin.impl.sdk.c.b.fw)).booleanValue() || (mVar = a.this.f4611g) == null) {
                    return;
                }
                mVar.setVisibility(0);
            }
        });
    }

    public void w() {
        if (v.a()) {
            this.f4607c.c("AppLovinFullscreenActivity", "Handling render process crash");
        }
        this.f4615k = true;
    }

    private void c() {
        AppLovinBroadcastManager.Receiver receiver = this.f4627w;
        if (receiver != null) {
            AppLovinBroadcastManager.registerReceiver(receiver, new IntentFilter(AppKilledService.ACTION_APP_KILLED));
        }
        if (this.x != null) {
            this.b.Z().a(this.x);
        }
        if (this.f4626v != null) {
            this.b.v().a(this.f4626v);
        }
    }

    public void a(int i2, KeyEvent keyEvent) {
        if (this.f4607c == null || !v.a()) {
            return;
        }
        this.f4607c.c("AppLovinFullscreenActivity", "onKeyDown(int, KeyEvent) -  " + i2 + ", " + keyEvent);
    }

    public void b(long j2) {
        if (v.a()) {
            this.f4607c.b("AppLovinFullscreenActivity", "Scheduling report reward in " + TimeUnit.MILLISECONDS.toSeconds(j2) + " seconds...");
        }
        this.f4624t = p.a(j2, this.b, new Runnable() {
            @Override
            public void run() {
                if (a.this.f4606a.ag().getAndSet(true)) {
                    return;
                }
                a aVar = a.this;
                a.this.b.K().a(new com.applovin.impl.sdk.e.v(aVar.f4606a, aVar.b), o.a.REWARD);
            }
        });
    }

    public void f() {
        if (v.a()) {
            this.f4607c.c("AppLovinFullscreenActivity", "onResume()");
        }
        this.f4608d.d(SystemClock.elapsedRealtime() - this.A);
        a("javascript:al_onAppResumed();");
        q();
        if (this.f4623s.c()) {
            this.f4623s.a();
        }
    }

    public void a(int i2, boolean z, boolean z2, long j2) {
        if (this.y.compareAndSet(false, true)) {
            if (this.f4606a.hasVideoUrl() || t()) {
                k.a(this.f4622r, this.f4606a, i2, z2);
            }
            if (this.f4606a.hasVideoUrl()) {
                this.f4608d.c(i2);
            }
            long elapsedRealtime = SystemClock.elapsedRealtime() - this.f4613i;
            this.b.D().trackVideoEnd(this.f4606a, TimeUnit.MILLISECONDS.toSeconds(elapsedRealtime), i2, z);
            long elapsedRealtime2 = this.f4614j != -1 ? SystemClock.elapsedRealtime() - this.f4614j : -1L;
            this.b.D().trackFullScreenAdClosed(this.f4606a, elapsedRealtime2, this.D, j2, this.f4619o, this.f4618n);
            if (v.a()) {
                v vVar = this.f4607c;
                StringBuilder sb = new StringBuilder("Video ad ended at percent: ");
                sb.append(i2);
                sb.append("%, elapsedTime: ");
                sb.append(elapsedRealtime);
                android.support.v4.media.c.w(sb, "ms, skipTimeMillis: ", j2, "ms, closeTimeMillis: ");
                vVar.b("AppLovinFullscreenActivity", android.support.v4.media.b.o(sb, elapsedRealtime2, "ms"));
            }
        }
    }

    public void b(String str) {
        a(str, 0L);
    }

    public void c(boolean z) {
        if (v.a()) {
            this.f4607c.c("AppLovinFullscreenActivity", "onWindowFocusChanged(boolean) - " + z);
        }
        a("javascript:al_onWindowFocusChanged( " + z + " );");
    }

    public void b(boolean z) {
        a(z, ((Long) this.b.a(com.applovin.impl.sdk.c.b.cQ)).longValue());
        k.a(this.f4621q, this.f4606a);
        this.b.V().a(this.f4606a);
        if (this.f4606a.hasVideoUrl() || t()) {
            k.a(this.f4622r, this.f4606a);
        }
        new com.applovin.impl.adview.activity.b(this.f4609e).a(this.f4606a);
        this.f4608d.a();
        this.f4606a.setHasShown(true);
    }

    public void a(Configuration configuration) {
        if (v.a()) {
            this.f4607c.c("AppLovinFullscreenActivity", "onConfigurationChanged(Configuration) -  " + configuration);
        }
    }

    public void a(m mVar, long j2, Runnable runnable) {
        if (j2 >= ((Long) this.b.a(com.applovin.impl.sdk.c.b.cA)).longValue()) {
            return;
        }
        this.b.K().a(new z(this.b, new AnonymousClass9(mVar, runnable)), o.a.MAIN, TimeUnit.SECONDS.toMillis(j2), true);
    }

    public static void a(com.applovin.impl.sdk.ad.e eVar, AppLovinAdClickListener appLovinAdClickListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener, n nVar, Activity activity, InterfaceC0065a interfaceC0065a) {
        a bVar;
        boolean aH = eVar.aH();
        if (eVar instanceof com.applovin.impl.b.a) {
            if (aH) {
                try {
                    bVar = new c(eVar, activity, nVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
                } catch (Throwable th) {
                    nVar.J();
                    if (v.a()) {
                        nVar.J().a("AppLovinFullscreenActivity", "Failed to create ExoPlayer presenter to show the ad. Falling back to using native media player presenter.", th);
                    }
                    try {
                        bVar = new d(eVar, activity, nVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
                    } catch (Throwable th2) {
                        interfaceC0065a.a("Failed to create FullscreenVastVideoAdPresenter with sdk: " + nVar + " and throwable: " + th2.getMessage(), th2);
                        return;
                    }
                }
            } else {
                try {
                    bVar = new d(eVar, activity, nVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
                } catch (Throwable th3) {
                    interfaceC0065a.a("Failed to create FullscreenVastVideoAdPresenter with sdk: " + nVar + " and throwable: " + th3.getMessage(), th3);
                    return;
                }
            }
        } else if (!eVar.hasVideoUrl()) {
            try {
                bVar = new com.applovin.impl.adview.activity.b.b(eVar, activity, nVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
            } catch (Throwable th4) {
                interfaceC0065a.a("Failed to create FullscreenGraphicAdPresenter with sdk: " + nVar + " and throwable: " + th4.getMessage(), th4);
                return;
            }
        } else if (eVar.aK()) {
            try {
                bVar = new g(eVar, activity, nVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
            } catch (Throwable th5) {
                interfaceC0065a.a("Failed to create FullscreenWebVideoAdPresenter with sdk: " + nVar + " and throwable: " + th5.getMessage(), th5);
                return;
            }
        } else if (aH) {
            try {
                bVar = new e(eVar, activity, nVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
            } catch (Throwable th6) {
                nVar.J();
                if (v.a()) {
                    nVar.J().a("AppLovinFullscreenActivity", "Failed to create ExoPlayer presenter to show the ad. Falling back to using native media player presenter.", th6);
                }
                try {
                    bVar = new f(eVar, activity, nVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
                } catch (Throwable th7) {
                    interfaceC0065a.a("Failed to create FullscreenVideoAdExoPlayerPresenter with sdk: " + nVar + " and throwable: " + th7.getMessage(), th7);
                    return;
                }
            }
        } else {
            try {
                bVar = new f(eVar, activity, nVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
            } catch (Throwable th8) {
                interfaceC0065a.a("Failed to create FullscreenVideoAdPresenter with sdk: " + nVar + " and throwable: " + th8.getMessage(), th8);
                return;
            }
        }
        bVar.c();
        interfaceC0065a.a(bVar);
    }

    public void a(Runnable runnable, long j2) {
        AppLovinSdkUtils.runOnUiThreadDelayed(runnable, j2, this.f4625u);
    }

    public void a(String str) {
        if (this.f4606a.W()) {
            a(str, 0L);
        }
    }

    public void a(final String str, long j2) {
        if (j2 >= 0) {
            a(new Runnable() {
                @Override
                public void run() {
                    AppLovinAdView appLovinAdView;
                    com.applovin.impl.adview.d s2;
                    if (!StringUtils.isValidString(str) || (appLovinAdView = a.this.f4610f) == null || (s2 = appLovinAdView.getController().s()) == null) {
                        return;
                    }
                    s2.a(str);
                }
            }, j2);
        }
    }

    public void a(boolean z) {
        List<Uri> checkCachedResourcesExist = Utils.checkCachedResourcesExist(z, this.f4606a, this.b, this.f4609e);
        if (checkCachedResourcesExist.isEmpty()) {
            return;
        }
        if (!((Boolean) this.b.a(com.applovin.impl.sdk.c.b.fa)).booleanValue()) {
            if (v.a()) {
                this.f4607c.e("AppLovinFullscreenActivity", "Streaming ad due to missing ad resources: " + checkCachedResourcesExist);
            }
            this.f4606a.a();
            return;
        }
        if (v.a()) {
            this.f4607c.e("AppLovinFullscreenActivity", "Dismissing ad due to missing resources: " + checkCachedResourcesExist);
        }
        com.applovin.impl.adview.o.a(this.f4606a, this.f4621q, "Missing ad resources", null, null);
        h();
    }

    public void a(boolean z, long j2) {
        if (this.f4606a.U()) {
            a(z ? "javascript:al_mute();" : "javascript:al_unmute();", j2);
        }
    }
}