TikTok.apk(点击下载) / C47825IqE.java


package X;

import android.content.Context;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.bullet.kit.web.SSWebView;
import com.ss.android.ugc.aweme.commercialize.utils.CommercializeWebViewHelper;
import com.ss.android.ugc.aweme.crossplatform.business.PreRenderWebViewBusiness;
import com.ss.android.ugc.aweme.feed.model.Aweme;
import com.ss.android.ugc.aweme.feed.model.AwemeRawAd;

/* renamed from: X.IqE  reason: case insensitive filesystem */
public final class C47825IqE implements AbstractC47921Irm {
    public final /* synthetic */ C47826IqF LIZ;
    public boolean LIZIZ;

    static {
        Covode.recordClassIndex(52676);
    }

    /* JADX WARN: Incorrect args count in method signature: ()V */
    public C47825IqE(C47826IqF iqF) {
        this.LIZ = iqF;
    }

    @Override // X.AbstractC47921Irm
    public final void LIZ() {
        PreRenderWebViewBusiness LIZ2;
        Aweme aweme;
        AbstractC48069IuA iuA;
        com.ss.android.ugc.aweme.bullet.business.PreRenderWebViewBusiness LIZ3;
        this.LIZ.LIZ(3);
        if (!this.LIZIZ) {
            this.LIZIZ = true;
            this.LIZ.LJIIIIZZ = System.currentTimeMillis();
            C47830IqJ iqJ = this.LIZ.LJ;
            if (iqJ != null) {
                iqJ.LIZIZ = iqJ.LIZJ();
                iqJ.LIZ = iqJ.LIZIZ;
                iqJ.LIZ().getViewTreeObserver().addOnGlobalLayoutListener(iqJ.LIZJ);
            }
            if (this.LIZ.LIZIZ) {
                this.LIZ.getMBulletWebView().setVisibility(0);
                this.LIZ.getMWebView().setVisibility(8);
                SSWebView webView = this.LIZ.getMBulletWebView().getWebView();
                if (webView != null) {
                    webView.loadUrl("javascript:window.dialogPopUp()");
                }
                C47946IsB rootContainer = this.LIZ.getMBulletWebView().getRootContainer();
                if (!(rootContainer == null || (iuA = rootContainer.LJJI) == null || (LIZ3 = com.ss.android.ugc.aweme.bullet.business.PreRenderWebViewBusiness.LIZ.LIZ(iuA)) == null)) {
                    LIZ3.LIZ(this.LIZ.LJIIJJI);
                }
            } else {
                ((AbstractC47907IrY) this.LIZ.getMWebView().LIZ(AbstractC47907IrY.class)).LIZ().loadUrl("javascript:window.dialogPopUp()");
                CommercializeWebViewHelper commercializeWebViewHelper = this.LIZ.LJI;
                if (!(commercializeWebViewHelper == null || (LIZ2 = commercializeWebViewHelper.LIZ()) == null)) {
                    LIZ2.LIZ(this.LIZ.LJIIJJI);
                }
            }
            if (this.LIZ.LIZJ()) {
                C46926Ibj LIZ4 = C46923Ibg.LIZ();
                LIZ4.LIZ = "light_ad";
                LIZ4.LIZIZ = "detail_show";
                C47273IhK params = this.LIZ.getParams();
                AwemeRawAd awemeRawAd = null;
                LIZ4.LIZIZ(params != null ? params.LIZJ : null).LIZ((Context) null);
                C47273IhK params2 = this.LIZ.getParams();
                if (!(params2 == null || (aweme = params2.LIZJ) == null)) {
                    awemeRawAd = aweme.getAwemeRawAd();
                }
                C47173Ifi.LIZ("light_ad", "detail_show", awemeRawAd).LIZJ();
            }
            AbstractC47852Iqf callback = this.LIZ.getCallback();
            if (callback != null) {
                callback.LIZ();
            }
            AbstractC47060Idt idt = this.LIZ.LJFF;
            if (idt != null) {
                idt.LIZ(true);
            }
        }
    }

