package com.ss.android.ugc.aweme.live.livehostimpl;

import X.85f;
import X.9I4;
import X.C4968Hbt;
import X.C4969Hbu;
import X.GL4;
import X.K65;
import X.Koo;
import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.webkit.CookieManager;
import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import com.bytedance.android.livesdkapi.host.IHostWebView;
import com.bytedance.covode.number.Covode;
import com.ss.android.common.util.NetworkUtils;
import com.ss.android.ugc.aweme.live.ILiveHostOuterService;
import com.ss.android.ugc.aweme.live.LiveHostOuterService;
import java.util.List;
import java.util.Map;

public class LiveHostWebView implements IHostWebView {
    public volatile Koo LIZ;

    static {
        Covode.recordClassIndex(91259);
    }

    public final String LIZLLL() {
        return "99999";
    }

    public void onInit() {
    }

    public final void LIZJ() {
        K65.LIZ();
    }

    public final String LIZIZ() {
        LJ();
        String str = this.LIZ.LIZIZ;
        if (!TextUtils.isEmpty(str)) {
            return 85f.LIZ("offlineX", str, "tiktok_live_lynx");
        }
        return null;
    }

    private void LJ() {
        if (this.LIZ == null) {
            Koo koo = new Koo(LiveHostOuterService.LJIILLIIL().LJ());
            koo.LIZ(LiveHostOuterService.LJIILLIIL().LIZLLL());
            koo.LIZ(GL4.LIZ());
            this.LIZ = koo;
        }
    }

    public final List<String> LIZ() {
        return LiveHostOuterService.LJIILLIIL().LIZJ();
    }

    public final Map<String, String> LIZIZ(String str) {
        return 9I4.LIZ(str);
    }

    public final List<String> LIZ(String str) {
        return NetworkUtils.getShareCookie(CookieManager.getInstance(), str);
    }

    public final void LIZ(String str, Context context) {
        C4968Hbt.LIZ().prefetchSchema(str, context);
    }

    public final WebResourceResponse LIZ(WebView webView, String str) {
        LJ();
        return this.LIZ.LIZ(webView, str);
    }

    public final Object LIZ(Context context, Object obj) {
        ILiveHostOuterService LJIILLIIL = LiveHostOuterService.LJIILLIIL();
        if (LJIILLIIL instanceof C4969Hbu) {
            return ((C4969Hbu) LJIILLIIL).LIZ(context, obj);
        }
        return null;
    }

    public final Object LIZ(Object obj, Context context, Object obj2, View view, Object obj3) {
        ILiveHostOuterService LJIILLIIL = LiveHostOuterService.LJIILLIIL();
        if (!(LJIILLIIL instanceof C4969Hbu)) {
            return null;
        }
        return ((C4969Hbu) LJIILLIIL).LIZ(obj, context, obj2, view, obj3);
    }
}
