package com.bytedance.android.livesdk.container.config.base;

import X.0cm;
import X.2HN;
import X.C5165Hf4;
import X.C5166Hf5;
import X.C5181HfK;
import X.C5349Hi2;
import X.JvF;
import X.M12;
import android.net.Uri;
import com.bytedance.android.live.browser.IContainerService;
import com.bytedance.android.livesdk.container.type.HColor;
import com.bytedance.covode.number.Covode;
import java.io.Serializable;
import kotlin.h.b.n;

public abstract class HybridConfig implements Serializable {
    @C5181HfK(LIZ = "container_bg_color")
    public HColor containerBgColor;
    public String containerId;
    @C5181HfK(LIZ = "disable_back_press")
    public boolean disableBackPress;
    @C5181HfK(LIZ = "disable_builtin")
    public boolean disableBuiltin;
    @C5181HfK(LIZ = "disable_offline")
    public boolean disableOffline;
    @C5181HfK(LIZ = "enable_canvas")
    public boolean enableCanvas;
    public C5166Hf5 engineType;
    @C5181HfK(LIZ = "fallback_url")
    public String fallbackUrl;
    @C5181HfK(LIZ = "hide_loading")
    public boolean hideLoading;
    @C5181HfK(LIZ = "initial_data")
    public String initialData;
    @C5181HfK(LIZ = "landscape_screen_size_as_portrait")
    public boolean landscapeAsPortrait;
    @C5181HfK(LIZ = "loading_bg_color")
    public HColor loadingBgColor;
    public String originUri;
    @C5181HfK(LIZ = "url")
    public String url;

    static {
        Covode.recordClassIndex(15508);
    }

    public HybridConfig() {
        this((Uri) null, 1, (2HN) null);
    }

    public final HColor getContainerBgColor() {
        return this.containerBgColor;
    }

    public final String getContainerId() {
        return this.containerId;
    }

    public final boolean getDisableBackPress() {
        return this.disableBackPress;
    }

    public final boolean getDisableBuiltin() {
        return this.disableBuiltin;
    }

    public final boolean getDisableOffline() {
        return this.disableOffline;
    }

    public final boolean getEnableCanvas() {
        return this.enableCanvas;
    }

    public final C5166Hf5 getEngineType() {
        return this.engineType;
    }

    public final String getFallbackUrl() {
        return this.fallbackUrl;
    }

    public final boolean getHideLoading() {
        return this.hideLoading;
    }

    public final String getInitialData() {
        return this.initialData;
    }

    public final boolean getLandscapeAsPortrait() {
        return this.landscapeAsPortrait;
    }

    public final HColor getLoadingBgColor() {
        return this.loadingBgColor;
    }

    public final String getOriginUri() {
        return this.originUri;
    }

    public final String getUrl() {
        return this.url;
    }

    public final void setContainerBgColor(HColor hColor) {
        this.containerBgColor = hColor;
    }

    public final void setDisableBackPress(boolean z) {
        this.disableBackPress = z;
    }

    public final void setDisableBuiltin(boolean z) {
        this.disableBuiltin = z;
    }

    public final void setDisableOffline(boolean z) {
        this.disableOffline = z;
    }

    public final void setEnableCanvas(boolean z) {
        this.enableCanvas = z;
    }

    public final void setHideLoading(boolean z) {
        this.hideLoading = z;
    }

    public final void setLandscapeAsPortrait(boolean z) {
        this.landscapeAsPortrait = z;
    }

    public final void setLoadingBgColor(HColor hColor) {
        this.loadingBgColor = hColor;
    }

    public final void setOriginUri(String str) {
        this.originUri = str;
    }

    public final void setContainerId(String str) {
        M12.LIZ(str);
        this.containerId = str;
    }

    public final void setEngineType(C5166Hf5 hf5) {
        M12.LIZ(hf5);
        this.engineType = hf5;
    }

    public final void setFallbackUrl(String str) {
        M12.LIZ(str);
        this.fallbackUrl = str;
    }

    public final void setInitialData(String str) {
        M12.LIZ(str);
        this.initialData = str;
    }

    public final void setUrl(String str) {
        M12.LIZ(str);
        this.url = str;
    }

    public void checkSchema(Uri uri) {
        C5349Hi2 lynxCustomReport;
        C5349Hi2 webViewCustomReport;
        M12.LIZ(uri);
        if (C5165Hf4.LIZ.contains(uri.getHost())) {
            return;
        }
        if (this.engineType == C5166Hf5.WEB_VIEW) {
            IContainerService LIZ = 0cm.LIZ(IContainerService.class);
            if (LIZ != null && (webViewCustomReport = LIZ.getWebViewCustomReport()) != null) {
                String uri2 = uri.toString();
                n.LIZIZ(uri2, "");
                webViewCustomReport.LIZIZ(uri2);
                return;
            }
            return;
        }
        IContainerService LIZ2 = 0cm.LIZ(IContainerService.class);
        if (LIZ2 != null && (lynxCustomReport = LIZ2.getLynxCustomReport()) != null) {
            String uri3 = uri.toString();
            n.LIZIZ(uri3, "");
            lynxCustomReport.LIZIZ(uri3);
        }
    }

    public HybridConfig(Uri uri) {
        C5166Hf5 hf5;
        C5349Hi2 webViewCustomReport;
        C5349Hi2 lynxCustomReport;
        this.engineType = C5166Hf5.WEB_VIEW;
        this.url = "";
        this.fallbackUrl = "";
        this.initialData = "";
        this.containerId = JvF.LIZJ.LIZ();
        if (uri != null) {
            JvF.LIZJ.LIZ(this.containerId, "open_time", System.currentTimeMillis());
            JvF.LIZJ.LIZ(this.containerId, "container_init_start", System.currentTimeMillis());
            JvF.LIZJ.LIZ(this.containerId, "container_name", "webcast_oversea");
            this.originUri = uri.toString();
            if (C5165Hf4.LIZIZ.contains(uri.getHost())) {
                IContainerService LIZ = 0cm.LIZ(IContainerService.class);
                if (!(LIZ == null || (lynxCustomReport = LIZ.getLynxCustomReport()) == null)) {
                    String uri2 = uri.toString();
                    n.LIZIZ(uri2, "");
                    lynxCustomReport.LIZ(uri2);
                }
                hf5 = C5166Hf5.LYNX;
            } else {
                IContainerService LIZ2 = 0cm.LIZ(IContainerService.class);
                if (!(LIZ2 == null || (webViewCustomReport = LIZ2.getWebViewCustomReport()) == null)) {
                    String uri3 = uri.toString();
                    n.LIZIZ(uri3, "");
                    webViewCustomReport.LIZ(uri3);
                }
                hf5 = C5166Hf5.WEB_VIEW;
            }
            this.engineType = hf5;
            checkSchema(uri);
        }
    }

    /* JADX INFO: this call moved to the top of the method (can break code semantics) */
    public /* synthetic */ HybridConfig(Uri uri, int i, 2HN r4) {
        this((i & 1) != 0 ? null : uri);
    }
}