    @Override // X.AbstractC47921Irm
    public final void LIZIZ() {
        PreRenderWebViewBusiness LIZ2;
        Aweme aweme;
        AwemeRawAd awemeRawAd;
        Aweme aweme2;
        AwemeRawAd awemeRawAd2;
        Aweme aweme3;
        AbstractC48069IuA iuA;
        com.ss.android.ugc.aweme.bullet.business.PreRenderWebViewBusiness LIZ3;
        if (this.LIZIZ) {
            this.LIZIZ = false;
            C47830IqJ iqJ = this.LIZ.LJ;
            if (iqJ != null) {
                iqJ.LIZIZ();
            }
            if (this.LIZ.LIZIZ) {
                C47946IsB rootContainer = this.LIZ.getMBulletWebView().getRootContainer();
                if (!(rootContainer == null || (iuA = rootContainer.LJJI) == null || (LIZ3 = com.ss.android.ugc.aweme.bullet.business.PreRenderWebViewBusiness.LIZ.LIZ(iuA)) == null)) {
                    LIZ3.LIZ();
                }
            } else {
                CommercializeWebViewHelper commercializeWebViewHelper = this.LIZ.LJI;
                if (!(commercializeWebViewHelper == null || (LIZ2 = commercializeWebViewHelper.LIZ()) == null)) {
                    LIZ2.LIZ();
                }
            }
            if (this.LIZ.LIZJ()) {
                C46926Ibj LIZ4 = C46923Ibg.LIZ();
                LIZ4.LIZ = "light_ad";
                LIZ4.LIZIZ = "landing_page";
                String str = this.LIZ.LJII;
                String str2 = "slide";
                if (str == null) {
                    str = str2;
                }
                C46926Ibj LIZJ = LIZ4.LIZJ(str);
                C47273IhK params = this.LIZ.getParams();
                LIZJ.LIZIZ(params != null ? params.LIZJ : null).LIZ((Context) null);
                C47273IhK params2 = this.LIZ.getParams();
                C47093IeQ LIZ5 = C47173Ifi.LIZ("light_ad", "landing_page", (params2 == null || (aweme3 = params2.LIZJ) == null) ? null : aweme3.getAwemeRawAd());
                String str3 = this.LIZ.LJII;
                if (str3 != null) {
                    str2 = str3;
                }
                LIZ5.LIZIZ("refer", str2).LIZJ();
                C46926Ibj LIZ6 = C46923Ibg.LIZ();
                LIZ6.LIZ = "ad_wap_stat";
                LIZ6.LIZIZ = "stay_page";
                C47273IhK params3 = this.LIZ.getParams();
                LIZ6.LIZIZ(params3 != null ? params3.LIZJ : null).LIZIZ(Long.valueOf(System.currentTimeMillis() - this.LIZ.LJIIIIZZ)).LIZ(AnonymousClass1YE.LIZIZ(new C23760wv("light_page", 1))).LIZ((Context) null);
                C47273IhK params4 = this.LIZ.getParams();
                String valueOf = String.valueOf((params4 == null || (aweme2 = params4.LIZJ) == null || (awemeRawAd2 = aweme2.getAwemeRawAd()) == null) ? null : awemeRawAd2.getCreativeId());
                C47273IhK params5 = this.LIZ.getParams();
                C47173Ifi.LIZ("ad_wap_stat", "stay_page", valueOf, (params5 == null || (aweme = params5.LIZJ) == null || (awemeRawAd = aweme.getAwemeRawAd()) == null) ? null : awemeRawAd.getLogExtra(), String.valueOf(System.currentTimeMillis() - this.LIZ.LJIIIIZZ)).LIZ("light_page", 1).LIZJ();
            }
            this.LIZ.LJII = null;
            AbstractC47852Iqf callback = this.LIZ.getCallback();
            if (callback != null) {
                callback.LIZIZ();
            }
            AbstractC47060Idt idt = this.LIZ.LJFF;
            if (idt != null) {
                idt.LIZ(false);
            }
            this.LIZ.LIZ(4);
        }
    }

    @Override // X.AbstractC47921Irm
    public final void LIZJ() {
        if (this.LIZ.getMBottomSheet().getHideable() && this.LIZ.LJIIIZ) {
            this.LIZ.LJIIIZ = false;
            C44361p3.LIZ(this.LIZ.getContext());
        }
        this.LIZ.LIZ(1);
    }

    @Override // X.AbstractC47921Irm
    public final void LIZLLL() {
        this.LIZ.LIZ(7);
    }
}