Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f

以下内容为反编译后的 a.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.adview.n;
import com.applovin.impl.adview.o;
import com.applovin.impl.adview.u;
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.v;
import com.applovin.impl.sdk.e.z;
import com.applovin.impl.sdk.k;
import com.applovin.impl.sdk.l;
import com.applovin.impl.sdk.p;
import com.applovin.impl.sdk.t;
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.r;
import com.applovin.impl.sdk.y;
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 B;
    private boolean C;
    private final l F;

    protected final com.applovin.impl.sdk.ad.e f29604a;

    protected final p f29605b;

    protected final y f29606c;

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

    protected Activity f29608e;

    protected AppLovinAdView f29609f;

    @Nullable
    protected u f29610g;

    @Nullable
    protected final m f29611h;

    protected final m f29612i;

    protected boolean f29615l;

    protected boolean f29619p;

    protected AppLovinAdClickListener f29620q;

    protected AppLovinAdDisplayListener f29621r;

    protected AppLovinAdVideoPlaybackListener f29622s;

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

    @Nullable
    protected com.applovin.impl.sdk.utils.p f29624u;

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

    @Nullable
    private final AppLovinBroadcastManager.Receiver f29627x;

    @Nullable
    private final k.a f29628y;

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

    protected final long f29613j = SystemClock.elapsedRealtime();

    private final AtomicBoolean f29629z = new AtomicBoolean();
    private final AtomicBoolean A = new AtomicBoolean();

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

    protected int f29616m = 0;

    protected int f29617n = 0;

    protected int f29618o = k.f31888a;
    private boolean G = false;

    public class AnonymousClass9 implements Runnable {

        final m f29643a;

        final Runnable f29644b;

        public AnonymousClass9(m mVar, Runnable runnable) {
            this.f29643a = mVar;
            this.f29644b = runnable;
        }

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

    public interface InterfaceC0525a {
        void a(a aVar);

        void a(String str, Throwable th2);
    }

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

        @Override
        public void adClicked(AppLovinAd appLovinAd) {
            y yVar = a.this.f29606c;
            if (y.a()) {
                a.this.f29606c.b("AppLovinFullscreenActivity", "Clicking through graphic");
            }
            com.applovin.impl.sdk.utils.k.a(a.this.f29620q, appLovinAd);
            a.this.f29607d.b();
            a.this.f29617n++;
        }

        @Override
        public void onClick(View view) {
            a aVar = a.this;
            if (view == aVar.f29611h && ((Boolean) aVar.f29605b.a(com.applovin.impl.sdk.c.b.cC)).booleanValue()) {
                a.c(a.this);
                if (a.this.f29604a.V()) {
                    a.this.b("javascript:al_onCloseButtonTapped(" + a.this.D + "," + a.this.f29616m + "," + a.this.f29617n + ");");
                }
                List<Integer> u11 = a.this.f29604a.u();
                y yVar = a.this.f29606c;
                if (y.a()) {
                    a.this.f29606c.b("AppLovinFullscreenActivity", "Handling close button tap " + a.this.D + " with multi close delay: " + u11);
                }
                if (u11 != null && u11.size() > a.this.D) {
                    a.this.E.add(Long.valueOf(SystemClock.elapsedRealtime() - a.this.f29614k));
                    List<i.a> w11 = a.this.f29604a.w();
                    if (w11 != null && w11.size() > a.this.D) {
                        a aVar2 = a.this;
                        aVar2.f29611h.a(w11.get(aVar2.D));
                    }
                    y yVar2 = a.this.f29606c;
                    if (y.a()) {
                        a.this.f29606c.b("AppLovinFullscreenActivity", "Scheduling next close button with delay: " + u11.get(a.this.D));
                    }
                    a.this.f29611h.setVisibility(8);
                    a aVar3 = a.this;
                    aVar3.a(aVar3.f29611h, u11.get(aVar3.D).intValue(), new Runnable() {
                        @Override
                        public void run() {
                            a.this.f29614k = SystemClock.elapsedRealtime();
                        }
                    });
                    return;
                }
                a.this.h();
                return;
            }
            y yVar3 = a.this.f29606c;
            if (y.a()) {
                a.this.f29606c.e("AppLovinFullscreenActivity", "Unhandled click on widget: " + view);
            }
        }
    }

    public a(final com.applovin.impl.sdk.ad.e eVar, Activity activity, @Nullable Map<String, Object> map, final p pVar, AppLovinAdClickListener appLovinAdClickListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener) {
        this.f29604a = eVar;
        this.f29605b = pVar;
        this.f29606c = pVar.L();
        this.f29608e = activity;
        this.f29620q = appLovinAdClickListener;
        this.f29621r = appLovinAdDisplayListener;
        this.f29622s = appLovinAdVideoPlaybackListener;
        com.applovin.impl.sdk.b.b bVar = new com.applovin.impl.sdk.b.b(activity, pVar);
        this.f29623t = bVar;
        bVar.a(this);
        com.applovin.impl.sdk.d.d dVar = new com.applovin.impl.sdk.d.d(eVar, pVar);
        this.f29607d = dVar;
        this.F = new l(pVar);
        b bVar2 = new b();
        if (((Boolean) pVar.a(com.applovin.impl.sdk.c.b.cU)).booleanValue()) {
            AppLovinBroadcastManager.registerReceiver(this, new IntentFilter("com.applovin.render_process_gone"));
        }
        n nVar = new n(pVar.K(), AppLovinAdSize.INTERSTITIAL, activity);
        this.f29609f = nVar;
        nVar.setAdClickListener(bVar2);
        this.f29609f.setAdDisplayListener(new AppLovinAdDisplayListener() {
            @Override
            public void adDisplayed(AppLovinAd appLovinAd) {
                y yVar = a.this.f29606c;
                if (y.a()) {
                    a.this.f29606c.b("AppLovinFullscreenActivity", "Web content rendered");
                }
            }

            @Override
            public void adHidden(AppLovinAd appLovinAd) {
                y yVar = a.this.f29606c;
                if (y.a()) {
                    a.this.f29606c.b("AppLovinFullscreenActivity", "Closing from WebView");
                }
                a.this.h();
            }
        });
        this.f29609f.getController().a(dVar);
        if (((Boolean) pVar.a(com.applovin.impl.sdk.c.b.f31478az)).booleanValue()) {
            this.f29610g = new u(new o(map, pVar), activity);
        }
        pVar.E().trackImpression(eVar);
        List<Integer> u11 = eVar.u();
        if (eVar.t() < 0 && u11 == null) {
            this.f29611h = null;
        } else {
            m mVar = new m(eVar.v(), activity);
            this.f29611h = mVar;
            mVar.setVisibility(8);
            mVar.setOnClickListener(bVar2);
        }
        m mVar2 = new m(i.a.WHITE_ON_TRANSPARENT, activity);
        this.f29612i = mVar2;
        mVar2.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                a.this.h();
            }
        });
        if (((Boolean) pVar.a(com.applovin.impl.sdk.c.b.cE)).booleanValue()) {
            this.f29627x = new AppLovinBroadcastManager.Receiver() {
                @Override
                public void onReceive(Intent intent, @Nullable Map<String, Object> map2) {
                    pVar.E().trackAppKilled(eVar);
                    AppLovinBroadcastManager.unregisterReceiver(this);
                }
            };
        } else {
            this.f29627x = null;
        }
        if (eVar.al()) {
            this.f29628y = new k.a() {
                @Override
                public void a(int i11) {
                    a aVar = a.this;
                    if (aVar.f29618o != k.f31888a) {
                        aVar.f29619p = true;
                    }
                    com.applovin.impl.adview.d s11 = aVar.f29609f.getController().s();
                    if (k.a(i11) && !k.a(a.this.f29618o)) {
                        s11.a("javascript:al_muteSwitchOn();");
                    } else if (i11 == 2) {
                        s11.a("javascript:al_muteSwitchOff();");
                    }
                    a.this.f29618o = i11;
                }
            };
        } else {
            this.f29628y = null;
        }
        if (((Boolean) pVar.a(com.applovin.impl.sdk.c.b.f31597fo)).booleanValue()) {
            this.f29626w = new com.applovin.impl.sdk.utils.a() {
                @Override
                public void onActivityCreated(Activity activity2, Bundle bundle) {
                    if (!a.this.A.get()) {
                        if (activity2.getClass().getName().equals(Utils.retrieveLauncherActivityFullyQualifiedName(activity2.getApplicationContext()))) {
                            AppLovinSdkUtils.runOnUiThread(new Runnable() {
                                @Override
                                public void run() {
                                    y.i("AppLovinFullscreenActivity", "Dismissing on-screen ad due to app relaunched via launcher.");
                                    try {
                                        a.this.h();
                                    } catch (Throwable th2) {
                                        y.c("AppLovinFullscreenActivity", "Failed to dismiss ad.", th2);
                                        try {
                                            a.this.n();
                                        } catch (Throwable unused) {
                                        }
                                    }
                                }
                            });
                        }
                    }
                }
            };
        } else {
            this.f29626w = null;
        }
    }

    public static int c(a aVar) {
        int i11 = aVar.D;
        aVar.D = i11 + 1;
        return i11;
    }

    public abstract void a(long j11);

    public abstract void a(@Nullable ViewGroup viewGroup);

    public abstract void d();

    public abstract void e();

    public void f() {
        if (y.a()) {
            this.f29606c.c("AppLovinFullscreenActivity", "onResume()");
        }
        this.f29607d.d(SystemClock.elapsedRealtime() - this.B);
        a("javascript:al_onAppResumed();");
        q();
        if (this.f29623t.c()) {
            this.f29623t.a();
        }
    }

    public void g() {
        if (y.a()) {
            this.f29606c.c("AppLovinFullscreenActivity", "onPause()");
        }
        this.B = SystemClock.elapsedRealtime();
        a("javascript:al_onAppPaused();");
        if (this.f29623t.c()) {
            this.f29623t.a();
        }
        p();
    }

    public void h() {
        this.C = true;
        if (y.a()) {
            this.f29606c.c("AppLovinFullscreenActivity", "dismiss()");
        }
        com.applovin.impl.sdk.ad.e eVar = this.f29604a;
        if (eVar != null) {
            eVar.o().e();
        }
        this.f29625v.removeCallbacksAndMessages(null);
        a("javascript:al_onPoststitialDismiss();", this.f29604a.T());
        n();
        this.f29607d.c();
        this.F.a();
        if (this.f29627x != null) {
            com.applovin.impl.sdk.utils.p.a(TimeUnit.SECONDS.toMillis(2L), this.f29605b, new Runnable() {
                @Override
                public void run() {
                    a.this.f29608e.stopService(new Intent(a.this.f29608e.getApplicationContext(), (Class<?>) AppKilledService.class));
                    AppLovinBroadcastManager.unregisterReceiver(a.this.f29627x);
                }
            });
        }
        if (this.f29628y != null) {
            this.f29605b.ad().b(this.f29628y);
        }
        if (this.f29626w != null) {
            this.f29605b.w().b(this.f29626w);
        }
        if (o()) {
            this.f29608e.finish();
            return;
        }
        this.f29605b.L();
        if (y.a()) {
            this.f29605b.L().b("AppLovinFullscreenActivity", "Fullscreen ad shown in container view dismissed, destroying the presenter.");
        }
        k();
    }

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

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

    public void k() {
        AppLovinAdView appLovinAdView = this.f29609f;
        if (appLovinAdView != null) {
            ViewParent parent = appLovinAdView.getParent();
            this.f29609f.destroy();
            this.f29609f = null;
            if ((parent instanceof ViewGroup) && o()) {
                ((ViewGroup) parent).removeAllViews();
            }
        }
        m();
        n();
        this.f29620q = null;
        this.f29621r = null;
        this.f29622s = null;
        this.f29608e = null;
        AppLovinBroadcastManager.unregisterReceiver(this);
    }

    public void l() {
        if (y.a()) {
            this.f29606c.c("AppLovinFullscreenActivity", "onBackPressed()");
        }
        if (this.G) {
            h();
        }
        if (this.f29604a.V()) {
            b("javascript:onBackPressed();");
        }
    }

    public abstract void m();

    public void n() {
        if (this.A.compareAndSet(false, true)) {
            com.applovin.impl.sdk.utils.k.b(this.f29621r, this.f29604a);
            this.f29605b.Z().b(this.f29604a);
        }
    }

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

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

    public void p() {
        com.applovin.impl.sdk.utils.p pVar = this.f29624u;
        if (pVar != null) {
            pVar.b();
        }
    }

    public void q() {
        com.applovin.impl.sdk.utils.p pVar = this.f29624u;
        if (pVar != null) {
            pVar.c();
        }
    }

    public abstract boolean r();

    public abstract boolean s();

    public boolean t() {
        if (AppLovinAdType.INCENTIVIZED != this.f29604a.getType() && AppLovinAdType.AUTO_INCENTIVIZED != this.f29604a.getType()) {
            return false;
        }
        return true;
    }

    public abstract void u();

    public void v() {
        com.applovin.impl.adview.d s11;
        AppLovinAdView appLovinAdView = this.f29609f;
        if (appLovinAdView == null || (s11 = appLovinAdView.getController().s()) == null) {
            return;
        }
        this.F.a(s11, new l.a() {
            @Override
            public void a(View view) {
                m mVar;
                a.this.f29605b.aj().a(t.a.BLACK_VIEW, CollectionUtils.map("clcode", a.this.f29604a.getClCode()));
                if (((Boolean) a.this.f29605b.a(com.applovin.impl.sdk.c.b.fK)).booleanValue()) {
                    a.this.h();
                    return;
                }
                a aVar = a.this;
                aVar.G = ((Boolean) aVar.f29605b.a(com.applovin.impl.sdk.c.b.fL)).booleanValue();
                if (((Boolean) a.this.f29605b.a(com.applovin.impl.sdk.c.b.fM)).booleanValue() && (mVar = a.this.f29611h) != null) {
                    mVar.setVisibility(0);
                }
            }
        });
    }

    public void w() {
        if (y.a()) {
            this.f29606c.c("AppLovinFullscreenActivity", "Handling render process crash");
        }
        this.f29615l = true;
    }

    private void c() {
        AppLovinBroadcastManager.Receiver receiver = this.f29627x;
        if (receiver != null) {
            AppLovinBroadcastManager.registerReceiver(receiver, new IntentFilter(AppKilledService.ACTION_APP_KILLED));
        }
        if (this.f29628y != null) {
            this.f29605b.ad().a(this.f29628y);
        }
        if (this.f29626w != null) {
            this.f29605b.w().a(this.f29626w);
        }
    }

    public void b(boolean z11) {
        a(z11, ((Long) this.f29605b.a(com.applovin.impl.sdk.c.b.cR)).longValue());
        com.applovin.impl.sdk.utils.k.a(this.f29621r, this.f29604a);
        this.f29605b.Z().a(this.f29604a);
        if (this.f29604a.hasVideoUrl() || t()) {
            com.applovin.impl.sdk.utils.k.a(this.f29622s, this.f29604a);
        }
        new com.applovin.impl.adview.activity.b(this.f29608e).a(this.f29604a);
        this.f29607d.a();
        this.f29604a.setHasShown(true);
    }

    public static void a(com.applovin.impl.sdk.ad.e eVar, AppLovinAdClickListener appLovinAdClickListener, AppLovinAdDisplayListener appLovinAdDisplayListener, AppLovinAdVideoPlaybackListener appLovinAdVideoPlaybackListener, @Nullable Map<String, Object> map, p pVar, Activity activity, InterfaceC0525a interfaceC0525a) {
        a bVar;
        boolean aJ = eVar.aJ();
        if (eVar instanceof com.applovin.impl.c.a) {
            if (aJ) {
                try {
                    bVar = new c(eVar, activity, map, pVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
                } catch (Throwable th2) {
                    pVar.L();
                    if (y.a()) {
                        pVar.L().a("AppLovinFullscreenActivity", "Failed to create ExoPlayer presenter to show the ad. Falling back to using native media player presenter.", th2);
                    }
                    try {
                        bVar = new d(eVar, activity, map, pVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
                    } catch (Throwable th3) {
                        interfaceC0525a.a("Failed to create FullscreenVastVideoAdPresenter with sdk: " + pVar + " and throwable: " + th3.getMessage(), th3);
                        return;
                    }
                }
            } else {
                try {
                    bVar = new d(eVar, activity, map, pVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
                } catch (Throwable th4) {
                    interfaceC0525a.a("Failed to create FullscreenVastVideoAdPresenter with sdk: " + pVar + " and throwable: " + th4.getMessage(), th4);
                    return;
                }
            }
        } else if (eVar.hasVideoUrl()) {
            if (eVar.aM()) {
                try {
                    bVar = new g(eVar, activity, map, pVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
                } catch (Throwable th5) {
                    interfaceC0525a.a("Failed to create FullscreenWebVideoAdPresenter with sdk: " + pVar + " and throwable: " + th5.getMessage(), th5);
                    return;
                }
            } else if (aJ) {
                try {
                    bVar = new e(eVar, activity, map, pVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
                } catch (Throwable th6) {
                    pVar.L();
                    if (y.a()) {
                        pVar.L().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, map, pVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
                    } catch (Throwable th7) {
                        interfaceC0525a.a("Failed to create FullscreenVideoAdExoPlayerPresenter with sdk: " + pVar + " and throwable: " + th7.getMessage(), th7);
                        return;
                    }
                }
            } else {
                try {
                    bVar = new f(eVar, activity, map, pVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
                } catch (Throwable th8) {
                    interfaceC0525a.a("Failed to create FullscreenVideoAdPresenter with sdk: " + pVar + " and throwable: " + th8.getMessage(), th8);
                    return;
                }
            }
        } else {
            try {
                bVar = new com.applovin.impl.adview.activity.b.b(eVar, activity, map, pVar, appLovinAdClickListener, appLovinAdDisplayListener, appLovinAdVideoPlaybackListener);
            } catch (Throwable th9) {
                interfaceC0525a.a("Failed to create FullscreenGraphicAdPresenter with sdk: " + pVar + " and throwable: " + th9.getMessage(), th9);
                return;
            }
        }
        bVar.c();
        interfaceC0525a.a(bVar);
    }

    public void c(boolean z11) {
        if (y.a()) {
            this.f29606c.c("AppLovinFullscreenActivity", "onWindowFocusChanged(boolean) - " + z11);
        }
        a("javascript:al_onWindowFocusChanged( " + z11 + " );");
    }

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

    public void b(long j11) {
        if (y.a()) {
            this.f29606c.b("AppLovinFullscreenActivity", "Scheduling report reward in " + TimeUnit.MILLISECONDS.toSeconds(j11) + " seconds...");
        }
        this.f29624u = com.applovin.impl.sdk.utils.p.a(j11, this.f29605b, new Runnable() {
            @Override
            public void run() {
                if (!a.this.f29604a.ag().getAndSet(true)) {
                    a aVar = a.this;
                    a.this.f29605b.M().a(new v(aVar.f29604a, aVar.f29605b), o.a.REWARD);
                }
            }
        });
    }

    public void a(boolean z11) {
        List<Uri> checkCachedResourcesExist = Utils.checkCachedResourcesExist(z11, this.f29604a, this.f29605b, this.f29608e);
        if (checkCachedResourcesExist.isEmpty()) {
            return;
        }
        if (((Boolean) this.f29605b.a(com.applovin.impl.sdk.c.b.f31602ft)).booleanValue()) {
            if (y.a()) {
                this.f29606c.e("AppLovinFullscreenActivity", "Dismissing ad due to missing resources: " + checkCachedResourcesExist);
            }
            com.applovin.impl.adview.p.a(this.f29604a, this.f29621r, "Missing ad resources", null, null);
            h();
            return;
        }
        if (y.a()) {
            this.f29606c.e("AppLovinFullscreenActivity", "Streaming ad due to missing ad resources: " + checkCachedResourcesExist);
        }
        this.f29604a.a();
    }

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

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

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

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

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

    public void a(int i11, boolean z11, boolean z12, long j11) {
        if (this.f29629z.compareAndSet(false, true)) {
            if (this.f29604a.hasVideoUrl() || t()) {
                com.applovin.impl.sdk.utils.k.a(this.f29622s, this.f29604a, i11, z12);
            }
            if (this.f29604a.hasVideoUrl()) {
                this.f29607d.c(i11);
            }
            long elapsedRealtime = SystemClock.elapsedRealtime() - this.f29613j;
            this.f29605b.E().trackVideoEnd(this.f29604a, TimeUnit.MILLISECONDS.toSeconds(elapsedRealtime), i11, z11);
            long elapsedRealtime2 = this.f29614k != -1 ? SystemClock.elapsedRealtime() - this.f29614k : -1L;
            this.f29605b.E().trackFullScreenAdClosed(this.f29604a, elapsedRealtime2, this.E, j11, this.f29619p, this.f29618o);
            if (y.a()) {
                this.f29606c.b("AppLovinFullscreenActivity", "Video ad ended at percent: " + i11 + "%, elapsedTime: " + elapsedRealtime + "ms, skipTimeMillis: " + j11 + "ms, closeTimeMillis: " + elapsedRealtime2 + "ms");
            }
        }
    }

    public void a(boolean z11, long j11) {
        if (this.f29604a.U()) {
            a(z11 ? "javascript:al_mute();" : "javascript:al_unmute();", j11);
        }
    }

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