package com.bytedance.android.livesdk.broadcast.preview.widget.start_live;

import X.0CB;
import X.0CH;
import X.0Uv;
import X.0Uz;
import X.0Yp;
import X.0Yw;
import X.0aP;
import X.0b0;
import X.0cO;
import X.0cP;
import X.1Lu;
import X.1hK;
import X.1sU;
import X.2FV;
import X.2He;
import X.2Pr;
import X.2fU;
import X.2sR;
import X.3i8;
import X.4r1;
import X.6Is;
import X.7s1;
import X.7vl;
import X.8jA;
import X.BRR;
import X.C1088FvV;
import X.C1313Fz8;
import X.C1338FzX;
import X.C1376G0j;
import X.C1377G0k;
import X.C1393G1a;
import X.C1412G1t;
import X.C1430G2l;
import X.C1629GAc;
import X.C1743GEm;
import X.C1781GFy;
import X.C1785GGc;
import X.C1786GGd;
import X.C1796GGn;
import X.C1856GIv;
import X.C2052GQj;
import X.C2053GQk;
import X.C2437GcA;
import X.C2675Gg0;
import X.C3491GtA;
import X.C3665Gvy;
import X.C4281HEc;
import X.C4320HFp;
import X.C5629HmY;
import X.C5633Hmc;
import X.C6064HtZ;
import X.Crj;
import X.D8b;
import X.DAU;
import X.DBT;
import X.G09;
import X.G10;
import X.G45;
import X.G9Q;
import X.GF2;
import X.GFQ;
import X.GFT;
import X.GG7;
import X.GGG;
import X.GGH;
import X.GGI;
import X.GGJ;
import X.GGK;
import X.GGP;
import X.GGQ;
import X.GGS;
import X.GGT;
import X.GGW;
import X.GGY;
import X.GGZ;
import X.GH0;
import X.GH5;
import X.GH6;
import X.GH7;
import X.GHN;
import X.GI0;
import X.H7X;
import X.HEP;
import X.HEZ;
import X.HG5;
import X.HK3;
import X.K4r;
import X.Ls2;
import X.LsC;
import X.M12;
import X.Mha;
import X.Mjy;
import X.Mk2;
import X.Mk3;
import X.OJw;
import X.ToV;
import android.app.Activity;
import android.app.Dialog;
import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import android.view.View;
import androidx.fragment.app.DialogFragment;
import com.bytedance.android.live.base.model.user.User;
import com.bytedance.android.live.design.app.LiveDialog;
import com.bytedance.android.livesdk.livesetting.broadcast.LiveBroadcastPreviewSetting;
import com.bytedance.android.livesdkapi.depend.model.live.Room;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import com.bytedance.hybrid.spark.SparkContext;
import com.bytedance.ies.sdk.datachannel.DataChannel;
import com.bytedance.ies.sdk.datachannel.DataChannelGlobal;
import com.bytedance.ies.sdk.widgets.LiveWidget;
import java.lang.reflect.Field;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import kotlin.h.b.n;

public final class PreviewStartLiveWidget extends LiveWidget implements C3665Gvy, C5633Hmc, 6Is {
    public static final int LJIIL = 20001;
    public static final C1796GGn LJIILIIL = new C1796GGn((byte) 0);
    public final Crj LIZ = 7vl.LIZ(new GFQ(this));
    public Dialog LIZIZ;
    public Intent LIZJ;
    public 1sU LIZLLL;
    public boolean LJ;
    public boolean LJFF;
    public boolean LJI;
    public final Crj LJII = 7vl.LIZ(GH7.LIZ);
    public final Crj LJIIIIZZ;
    public final Crj LJIIIZ;
    public final Crj LJIIJ;
    public boolean LJIIJJI;
    public final GGT LJIILJJIL = ((GGT) DataChannelGlobal.LIZLLL.LIZIZ(HEZ.class));
    public final GFT LJIILL = ((GFT) DataChannelGlobal.LIZLLL.LIZIZ(C4281HEc.class));
    public Map<String, Boolean> LJIILLIIL = new LinkedHashMap();
    public Mjy LJIIZILJ = new Mjy();
    public final Mha<String> LJIJ;
    public final Mjy LJIJI;
    public final User LJIJJ;
    public final LsC<Boolean, 2Pr> LJIJJLI;
    public final Ls2<C1743GEm> LJIL;

    public final void onStateChanged(0CH r1, 0CB r2) {
        super.onStateChanged(r1, r2);
    }

    public final void LIZ(String str) {
        boolean LIZ2 = G09.LIZ(DataChannelGlobal.LIZLLL);
        0aP.LIZ(4, "PreviewStartLiveWidget", "updateStartLiveButtonEnable(). scene=" + str + ", startLiveAccess=" + this.LJIIJJI + ", isCasting=" + LIZ2);
        if (!this.LJIIJJI || LIZ2) {
            1sU r1 = this.LIZLLL;
            if (r1 == null) {
                n.LIZ("");
            }
            r1.LIZ(2131886850);
            1sU r0 = this.LIZLLL;
            if (r0 == null) {
                n.LIZ("");
            }
            r0.setEnabled(LIZ2);
            return;
        }
        1sU r12 = this.LIZLLL;
        if (r12 == null) {
            n.LIZ("");
        }
        r12.LIZ(2131886849);
        1sU r13 = this.LIZLLL;
        if (r13 == null) {
            n.LIZ("");
        }
        r13.setEnabled(true);
    }

    public final void LIZ(boolean z) {
        DBT unused = C1430G2l.LIZ(this, D8b.INSTANCE, DAU.DEFAULT, new GG7(this, z, (4r1) null));
    }

    /*  JADX ERROR: JadxRuntimeException in pass: IfRegionVisitor
        jadx.core.utils.exceptions.JadxRuntimeException: Don't wrap MOVE or CONST insns: 0x0007: MOVE  (r1v0 android.os.Message) = (r27v0 android.os.Message)
        	at jadx.core.dex.instructions.args.InsnArg.wrapArg(InsnArg.java:164)
        	at jadx.core.dex.visitors.shrink.CodeShrinkVisitor.assignInline(CodeShrinkVisitor.java:133)
        	at jadx.core.dex.visitors.shrink.CodeShrinkVisitor.checkInline(CodeShrinkVisitor.java:118)
        	at jadx.core.dex.visitors.shrink.CodeShrinkVisitor.shrinkBlock(CodeShrinkVisitor.java:65)
        	at jadx.core.dex.visitors.shrink.CodeShrinkVisitor.shrinkMethod(CodeShrinkVisitor.java:43)
        	at jadx.core.dex.visitors.regions.TernaryMod.makeTernaryInsn(TernaryMod.java:122)
        	at jadx.core.dex.visitors.regions.TernaryMod.visitRegion(TernaryMod.java:34)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:73)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterativeStepInternal(DepthRegionTraversal.java:78)
        	at jadx.core.dex.visitors.regions.DepthRegionTraversal.traverseIterative(DepthRegionTraversal.java:27)
        	at jadx.core.dex.visitors.regions.IfRegionVisitor.visit(IfRegionVisitor.java:31)
        */
    /* JADX WARNING: Removed duplicated region for block: B:104:0x0360  */
    /* JADX WARNING: Removed duplicated region for block: B:107:0x036e  */
    /* JADX WARNING: Removed duplicated region for block: B:110:0x0373  */
    /* JADX WARNING: Removed duplicated region for block: B:115:0x037d  */
    /* JADX WARNING: Removed duplicated region for block: B:125:0x03ac  */
    /* JADX WARNING: Removed duplicated region for block: B:128:0x03c1  */
    /* JADX WARNING: Removed duplicated region for block: B:136:0x03da  */
    /* JADX WARNING: Removed duplicated region for block: B:143:0x03fb  */
    /* JADX WARNING: Removed duplicated region for block: B:150:0x042d  */
    /* JADX WARNING: Removed duplicated region for block: B:153:0x0440  */
    /* JADX WARNING: Removed duplicated region for block: B:181:0x0511  */
    /* JADX WARNING: Removed duplicated region for block: B:189:0x053e  */
    /* JADX WARNING: Removed duplicated region for block: B:192:0x0547  */
    /* JADX WARNING: Removed duplicated region for block: B:200:0x0571  */
    /* JADX WARNING: Removed duplicated region for block: B:203:0x057e  */
    /* JADX WARNING: Removed duplicated region for block: B:206:0x0598  */
    /* JADX WARNING: Removed duplicated region for block: B:209:0x05a8  */
    /* JADX WARNING: Removed duplicated region for block: B:219:0x05f0  */
    /* JADX WARNING: Removed duplicated region for block: B:222:0x0610  */
    /* JADX WARNING: Removed duplicated region for block: B:225:0x0620  */
    /* JADX WARNING: Removed duplicated region for block: B:231:0x0680  */
    /* JADX WARNING: Removed duplicated region for block: B:234:0x0693  */
    /* JADX WARNING: Removed duplicated region for block: B:257:0x0762  */
    /* JADX WARNING: Removed duplicated region for block: B:272:0x079a  */
    /* JADX WARNING: Removed duplicated region for block: B:274:0x07a0  */
    /* JADX WARNING: Removed duplicated region for block: B:275:0x07a3  */
    /* JADX WARNING: Removed duplicated region for block: B:276:0x07ac  */
    /* JADX WARNING: Removed duplicated region for block: B:277:0x07af  */
    /* JADX WARNING: Removed duplicated region for block: B:280:0x07ba  */
    /* JADX WARNING: Removed duplicated region for block: B:294:0x07ea  */
    /* JADX WARNING: Removed duplicated region for block: B:295:0x07ed  */
    /* JADX WARNING: Removed duplicated region for block: B:296:0x07f1  */
    /* JADX WARNING: Removed duplicated region for block: B:299:0x07fa  */
    /* JADX WARNING: Removed duplicated region for block: B:300:0x0804  */
    /* JADX WARNING: Removed duplicated region for block: B:301:0x0807  */
    /* JADX WARNING: Removed duplicated region for block: B:302:0x080b  */
    /* JADX WARNING: Removed duplicated region for block: B:318:0x0840  */
    /* JADX WARNING: Removed duplicated region for block: B:319:0x0843  */
    /* JADX WARNING: Removed duplicated region for block: B:335:0x0881  */
    /* JADX WARNING: Removed duplicated region for block: B:349:0x08be  */
    public final void handleMsg(android.os.Message r27) {
        /*
            r26 = this;
            r4 = r26
            boolean r0 = r4.isViewValid
            if (r0 != 0) goto L_0x0007
            return
        L_0x0007:
            r1 = r27
            if (r1 != 0) goto L_0x000c
            return
        L_0x000c:
            java.lang.Object r0 = r1.obj
            boolean r0 = r0 instanceof java.lang.Exception
            r7 = 3
            java.lang.String r21 = "ttlive_open_room"
            r2 = 2131830608(0x7f112750, float:1.9294218E38)
            r11 = 1
            r9 = 0
            java.lang.String r8 = ""
            if (r0 == 0) goto L_0x0218
            java.lang.Object r3 = r1.obj
            java.lang.String r0 = "null cannot be cast to non-null type kotlin.Exception /* = java.lang.Exception */"
            java.util.Objects.requireNonNull(r3, r0)
            java.lang.Exception r3 = (java.lang.Exception) r3
            X.0cO r0 = X.0cO.CreateLive
            X.0cP.LIZ(r0)
            r5 = 3000(0xbb8, float:4.204E-42)
            int r0 = r1.what
            if (r0 != r11) goto L_0x007c
            android.app.Dialog r0 = r4.LIZIZ
            if (r0 == 0) goto L_0x0037
            X.C1430G2l.LIZIZ((android.app.Dialog) r0)
        L_0x0037:
            boolean r0 = r3 instanceof X.1JF
            if (r0 == 0) goto L_0x0211
            r5 = r3
            X.1JF r5 = (X.1JF) r5
            int r0 = r5.getErrorCode()
            switch(r0) {
                case 2403: goto L_0x01e1;
                case 10018: goto L_0x0190;
                case 30005: goto L_0x0153;
                case 30010: goto L_0x004a;
                case 30011: goto L_0x0128;
                case 4002044: goto L_0x00d8;
                case 4003088: goto L_0x00c2;
                case 4003089: goto L_0x00ad;
                case 4003100: goto L_0x0091;
                case 4003101: goto L_0x008a;
                default: goto L_0x0045;
            }
        L_0x0045:
            android.content.Context r0 = r4.context
            X.G0S.LIZ((android.content.Context) r0, (java.lang.Throwable) r3, (int) r2)
        L_0x004a:
            int r5 = r5.getErrorCode()
        L_0x004e:
            X.GQk r1 = X.C2053GQk.LJIIIZ
            X.GIv r0 = r26.LIZ()
            r1.LIZ((X.C1856GIv) r0)
            X.GGO r0 = new X.GGO
            r0.<init>(r3)
            r1.LIZ((X.LsC<? super X.C2052GQj, X.2Pr>) r0)
            X.GQk r1 = X.C2053GQk.LJIIIZ
            X.GIv r0 = r26.LIZ()
            r1.LIZIZ(r0)
            X.GHN r1 = X.GHN.LJIILJJIL
            X.GIv r0 = r26.LIZ()
            r1.LIZ(r3, r0)
            X.0V0 r1 = X.0V1.LIZ
            r0 = r21
            X.GHw r0 = r1.LIZ(r0, r3)
            r0.LIZ()
        L_0x007c:
            com.bytedance.android.live.broadcast.api.IBroadcastService r0 = X.GI0.LJIIJJI()
            X.GNS r1 = r0.startLiveManager()
            com.bytedance.ies.sdk.datachannel.DataChannel r0 = r4.dataChannel
            r1.LIZIZ(r5, r0)
            return
        L_0x008a:
            r0 = 4003101(0x3d151d, float:5.609539E-39)
            r4.LIZ((int) r0, (java.lang.String) r8)     // Catch:{ all -> 0x004a }
            goto L_0x004a
        L_0x0091:
            org.json.JSONObject r1 = new org.json.JSONObject     // Catch:{ all -> 0x004a }
            r0 = r3
            X.1JF r0 = (X.1JF) r0     // Catch:{ all -> 0x004a }
            java.lang.String r0 = r0.getExtra()     // Catch:{ all -> 0x004a }
            r1.<init>(r0)     // Catch:{ all -> 0x004a }
            java.lang.String r0 = "decision_conf"
            java.lang.String r1 = r1.optString(r0)     // Catch:{ all -> 0x004a }
            kotlin.h.b.n.LIZIZ(r1, r8)     // Catch:{ all -> 0x004a }
            r0 = 4003100(0x3d151c, float:5.609538E-39)
            r4.LIZ((int) r0, (java.lang.String) r1)     // Catch:{ all -> 0x004a }
            goto L_0x004a
        L_0x00ad:
            android.content.Context r0 = r4.context
            X.1hK r6 = X.C1430G2l.LIZ((android.content.Context) r0)
            if (r6 == 0) goto L_0x004a
            X.G9p r2 = X.C1616G9p.LIZ
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r4.dataChannel
            kotlin.h.b.n.LIZIZ(r1, r8)
            X.Ls2<X.GEm> r0 = r4.LJIL
            r2.LIZ((android.app.Activity) r6, (int) r7, (com.bytedance.ies.sdk.datachannel.DataChannel) r1, (X.Ls2<? extends X.C1743GEm>) r0)
            goto L_0x004a
        L_0x00c2:
            android.content.Context r0 = r4.context
            X.1hK r6 = X.C1430G2l.LIZ((android.content.Context) r0)
            if (r6 == 0) goto L_0x004a
            X.G9p r2 = X.C1616G9p.LIZ
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r4.dataChannel
            kotlin.h.b.n.LIZIZ(r1, r8)
            X.Ls2<X.GEm> r0 = r4.LJIL
            r2.LIZ((android.app.Activity) r6, (int) r11, (com.bytedance.ies.sdk.datachannel.DataChannel) r1, (X.Ls2<? extends X.C1743GEm>) r0)
            goto L_0x004a
        L_0x00d8:
            X.Mha<java.lang.String> r1 = r4.LJIJ
            java.lang.String r0 = r5.getPrompt()
            r1.onNext(r0)
            X.GtO r1 = X.C3491GtA.LJFF
            java.lang.String r0 = "livesdk_violation_toast"
            X.GtA r2 = r1.LIZ(r0)
            com.bytedance.ies.sdk.datachannel.DataChannel r0 = r4.dataChannel
            r2.LIZ((com.bytedance.ies.sdk.datachannel.DataChannel) r0)
            X.H7d r0 = X.C4100H7d.LIZ()
            X.Glh r0 = r0.LIZIZ()
            if (r0 == 0) goto L_0x0126
            X.0Uo r0 = r0.LIZ()
            if (r0 == 0) goto L_0x0126
            long r0 = r0.getId()
            java.lang.Long r1 = java.lang.Long.valueOf(r0)
        L_0x0106:
            java.lang.String r0 = "violation_anchor_id"
            r2.LIZ((java.lang.String) r0, (java.lang.Number) r1)
            r1 = 4002044(0x3d10fc, float:5.608058E-39)
            java.lang.String r0 = "violation_type"
            r2.LIZ((java.lang.String) r0, (int) r1)
            java.lang.String r1 = "user_type"
            java.lang.String r0 = "anchor"
            r2.LIZ((java.lang.String) r1, (java.lang.String) r0)
            java.lang.String r1 = "scene_type"
            java.lang.String r0 = "start_live"
            r2.LIZ((java.lang.String) r1, (java.lang.String) r0)
            r2.LIZLLL()
            goto L_0x004a
        L_0x0126:
            r1 = 0
            goto L_0x0106
        L_0x0128:
            X.HK2 r2 = new X.HK2
            android.content.Context r0 = r4.context
            r2.<init>(r0)
            r2.LJIIIZ = r11
            r0 = 2131834221(0x7f11356d, float:1.9301546E38)
            r2.LIZIZ(r0)
            X.GCm r1 = new X.GCm
            r1.<init>(r4)
            r0 = 2131833722(0x7f11337a, float:1.9300534E38)
            r2.LIZ((int) r0, (android.content.DialogInterface.OnClickListener) r1, (boolean) r9)
            X.GGh r1 = X.C1790GGh.LIZ
            r0 = 2131833716(0x7f113374, float:1.9300522E38)
            r2.LIZIZ((int) r0, (android.content.DialogInterface.OnClickListener) r1, (boolean) r9)
            X.HK3 r0 = r2.LIZ()
            LIZ((X.HK3) r0)
            goto L_0x004a
        L_0x0153:
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r4.dataChannel
            java.lang.String r0 = "show"
            X.0Vh.LIZ(r0, r1)
            X.HK2 r2 = new X.HK2
            android.content.Context r0 = r26.getContext()
            r2.<init>(r0)
            r0 = 2131829188(0x7f1121c4, float:1.9291338E38)
            r2.LIZ((int) r0)
            r0 = 2131829189(0x7f1121c5, float:1.929134E38)
            r2.LIZIZ(r0)
            X.GFS r1 = new X.GFS
            r1.<init>(r4)
            r0 = 2131828641(0x7f111fa1, float:1.9290229E38)
            r2.LIZ((int) r0, (android.content.DialogInterface.OnClickListener) r1, (boolean) r9)
            X.GFR r1 = new X.GFR
            r1.<init>(r4)
            r0 = 2131830102(0x7f112556, float:1.9293192E38)
            r2.LIZIZ((int) r0, (android.content.DialogInterface.OnClickListener) r1, (boolean) r9)
            r2.LJIIIZ = r9
            X.HK3 r0 = r2.LIZ()
            LIZ((X.HK3) r0)
            goto L_0x004a
        L_0x0190:
            android.content.Context r6 = r4.context
            X.GbG r0 = r4.widgetCallback
            kotlin.h.b.n.LIZIZ(r0, r8)
            androidx.fragment.app.Fragment r2 = r0.getFragment()
            com.bytedance.ies.sdk.datachannel.DataChannel r7 = r4.dataChannel
            if (r6 == 0) goto L_0x004a
            if (r2 == 0) goto L_0x004a
            X.GAb r0 = X.GD1.LIZIZ
            X.GD1 r1 = r0.LIZ()
            java.lang.Class<com.bytedance.android.livesdk.api.BanUserInfoApi> r0 = com.bytedance.android.livesdk.api.BanUserInfoApi.class
            java.lang.Object r1 = r1.LIZ(r0)
            com.bytedance.android.livesdk.api.BanUserInfoApi r1 = (com.bytedance.android.livesdk.api.BanUserInfoApi) r1
            r0 = 2
            X.PgU r1 = r1.getBanUserInfo(r0)
            X.SRf r0 = X.SRf.DESTROY
            X.PjC r0 = X.Pm5.LIZ(r2, r0)
            X.PgU r1 = r1.LIZ(r0)
            X.PlG r0 = X.PlI.LIZJ
            X.PlG r0 = X.PhE.LIZIZ(r0)
            X.PgU r1 = r1.LIZIZ(r0)
            X.PlG r0 = X.Mk3.LIZ
            X.PlG r0 = X.Mk2.LIZ(r0)
            X.PgU r2 = r1.LIZ(r0)
            X.1JX r1 = new X.1JX
            r1.<init>(r6, r7)
            X.1JY r0 = new X.1JY
            r0.<init>(r6)
            r2.LIZ(r1, r0)
            goto L_0x004a
        L_0x01e1:
            android.content.Context r6 = r4.context
            if (r6 == 0) goto L_0x004a
            X.HK2 r2 = new X.HK2
            r2.<init>(r6)
            r0 = 2131829422(0x7f1122ae, float:1.9291813E38)
            r2.LIZIZ(r0)
            android.content.DialogInterface$OnClickListener r1 = X.C1797GGo.LIZ
            r0 = 2131834223(0x7f11356f, float:1.930155E38)
            r2.LIZIZ((int) r0, (android.content.DialogInterface.OnClickListener) r1, (boolean) r9)
            X.GA4 r1 = new X.GA4
            r1.<init>(r6)
            r0 = 2131833834(0x7f1133ea, float:1.9300761E38)
            r2.LIZ((int) r0, (android.content.DialogInterface.OnClickListener) r1, (boolean) r9)
            X.HK3 r1 = r2.LIZ()
            r1.show()
            X.2fU r0 = X.2fU.LIZ
            r0.LIZ(r1)
            goto L_0x004a
        L_0x0211:
            android.content.Context r0 = r4.context
            X.G0S.LIZ((android.content.Context) r0, (java.lang.Throwable) r3, (int) r2)
            goto L_0x004e
        L_0x0218:
            int r0 = r1.what
            if (r0 == r11) goto L_0x021d
        L_0x021c:
            return
        L_0x021d:
            java.lang.Object r5 = r1.obj
            boolean r0 = r5 instanceof com.bytedance.android.livesdkapi.depend.model.live.Room
            if (r0 != 0) goto L_0x0224
            r5 = 0
        L_0x0224:
            com.bytedance.android.livesdkapi.depend.model.live.Room r5 = (com.bytedance.android.livesdkapi.depend.model.live.Room) r5
            boolean r0 = com.bytedance.android.livesdkapi.depend.model.live.Room.isValid(r5)
            if (r0 == 0) goto L_0x0238
            X.GIv r1 = r26.LIZ()
            if (r5 == 0) goto L_0x028f
            X.GIv r0 = r5.getStreamType()
        L_0x0236:
            if (r1 == r0) goto L_0x0291
        L_0x0238:
            android.app.Dialog r0 = r4.LIZIZ
            if (r0 == 0) goto L_0x023f
            X.C1430G2l.LIZIZ((android.app.Dialog) r0)
        L_0x023f:
            java.lang.IllegalStateException r3 = new java.lang.IllegalStateException
            java.lang.String r0 = "invalid room"
            r3.<init>(r0)
            android.content.Context r0 = r4.context
            X.G0S.LIZ((android.content.Context) r0, (java.lang.Throwable) r3, (int) r2)
            X.GHN r2 = X.GHN.LJIILJJIL
            r1 = r3
            X.GIv r0 = r26.LIZ()
            r2.LIZ(r1, r0)
            X.GQk r1 = X.C2053GQk.LJIIIZ
            X.GIv r0 = r26.LIZ()
            r1.LIZ((X.C1856GIv) r0)
            X.GGN r0 = new X.GGN
            r0.<init>(r3)
            r1.LIZ((X.LsC<? super X.C2052GQj, X.2Pr>) r0)
            X.GQk r1 = X.C2053GQk.LJIIIZ
            X.GIv r0 = r26.LIZ()
            r1.LIZIZ(r0)
            X.0cO r0 = X.0cO.CreateLive
            X.0cP.LIZ(r0)
            X.0V0 r1 = X.0V1.LIZ
            r0 = r21
            X.GHw r0 = r1.LIZ(r0, r3)
            r0.LIZ()
            com.bytedance.android.live.broadcast.api.IBroadcastService r0 = X.GI0.LJIIJJI()
            X.GNS r2 = r0.startLiveManager()
            r1 = 3001(0xbb9, float:4.205E-42)
            com.bytedance.ies.sdk.datachannel.DataChannel r0 = r4.dataChannel
            r2.LIZIZ(r1, r0)
            return
        L_0x028f:
            r0 = 0
            goto L_0x0236
        L_0x0291:
            com.bytedance.ies.sdk.datachannel.DataChannelGlobal r1 = com.bytedance.ies.sdk.datachannel.DataChannelGlobal.LIZLLL
            java.lang.Class<X.HEF> r0 = X.HEF.class
            r1.LIZJ(r0)
            boolean r0 = r4.isViewValid
            if (r0 == 0) goto L_0x02a3
            android.app.Dialog r0 = r4.LIZIZ
            if (r0 == 0) goto L_0x02a3
            X.C1430G2l.LIZIZ((android.app.Dialog) r0)
        L_0x02a3:
            X.0V2 r1 = X.0V3.LIZ
            java.lang.String r0 = "ttlive_create_room_success_all"
            X.GHw r6 = r1.LIZ(r0)
            long r2 = java.lang.System.currentTimeMillis()
            long r0 = X.GHN.LIZ
            long r2 = r2 - r0
            java.lang.Long r1 = java.lang.Long.valueOf(r2)
            java.lang.String r0 = "duration"
            r6.LIZIZ((java.lang.String) r0, (java.lang.Long) r1)
            X.0V4.LIZIZ(r6)
            r6.LIZ()
            long r0 = java.lang.System.currentTimeMillis()
            X.GHN.LIZ = r0
            long r0 = java.lang.System.currentTimeMillis()
            X.GHN.LIZLLL = r0
            long r0 = r5.getId()
            X.GIv r10 = r26.LIZ()
            com.bytedance.ies.sdk.datachannel.DataChannel r3 = r4.dataChannel
            if (r3 == 0) goto L_0x02e6
            java.lang.Class<X.Fvf> r2 = X.C1098Fvf.class
            java.lang.Object r2 = r3.LIZIZ(r2)
            java.lang.Integer r2 = (java.lang.Integer) r2
            if (r2 == 0) goto L_0x02e6
            r2.intValue()
        L_0x02e6:
            com.bytedance.ies.sdk.datachannel.DataChannel r3 = r4.dataChannel
            if (r3 == 0) goto L_0x02ef
            java.lang.Class<X.G0k> r2 = X.C1377G0k.class
            r3.LIZIZ(r2)
        L_0x02ef:
            com.bytedance.ies.sdk.datachannel.DataChannel r3 = r4.dataChannel
            com.bytedance.ies.sdk.datachannel.DataChannel r4 = r4.dataChannel
            if (r4 == 0) goto L_0x08bb
            java.lang.Class<X.Fvf> r2 = X.C1098Fvf.class
            java.lang.Object r6 = r4.LIZIZ(r2)
            java.lang.Integer r6 = (java.lang.Integer) r6
        L_0x02fd:
            com.bytedance.android.livesdkapi.depend.model.live.StreamUrl r7 = r5.getStreamUrl()
            kotlin.h.b.n.LIZIZ(r7, r8)
            java.lang.String r2 = "vCodec"
            java.lang.Object r4 = r7.LIZ((java.lang.String) r2)
            if (r4 != 0) goto L_0x08b1
            r24 = r8
        L_0x030e:
            X.M12.LIZ(r10)
            android.content.Context r4 = X.0b0.LJ()
            if (r4 == 0) goto L_0x0326
            android.content.Context r7 = X.0b0.LJ()
            java.lang.String r4 = "broadcast_storage"
            android.content.SharedPreferences r7 = X.8uQ.LIZ(r7, r4, r9)
            java.lang.String r4 = "saved_last_gift_feature"
            r7.getBoolean(r4, r11)
        L_0x0326:
            com.bytedance.ies.sdk.datachannel.DataChannelGlobal r7 = com.bytedance.ies.sdk.datachannel.DataChannelGlobal.LIZLLL
            java.lang.Class<X.HEc> r4 = X.C4281HEc.class
            java.lang.Object r11 = r7.LIZIZ(r4)
            X.GFT r11 = (X.GFT) r11
            if (r3 == 0) goto L_0x08ad
            java.lang.Class<X.G0j> r4 = X.C1376G0j.class
            java.lang.Object r7 = r3.LIZIZ(r4)
            X.GIv r7 = (X.C1856GIv) r7
            if (r7 == 0) goto L_0x08ad
            boolean r4 = X.C1393G1a.LIZIZ(r7)
            if (r4 == 0) goto L_0x0887
            if (r11 == 0) goto L_0x08ad
            boolean r4 = r11.LIZ
            java.lang.Boolean r4 = java.lang.Boolean.valueOf(r4)
        L_0x034a:
            if (r4 == 0) goto L_0x08ad
            boolean r23 = r4.booleanValue()
        L_0x0350:
            com.bytedance.android.livesdk.livesetting.game.GameLiveBroadcastSpeedDetectionSwitcherSetting r4 = com.bytedance.android.livesdk.livesetting.game.GameLiveBroadcastSpeedDetectionSwitcherSetting.INSTANCE
            boolean r4 = r4.isEnable()
            if (r4 == 0) goto L_0x0884
            boolean r4 = X.GBO.LIZ(r3)
            if (r4 == 0) goto L_0x0884
            if (r3 == 0) goto L_0x0881
            java.lang.Class<X.FxG> r4 = X.C1197FxG.class
            java.lang.Object r4 = r3.LIZIZ(r4)
            java.lang.String r4 = (java.lang.String) r4
        L_0x0368:
            boolean r4 = X.C1430G2l.LIZ((java.lang.CharSequence) r4)
            if (r4 == 0) goto L_0x0884
            r4 = 1
        L_0x036f:
            java.lang.String r12 = "default"
            if (r4 == 0) goto L_0x0843
            java.lang.String r11 = "manual_speedtest"
        L_0x0375:
            X.GIv r4 = X.C1856GIv.SCREEN_RECORD
            if (r10 == r4) goto L_0x037d
            X.GIv r4 = X.C1856GIv.THIRD_PARTY
            if (r10 != r4) goto L_0x0840
        L_0x037d:
            r7 = 1
        L_0x037e:
            X.G06 r4 = X.G06.LIZJ
            com.bytedance.android.livesdk.model.GameTag r4 = r4.LIZIZ()
            if (r4 == 0) goto L_0x0390
            java.lang.String r4 = r4.showName
            if (r4 == 0) goto L_0x0390
            int r4 = r4.length()
            if (r4 != 0) goto L_0x080e
        L_0x0390:
            java.lang.String r4 = "null"
            X.Cwu r7 = X.CwZ.LIZ(r4, r8)
        L_0x0396:
            java.lang.Object r22 = r7.getFirst()
            r4 = r22
            java.lang.String r4 = (java.lang.String) r4
            r22 = r4
            java.lang.Object r17 = r7.getSecond()
            r4 = r17
            java.lang.String r4 = (java.lang.String) r4
            r17 = r4
            if (r3 == 0) goto L_0x080b
            java.lang.Class<X.Fv1> r4 = X.C1058Fv1.class
            java.lang.Object r7 = r3.LIZIZ(r4)
        L_0x03b2:
            r4 = 1
            java.lang.Boolean r4 = java.lang.Boolean.valueOf(r4)
            boolean r4 = kotlin.h.b.n.LIZ(r7, r4)
            java.lang.String r20 = "1"
            java.lang.String r19 = "0"
            if (r4 == 0) goto L_0x0807
            r25 = r20
        L_0x03c3:
            com.bytedance.ies.sdk.datachannel.DataChannelGlobal r7 = com.bytedance.ies.sdk.datachannel.DataChannelGlobal.LIZLLL
            java.lang.Class<X.HFx> r4 = X.C4328HFx.class
            java.lang.Object r4 = r7.LIZIZ(r4)
            X.0Yu r4 = (X.0Yu) r4
            if (r4 == 0) goto L_0x03d3
            java.lang.String r13 = r4.LIZJ
            if (r13 != 0) goto L_0x03d4
        L_0x03d3:
            r13 = r8
        L_0x03d4:
            boolean r4 = X.C1393G1a.LIZIZ(r10)
            if (r4 != 0) goto L_0x07f8
            if (r3 == 0) goto L_0x07f5
            java.lang.Class<X.G1g> r4 = X.C1399G1g.class
            java.lang.Object r7 = r3.LIZIZ(r4)
        L_0x03e2:
            r4 = 1
            java.lang.Boolean r4 = java.lang.Boolean.valueOf(r4)
            boolean r4 = kotlin.h.b.n.LIZ(r7, r4)
            if (r4 == 0) goto L_0x07f8
            java.lang.String r4 = "screen_shot"
        L_0x03ef:
            com.bytedance.ies.sdk.datachannel.DataChannelGlobal r9 = com.bytedance.ies.sdk.datachannel.DataChannelGlobal.LIZLLL
            java.lang.Class<X.HED> r7 = X.HED.class
            java.lang.Object r7 = r9.LIZIZ(r7)
            java.lang.Integer r7 = (java.lang.Integer) r7
            if (r7 == 0) goto L_0x07f1
            int r16 = r7.intValue()
        L_0x03ff:
            X.GtO r9 = X.C3491GtA.LJFF
            java.lang.String r7 = "live_take"
            X.GtA r9 = r9.LIZ(r7)
            r9.LIZ((com.bytedance.ies.sdk.datachannel.DataChannel) r3)
            r9.LIZJ((java.lang.String) r7)
            java.lang.String r18 = "click"
            r14 = r9
            r15 = r18
            r14.LIZLLL(r15)
            java.lang.String r14 = "live_take_page"
            r9.LJ(r14)
            X.GGC.LIZ((X.C3491GtA) r9, (com.bytedance.ies.sdk.datachannel.DataChannel) r3)
            if (r6 == 0) goto L_0x07ed
            int r15 = r6.intValue()
            r14 = 1
            if (r15 == r14) goto L_0x042d
            int r14 = r6.intValue()
            r6 = 3
            if (r14 != r6) goto L_0x07ed
        L_0x042d:
            java.lang.String r14 = "open"
        L_0x042f:
            java.lang.String r6 = "send_gift_type"
            r9.LIZ((java.lang.String) r6, (java.lang.String) r14)
            com.bytedance.ies.sdk.datachannel.DataChannelGlobal r14 = com.bytedance.ies.sdk.datachannel.DataChannelGlobal.LIZLLL
            java.lang.Class<X.HEM> r6 = X.HEM.class
            java.lang.Object r14 = r14.LIZIZ(r6)
            java.lang.String r14 = (java.lang.String) r14
            if (r3 == 0) goto L_0x07ea
            java.lang.Class<X.HFi> r6 = X.C4313HFi.class
            java.lang.Object r6 = r3.LIZIZ(r6)
            java.lang.String r6 = (java.lang.String) r6
        L_0x0448:
            java.lang.String r14 = X.0Vh.LIZ(r14, r6)
            java.lang.String r6 = "enter_from"
            r9.LIZ((java.lang.String) r6, (java.lang.String) r14)
            java.lang.String r6 = "room_id"
            r9.LIZ((java.lang.String) r6, (long) r0)
            java.lang.String r0 = X.C1393G1a.LIZ(r10)
            java.lang.String r6 = "live_type"
            r9.LIZ((java.lang.String) r6, (java.lang.String) r0)
            java.lang.String r0 = "cover_type"
            r9.LIZ((java.lang.String) r0, (java.lang.String) r4)
            if (r3 == 0) goto L_0x0470
            java.lang.Class<X.G1t> r0 = X.C1412G1t.class
            java.lang.Object r4 = r3.LIZIZ(r0)
            java.lang.String r4 = (java.lang.String) r4
            if (r4 != 0) goto L_0x0473
        L_0x0470:
            r4 = r8
            if (r3 == 0) goto L_0x0481
        L_0x0473:
            java.lang.Class<X.G0k> r0 = X.C1377G0k.class
            java.lang.Object r0 = r3.LIZIZ(r0)
            X.0Yw r0 = (X.0Yw) r0
            if (r0 == 0) goto L_0x0481
            java.lang.String r1 = r0.LIZLLL
            if (r1 != 0) goto L_0x0482
        L_0x0481:
            r1 = r8
        L_0x0482:
            int r0 = r4.length()
            if (r0 != 0) goto L_0x07cc
            int r0 = r1.length()
            if (r0 != 0) goto L_0x07cc
        L_0x048e:
            java.lang.String r0 = "title_type"
            r9.LIZ((java.lang.String) r0, (java.lang.String) r12)
            java.lang.String r1 = r10.logStreamingType
            java.lang.String r0 = "streaming_type"
            r9.LIZ((java.lang.String) r0, (java.lang.String) r1)
            X.2sR<java.lang.Integer> r0 = X.C1781GFy.LJIJI
            kotlin.h.b.n.LIZIZ(r0, r8)
            java.lang.Object r0 = r0.LIZ()
            java.lang.Integer r0 = (java.lang.Integer) r0
            if (r0 != 0) goto L_0x07c2
        L_0x04a7:
            r1 = r20
        L_0x04a9:
            java.lang.String r0 = "is_filter"
            r9.LIZ((java.lang.String) r0, (java.lang.String) r1)
            java.lang.String r1 = "is_pc_guidance"
            r0 = r20
            r9.LIZ((java.lang.String) r1, (java.lang.String) r0)
            X.2sR<java.lang.Float> r0 = X.C1781GFy.LJIL
            kotlin.h.b.n.LIZIZ(r0, r8)
            java.lang.Object r0 = r0.LIZ()
            java.lang.Float r0 = (java.lang.Float) r0
            r1 = 0
            boolean r0 = kotlin.h.b.n.LIZ(r0, r1)
            if (r0 == 0) goto L_0x07be
            X.2sR<java.lang.Float> r0 = X.C1781GFy.LJJ
            kotlin.h.b.n.LIZIZ(r0, r8)
            java.lang.Object r0 = r0.LIZ()
            java.lang.Float r0 = (java.lang.Float) r0
            boolean r0 = kotlin.h.b.n.LIZ(r0, r1)
            if (r0 == 0) goto L_0x07be
            X.2sR<java.lang.Float> r0 = X.C1781GFy.LJJI
            kotlin.h.b.n.LIZIZ(r0, r8)
            java.lang.Object r0 = r0.LIZ()
            java.lang.Float r0 = (java.lang.Float) r0
            boolean r0 = kotlin.h.b.n.LIZ(r0, r1)
            if (r0 == 0) goto L_0x07be
            r0 = r19
        L_0x04eb:
            java.lang.String r4 = "is_beauty"
            r9.LIZ((java.lang.String) r4, (java.lang.String) r0)
            java.lang.String r0 = "definition_type"
            r9.LIZ((java.lang.String) r0, (java.lang.String) r11)
            java.lang.String r0 = "take_definition"
            r9.LIZ((java.lang.String) r0, (java.lang.String) r13)
            java.lang.String r1 = "game_label"
            r0 = r22
            r9.LIZ((java.lang.String) r1, (java.lang.String) r0)
            java.lang.String r1 = "game_label_id"
            r0 = r17
            r9.LIZ((java.lang.String) r1, (java.lang.String) r0)
            java.lang.String r1 = "comment_type"
            r0 = r25
            r9.LIZ((java.lang.String) r1, (java.lang.String) r0)
            if (r23 == 0) goto L_0x07ba
            java.lang.String r1 = "temp"
        L_0x0513:
            java.lang.String r0 = "take_type"
            r9.LIZ((java.lang.String) r0, (java.lang.String) r1)
            java.lang.String r1 = "is_promote"
            java.lang.String r0 = "param_broadcast_preview_promote_bool"
            r9.LIZ((java.lang.String) r1, (java.lang.String) r0)
            r0 = r24
            r9.LIZ((java.lang.String) r2, (java.lang.String) r0)
            if (r3 == 0) goto L_0x0543
            java.lang.Class<X.HG3> r0 = X.HG3.class
            java.lang.Object r0 = r3.LIZIZ(r0)
            if (r0 == 0) goto L_0x0543
            if (r0 != r10) goto L_0x0543
            java.lang.Class<X.HG4> r0 = X.HG4.class
            java.lang.Object r1 = r3.LIZIZ(r0)
            java.lang.String r1 = (java.lang.String) r1
            boolean r0 = android.text.TextUtils.isEmpty(r1)
            if (r0 != 0) goto L_0x0543
            java.lang.String r0 = "convert_from"
            r9.LIZ((java.lang.String) r0, (java.lang.String) r1)
        L_0x0543:
            X.GIv r0 = X.C1856GIv.SCREEN_RECORD
            if (r10 != r0) goto L_0x0561
            if (r3 == 0) goto L_0x07b7
            java.lang.Class<X.FvV> r0 = X.C1088FvV.class
            java.lang.Object r1 = r3.LIZIZ(r0)
        L_0x054f:
            r0 = 1
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0)
            boolean r0 = kotlin.h.b.n.LIZ(r1, r0)
            if (r0 == 0) goto L_0x07b3
            java.lang.String r1 = "landscape"
        L_0x055c:
            java.lang.String r0 = "live_orientation"
            r9.LIZ((java.lang.String) r0, (java.lang.String) r1)
        L_0x0561:
            X.0ew r1 = X.C1773GFq.LJ()
            java.lang.String r0 = X.0fH.LIZIZ
            java.util.List r2 = r1.LIZIZ(r0)
            int r0 = r2.size()
            if (r0 <= 0) goto L_0x07af
            r1 = r20
        L_0x0573:
            java.lang.String r0 = "is_sticker"
            r9.LIZ((java.lang.String) r0, (java.lang.String) r1)
            int r0 = r2.size()
            if (r0 <= 0) goto L_0x07ac
            r0 = 0
            java.lang.Object r0 = r2.get(r0)
            com.bytedance.android.livesdkapi.depend.model.LiveEffect r0 = (com.bytedance.android.livesdkapi.depend.model.LiveEffect) r0
            long r0 = r0.LIZ
            java.lang.String r1 = java.lang.String.valueOf(r0)
        L_0x058b:
            java.lang.String r0 = "sticker_id"
            r9.LIZ((java.lang.String) r0, (java.lang.String) r1)
            com.bytedance.android.livesdk.livesetting.gift.LiveAnchorGiftDisableSetting r0 = com.bytedance.android.livesdk.livesetting.gift.LiveAnchorGiftDisableSetting.INSTANCE
            boolean r0 = r0.getValue()
            if (r0 == 0) goto L_0x059f
            java.lang.String r1 = "status_type"
            java.lang.String r0 = "special"
            r9.LIZ((java.lang.String) r1, (java.lang.String) r0)
        L_0x059f:
            boolean r1 = com.bytedance.android.live.base.model.user.User.sSubPermission
            java.lang.String r3 = "is_sub_only"
            r0 = -1
            java.lang.String r2 = "is_opt_in"
            if (r1 == 0) goto L_0x07a3
            r1 = -2
            r0 = r16
            if (r0 == r1) goto L_0x05b2
            r0 = r16
            r9.LIZ((java.lang.String) r2, (int) r0)
        L_0x05b2:
            X.2sR<java.lang.Boolean> r0 = X.C1781GFy.LJJLIIIIJ
            kotlin.h.b.n.LIZIZ(r0, r8)
            java.lang.Object r0 = r0.LIZ()
            kotlin.h.b.n.LIZIZ(r0, r8)
            java.lang.Boolean r0 = (java.lang.Boolean) r0
            boolean r0 = r0.booleanValue()
            r9.LIZ((java.lang.String) r3, (int) r0)
        L_0x05c7:
            java.lang.Class<X.GGp> r1 = X.C1798GGp.class
            X.M12.LIZ(r1)
            java.util.Map<java.lang.Class<?>, X.GGj<?>> r0 = X.C1799GGq.LIZ
            java.lang.Object r0 = r0.get(r1)
            java.lang.Object r0 = r1.cast(r0)
            X.GGj r0 = (X.C1792GGj) r0
            if (r0 == 0) goto L_0x0607
            T r12 = r0.LIZ
            com.bytedance.android.livesdkapi.model.LatestLiveData r12 = (com.bytedance.android.livesdkapi.model.LatestLiveData) r12
            if (r12 == 0) goto L_0x0607
            long r2 = java.lang.System.currentTimeMillis()
            long r0 = r12.getLatestLeaveTime()
            long r2 = r2 - r0
            r10 = 600000(0x927c0, double:2.964394E-318)
            int r0 = (r2 > r10 ? 1 : (r2 == r10 ? 0 : -1))
            if (r0 >= 0) goto L_0x0607
            long r0 = r12.getLatestRoomId()
            java.lang.String r10 = "latest_watch_room_id"
            r9.LIZ((java.lang.String) r10, (long) r0)
            java.lang.String r0 = "latest_room_duration"
            r9.LIZ((java.lang.String) r0, (long) r2)
            long r0 = r12.getLatestDuration()
            java.lang.String r2 = "latest_live_duration"
            r9.LIZ((java.lang.String) r2, (long) r0)
        L_0x0607:
            r9.LIZLLL()
            r2 = r26
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r2.dataChannel
            if (r1 == 0) goto L_0x07a0
            java.lang.Class<X.G1t> r0 = X.C1412G1t.class
            java.lang.Object r0 = r1.LIZIZ(r0)
            java.lang.String r0 = (java.lang.String) r0
        L_0x0618:
            boolean r0 = android.text.TextUtils.isEmpty(r0)
            java.lang.String r12 = "video_live"
            if (r0 != 0) goto L_0x0652
            boolean r10 = r5.isLiveTypeAudio()
            X.GIv r0 = r26.LIZ()
            java.lang.String r9 = r0.logStreamingType
            kotlin.h.b.n.LIZIZ(r9, r8)
            com.bytedance.ies.sdk.datachannel.DataChannel r3 = r2.dataChannel
            X.M12.LIZ(r9)
            X.GtO r1 = X.C3491GtA.LJFF
            java.lang.String r0 = "pm_live_take_title_write"
            X.GtA r1 = r1.LIZ(r0)
            r1.LIZ((com.bytedance.ies.sdk.datachannel.DataChannel) r3)
            java.lang.String r0 = "other"
            r1.LIZLLL(r0)
            r1.LIZJ((java.lang.String) r7)
            X.GGC.LIZ((X.C3491GtA) r1, (java.lang.String) r9)
            if (r10 == 0) goto L_0x079d
            java.lang.String r0 = "audio_live"
        L_0x064c:
            r1.LIZIZ((java.lang.String) r0)
            r1.LIZLLL()
        L_0x0652:
            X.1Mr r3 = X.C1773GFq.LJFF()
            long r0 = r5.getId()
            r3.LIZ(r0)
            X.GHN r1 = X.GHN.LJIILJJIL
            X.GIv r0 = r26.LIZ()
            r1.LIZIZ(r0)
            X.GQk r1 = X.C2053GQk.LJIIIZ
            X.GIv r0 = r26.LIZ()
            r1.LIZ((X.C1856GIv) r0)
            X.GGa r0 = X.C1783GGa.LIZ
            r1.LIZ((X.LsC<? super X.C2052GQj, X.2Pr>) r0)
            boolean r17 = r5.isLiveTypeAudio()
            X.GIv r9 = r26.LIZ()
            com.bytedance.android.live.base.model.user.User r0 = r2.LJIJJ
            if (r0 == 0) goto L_0x079a
            long r0 = r0.getId()
            java.lang.Long r0 = java.lang.Long.valueOf(r0)
        L_0x0688:
            java.lang.String r11 = java.lang.String.valueOf(r0)
            com.bytedance.ies.sdk.datachannel.DataChannel r13 = r2.dataChannel
            X.M12.LIZ(r11)
            if (r9 == 0) goto L_0x075a
            X.2sR<java.lang.Float> r0 = X.C1781GFy.LJIJJLI
            kotlin.h.b.n.LIZIZ(r0, r8)
            java.lang.Object r0 = r0.LIZ()
            java.lang.Number r0 = (java.lang.Number) r0
            float r16 = r0.floatValue()
            r1 = 1120403456(0x42c80000, float:100.0)
            float r16 = r16 * r1
            X.2sR<java.lang.Float> r0 = X.C1781GFy.LJIL
            kotlin.h.b.n.LIZIZ(r0, r8)
            java.lang.Object r0 = r0.LIZ()
            java.lang.Number r0 = (java.lang.Number) r0
            float r15 = r0.floatValue()
            float r15 = r15 * r1
            X.2sR<java.lang.Float> r0 = X.C1781GFy.LJJ
            kotlin.h.b.n.LIZIZ(r0, r8)
            java.lang.Object r0 = r0.LIZ()
            java.lang.Number r0 = (java.lang.Number) r0
            float r14 = r0.floatValue()
            float r14 = r14 * r1
            X.2sR<java.lang.Float> r0 = X.C1781GFy.LJJI
            kotlin.h.b.n.LIZIZ(r0, r8)
            java.lang.Object r0 = r0.LIZ()
            java.lang.Number r0 = (java.lang.Number) r0
            float r10 = r0.floatValue()
            float r10 = r10 * r1
            X.GtO r1 = X.C3491GtA.LJFF
            java.lang.String r0 = "pm_live_take_edit_features"
            X.GtA r3 = r1.LIZ(r0)
            r3.LIZ((com.bytedance.ies.sdk.datachannel.DataChannel) r13)
            r3.LIZJ((java.lang.String) r7)
            r0 = r18
            r3.LIZLLL(r0)
            if (r17 == 0) goto L_0x06ed
            java.lang.String r12 = "audio_live"
        L_0x06ed:
            r3.LIZ((java.lang.String) r6, (java.lang.String) r12)
            java.lang.String r0 = r9.logStreamingType
            kotlin.h.b.n.LIZIZ(r0, r8)
            X.GGC.LIZ((X.C3491GtA) r3, (java.lang.String) r0)
            java.lang.String r0 = "anchor_id"
            r3.LIZ((java.lang.String) r0, (java.lang.String) r11)
            int r1 = X.0Vh.LIZ(r9)
            r0 = -1
            if (r1 != r0) goto L_0x0796
            r1 = r19
        L_0x0706:
            java.lang.String r0 = "is_tag"
            r3.LIZ((java.lang.String) r0, (java.lang.String) r1)
            boolean r0 = X.C1393G1a.LIZJ(r9)
            if (r0 == 0) goto L_0x0783
        L_0x0711:
            r20 = r19
        L_0x0713:
            r0 = r20
            r3.LIZ((java.lang.String) r4, (java.lang.String) r0)
            boolean r0 = X.C1393G1a.LIZJ(r9)
            if (r0 == 0) goto L_0x077e
            r1 = r19
        L_0x0720:
            java.lang.String r0 = "beauty_white"
            r3.LIZ((java.lang.String) r0, (java.lang.String) r1)
            boolean r0 = X.C1393G1a.LIZJ(r9)
            if (r0 == 0) goto L_0x0779
            r1 = r19
        L_0x072d:
            java.lang.String r0 = "beauty_skin"
            r3.LIZ((java.lang.String) r0, (java.lang.String) r1)
            boolean r0 = X.C1393G1a.LIZJ(r9)
            if (r0 == 0) goto L_0x0774
            r1 = r19
        L_0x073a:
            java.lang.String r0 = "beauty_bigeye"
            r3.LIZ((java.lang.String) r0, (java.lang.String) r1)
            boolean r0 = X.C1393G1a.LIZJ(r9)
            if (r0 == 0) goto L_0x076f
        L_0x0745:
            java.lang.String r1 = "beauty_facethin"
            r0 = r19
            r3.LIZ((java.lang.String) r1, (java.lang.String) r0)
            r3.LIZLLL()
            X.0V2 r1 = X.0V3.LIZ
            r0 = r21
            X.GHw r0 = r1.LIZIZ(r0)
            r0.LIZ()
        L_0x075a:
            X.GJH r0 = X.GJH.LiveResource
            boolean r0 = r0.isInstalled()
            if (r0 != 0) goto L_0x08be
            X.GJH r3 = X.GJH.LiveResource
            android.content.Context r1 = r2.context
            X.GHt r0 = new X.GHt
            r0.<init>(r2, r5)
            r3.checkInstall(r1, r0)
            return
        L_0x076f:
            java.lang.String r19 = java.lang.String.valueOf(r10)
            goto L_0x0745
        L_0x0774:
            java.lang.String r1 = java.lang.String.valueOf(r14)
            goto L_0x073a
        L_0x0779:
            java.lang.String r1 = java.lang.String.valueOf(r15)
            goto L_0x072d
        L_0x077e:
            java.lang.String r1 = java.lang.String.valueOf(r16)
            goto L_0x0720
        L_0x0783:
            r1 = 0
            int r0 = (r16 > r1 ? 1 : (r16 == r1 ? 0 : -1))
            if (r0 != 0) goto L_0x0713
            int r0 = (r15 > r1 ? 1 : (r15 == r1 ? 0 : -1))
            if (r0 != 0) goto L_0x0713
            int r0 = (r14 > r1 ? 1 : (r14 == r1 ? 0 : -1))
            if (r0 != 0) goto L_0x0713
            int r0 = (r10 > r1 ? 1 : (r10 == r1 ? 0 : -1))
            if (r0 != 0) goto L_0x0713
            goto L_0x0711
        L_0x0796:
            r1 = r20
            goto L_0x0706
        L_0x079a:
            r0 = 0
            goto L_0x0688
        L_0x079d:
            r0 = r12
            goto L_0x064c
        L_0x07a0:
            r0 = 0
            goto L_0x0618
        L_0x07a3:
            r9.LIZ((java.lang.String) r2, (int) r0)
            r0 = 0
            r9.LIZ((java.lang.String) r3, (int) r0)
            goto L_0x05c7
        L_0x07ac:
            r1 = r8
            goto L_0x058b
        L_0x07af:
            r1 = r19
            goto L_0x0573
        L_0x07b3:
            java.lang.String r1 = "portrait"
            goto L_0x055c
        L_0x07b7:
            r1 = 0
            goto L_0x054f
        L_0x07ba:
            java.lang.String r1 = "perm"
            goto L_0x0513
        L_0x07be:
            r0 = r20
            goto L_0x04eb
        L_0x07c2:
            int r0 = r0.intValue()
            if (r0 != 0) goto L_0x04a7
            r1 = r19
            goto L_0x04a9
        L_0x07cc:
            int r0 = r4.length()
            if (r0 != 0) goto L_0x07dc
            int r0 = r1.length()
            if (r0 <= 0) goto L_0x07dc
            java.lang.String r12 = "none"
            goto L_0x048e
        L_0x07dc:
            boolean r0 = kotlin.h.b.n.LIZ(r4, r1)
            if (r0 == 0) goto L_0x07e6
            java.lang.String r12 = "last_title"
            goto L_0x048e
        L_0x07e6:
            java.lang.String r12 = "new_title"
            goto L_0x048e
        L_0x07ea:
            r6 = 0
            goto L_0x0448
        L_0x07ed:
            java.lang.String r14 = "close"
            goto L_0x042f
        L_0x07f1:
            r16 = -2
            goto L_0x03ff
        L_0x07f5:
            r7 = 0
            goto L_0x03e2
        L_0x07f8:
            if (r3 == 0) goto L_0x0804
            java.lang.Class<X.HFo> r4 = X.C4319HFo.class
            java.lang.Object r4 = r3.LIZIZ(r4)
            java.lang.String r4 = (java.lang.String) r4
            goto L_0x03ef
        L_0x0804:
            r4 = 0
            goto L_0x03ef
        L_0x0807:
            r25 = r19
            goto L_0x03c3
        L_0x080b:
            r7 = 0
            goto L_0x03b2
        L_0x080e:
            if (r7 == 0) goto L_0x0390
            boolean r4 = X.G09.LIZJ(r3)
            if (r4 != 0) goto L_0x0818
            goto L_0x0390
        L_0x0818:
            X.G06 r4 = X.G06.LIZJ
            com.bytedance.android.livesdk.model.GameTag r4 = r4.LIZIZ()
            if (r4 == 0) goto L_0x083a
            java.lang.String r7 = r4.showName
            if (r7 != 0) goto L_0x0825
            r7 = r8
        L_0x0825:
            java.lang.Long r4 = r4.id
            if (r4 == 0) goto L_0x0833
            long r13 = r4.longValue()
            java.lang.String r4 = java.lang.String.valueOf(r13)
            if (r4 != 0) goto L_0x0834
        L_0x0833:
            r4 = r8
        L_0x0834:
            X.Cwu r7 = X.CwZ.LIZ(r7, r4)
            goto L_0x0396
        L_0x083a:
            X.Cwu r7 = X.CwZ.LIZ(r8, r8)
            goto L_0x0396
        L_0x0840:
            r7 = 0
            goto L_0x037e
        L_0x0843:
            com.bytedance.android.livesdk.livesetting.game.GameLiveBroadcastSpeedDetectionSwitcherSetting r4 = com.bytedance.android.livesdk.livesetting.game.GameLiveBroadcastSpeedDetectionSwitcherSetting.INSTANCE
            boolean r4 = r4.isEnable()
            if (r4 == 0) goto L_0x0867
            boolean r4 = X.GBO.LIZ(r3)
            if (r4 == 0) goto L_0x0867
            if (r3 == 0) goto L_0x0865
            java.lang.Class<X.FxF> r4 = X.C1196FxF.class
            java.lang.Object r4 = r3.LIZIZ(r4)
            java.lang.String r4 = (java.lang.String) r4
        L_0x085b:
            boolean r4 = X.C1430G2l.LIZ((java.lang.CharSequence) r4)
            if (r4 == 0) goto L_0x0867
            java.lang.String r11 = "auto_speedtest"
            goto L_0x0375
        L_0x0865:
            r4 = 0
            goto L_0x085b
        L_0x0867:
            X.2sR<java.util.Map<java.lang.String, java.lang.String>> r4 = X.C1781GFy.LLLII
            kotlin.h.b.n.LIZIZ(r4, r8)
            java.lang.Object r4 = r4.LIZ()
            java.util.Map r4 = (java.util.Map) r4
            if (r4 == 0) goto L_0x087a
            boolean r4 = r4.isEmpty()
            if (r4 == 0) goto L_0x087d
        L_0x087a:
            r11 = r12
            goto L_0x0375
        L_0x087d:
            java.lang.String r11 = "selected"
            goto L_0x0375
        L_0x0881:
            r4 = 0
            goto L_0x0368
        L_0x0884:
            r4 = 0
            goto L_0x036f
        L_0x0887:
            boolean r4 = X.C1393G1a.LJ(r7)
            if (r4 == 0) goto L_0x0897
            if (r11 == 0) goto L_0x08ad
            boolean r4 = r11.LIZIZ
            java.lang.Boolean r4 = java.lang.Boolean.valueOf(r4)
            goto L_0x034a
        L_0x0897:
            boolean r4 = X.C1393G1a.LIZLLL(r7)
            if (r4 == 0) goto L_0x08a7
            if (r11 == 0) goto L_0x08ad
            boolean r4 = r11.LIZJ
            java.lang.Boolean r4 = java.lang.Boolean.valueOf(r4)
            goto L_0x034a
        L_0x08a7:
            java.lang.Boolean r4 = java.lang.Boolean.valueOf(r9)
            goto L_0x034a
        L_0x08ad:
            r23 = 0
            goto L_0x0350
        L_0x08b1:
            java.lang.Object r4 = r7.LIZ((java.lang.String) r2)
            java.lang.String r24 = java.lang.String.valueOf(r4)
            goto L_0x030e
        L_0x08bb:
            r6 = 0
            goto L_0x02fd
        L_0x08be:
            r2.LIZ((com.bytedance.android.livesdkapi.depend.model.live.Room) r5)
            goto L_0x021c
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.livesdk.broadcast.preview.widget.start_live.PreviewStartLiveWidget.handleMsg(android.os.Message):void");
    }

    public final void LIZ(Room room) {
        0Yw r0;
        String str;
        try {
            if (this.LJI) {
                C3491GtA LIZ2 = C3491GtA.LJFF.LIZ("livesdk_live_phone_verify_success_live");
                LIZ2.LIZ(this.dataChannel);
                DataChannel dataChannel = this.dataChannel;
                if (dataChannel == null || (str = (String) dataChannel.LIZIZ(C1412G1t.class)) == null) {
                    str = "";
                }
                LIZ2.LIZ("room_title", str);
                LIZ2.LIZ("room_id", room.getId());
                LIZ2.LIZLLL();
            }
            2sR<Integer> r1 = C1781GFy.LLJZ;
            n.LIZIZ(r1, "");
            r1.LIZ(-1);
            GI0.LJIILJJIL().getLiveFilterManager().LIZIZ();
            ToV.LJ.LJIIIIZZ();
            int i = 1;
            this.LJIJJLI.invoke(true);
            0cP.LIZIZ(0cO.CreateLive);
            int i2 = GGW.LIZJ[LIZ().ordinal()];
            if (i2 != 1) {
                i = i2 != 2 ? i2 != 3 ? 0 : 3 : 2;
            }
            Intent createStartBroadcastIntent = GI0.LJFF().createStartBroadcastIntent(C1430G2l.LIZ(this.context), i);
            if (C1393G1a.LIZLLL(LIZ()) || C1393G1a.LJ(LIZ())) {
                2sR<Boolean> r12 = C1781GFy.LJJIIJZLJL;
                n.LIZIZ(r12, "");
                r12.LIZ(false);
            }
            G9Q g9q = G9Q.LIZ;
            DataChannel dataChannel2 = this.dataChannel;
            n.LIZIZ(dataChannel2, "");
            g9q.LIZ(g9q.LIZ(dataChannel2) ? SystemClock.elapsedRealtime() : -1);
            DataChannel dataChannel3 = this.dataChannel;
            String str2 = null;
            createStartBroadcastIntent.putExtra("live.intent.extra.LIVE_PC_TIPS", (dataChannel3 == null || (r0 = (0Yw) dataChannel3.LIZIZ(C1377G0k.class)) == null) ? null : r0.LJIIIIZZ);
            GH0 gh0 = GF2.LIZ;
            Context context = this.context;
            String name = LIZ().name();
            User user = this.LJIJJ;
            if (user != null) {
                str2 = user.getIdStr();
            }
            gh0.LIZ(context, name, str2);
            n.LIZIZ(createStartBroadcastIntent, "");
            LIZ(createStartBroadcastIntent);
            createStartBroadcastIntent.putExtra("request_page", (String) this.dataChannel.LIZIZ(C4320HFp.class));
            Context context2 = this.context;
            if (context2 != null) {
                LIZ(context2, createStartBroadcastIntent);
            }
            DataChannelGlobal.LIZLLL.LIZ(HEP.class, room);
            GI0.LIZLLL().LIZ().LIZ();
            1hK LIZ3 = C1430G2l.LIZ(this.context);
            if (LIZ3 != null) {
                LIZ3.finish();
            }
            1hK LIZ4 = C1430G2l.LIZ(this.context);
            if (LIZ4 != null) {
                LIZ4.overridePendingTransition(0, 0);
            }
            GI0.LJIIJJI().startLiveManager().onStartLive();
            0Uz.LIZ("start_broadcast_page", String.valueOf(System.currentTimeMillis()));
        } catch (Exception e) {
            0aP.LIZ(e.getMessage());
        }
    }

    public final int getLayoutId() {
        if (LiveBroadcastPreviewSetting.INSTANCE.enableV1Style()) {
            return 2131562236;
        }
        return 2131562235;
    }

    static {
        Covode.recordClassIndex(12526);
    }

    private final String LJFF() {
        Object LIZIZ2 = this.dataChannel.LIZIZ(C1376G0j.class);
        if (LIZIZ2 == null) {
            n.LIZIZ();
        }
        String modeFromServer = ((C1856GIv) LIZIZ2).getModeFromServer();
        n.LIZIZ(modeFromServer, "");
        return modeFromServer;
    }

    public final boolean LIZLLL() {
        Boolean bool;
        DataChannel dataChannel = this.dataChannel;
        if (dataChannel == null || (bool = (Boolean) dataChannel.LIZIZ(G10.class)) == null) {
            return false;
        }
        return bool.booleanValue();
    }

    public final void LJ() {
        C1313Fz8.LIZ(0b0.LJ(), 0b0.LIZ(2131834219), 0);
        LIZ(105);
    }

    public final void onDestroy() {
        super.onDestroy();
        C5629HmY.LIZIZ("ttlive_apply_success", (C5633Hmc) this);
        if (C1629GAc.LIZ != null) {
            C1629GAc.LIZ = null;
        }
        if (C1629GAc.LIZIZ != null) {
            C1629GAc.LIZIZ = null;
        }
        this.LJIJI.LIZ();
        this.LJIIZILJ.dispose();
    }

    public final boolean LIZJ() {
        Map map;
        0Yp r0;
        DataChannel dataChannel = this.dataChannel;
        if (dataChannel == null || (map = (Map) dataChannel.LIZIZ(G45.class)) == null || (r0 = (0Yp) map.get(LJFF())) == null || r0.LJII != 2) {
            return false;
        }
        return true;
    }

    public final void onCreate() {
        super.onCreate();
        View view = getView();
        if (!(view instanceof 1sU)) {
            view = null;
        }
        1sU r1 = (1sU) view;
        if (r1 != null) {
            this.LIZLLL = r1;
            this.LJIJI.LIZ(C2675Gg0.LIZ().LIZ(0Uv.class).LIZLLL(new C1785GGc(this)));
            View view2 = getView();
            if (view2 != null) {
                C1430G2l.LIZ(view2, 500, (LsC<? super View, 2Pr>) new GGY(this));
            }
            DataChannel dataChannel = this.dataChannel;
            if (dataChannel != null) {
                dataChannel.LIZIZ((0CH) this, C1338FzX.class, new GGJ(this));
                dataChannel.LIZIZ((0CH) this, C1376G0j.class, new GGK(this));
                dataChannel.LIZIZ((0CH) this, G45.class, new GGG(this));
                dataChannel.LIZIZ((0CH) this, G10.class, new GGH(this));
                dataChannel.LIZIZ((0CH) this, C2437GcA.class, new GGP(this));
            }
            DataChannelGlobal.LIZLLL.LIZIZ(this, HG5.class, new GGZ(this));
            C5629HmY.LIZ("ttlive_apply_success", (C5633Hmc) this);
            this.LJIIZILJ.LIZ(this.LJIJ.LJFF(5000, TimeUnit.MILLISECONDS).LIZ(Mk2.LIZ(Mk3.LIZ)).LIZLLL(new GGS(this)));
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:3:0x000c, code lost:
        if (r0 == null) goto L_0x000e;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final X.C1856GIv LIZ() {
        /*
            r2 = this;
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r2.dataChannel
            if (r1 == 0) goto L_0x0012
            java.lang.Class<X.G0j> r0 = X.C1376G0j.class
            java.lang.Object r0 = r1.LIZIZ(r0)
            X.GIv r0 = (X.C1856GIv) r0
            if (r0 != 0) goto L_0x0011
        L_0x000e:
            kotlin.h.b.n.LIZIZ()
        L_0x0011:
            return r0
        L_0x0012:
            r0 = 0
            goto L_0x000e
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.livesdk.broadcast.preview.widget.start_live.PreviewStartLiveWidget.LIZ():X.GIv");
    }

    /* JADX WARNING: Code restructure failed: missing block: B:36:0x007e, code lost:
        if (X.C1430G2l.LIZ(r2) != false) goto L_0x00c6;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:47:0x00a1, code lost:
        if (X.C1430G2l.LIZ(r2) != false) goto L_0x00c6;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:58:0x00c4, code lost:
        if (X.C1430G2l.LIZ(r2) != false) goto L_0x00c6;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:60:0x00d6, code lost:
        if (X.C1430G2l.LIZJ(r6.LJIILLIIL.get(LJFF())) == false) goto L_0x005c;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:61:0x00d8, code lost:
        r1 = r6.dataChannel;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:62:0x00da, code lost:
        if (r1 == null) goto L_0x00f6;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:63:0x00dc, code lost:
        r1 = (java.util.Map) r1.LIZIZ(X.G45.class);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:64:0x00e4, code lost:
        if (r1 == null) goto L_0x00f6;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:65:0x00e6, code lost:
        r0 = (X.0Yp) r1.get(LJFF());
     */
    /* JADX WARNING: Code restructure failed: missing block: B:66:0x00f0, code lost:
        if (r0 == null) goto L_0x00f6;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:68:0x00f4, code lost:
        if (r0.LJII == 1) goto L_0x005c;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:69:0x00f6, code lost:
        r3 = X.0bI.LIZIZ(r6.context);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:70:0x00fc, code lost:
        if (r3 == null) goto L_0x010f;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:71:0x00fe, code lost:
        r2 = X.C1629GAc.LIZJ;
        r1 = r6.dataChannel;
        kotlin.h.b.n.LIZIZ(r1, "");
        r0 = LJFF();
        kotlin.h.b.n.LIZIZ(r3, "");
        r2.LIZ(r1, r0, r3);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:72:0x010f, code lost:
        r2 = r6.dataChannel;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:73:0x0111, code lost:
        if (r2 == null) goto L_0x011c;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:74:0x0113, code lost:
        X.C1629GAc.LIZJ.LIZ(r2, LJFF());
     */
    /* JADX WARNING: Code restructure failed: missing block: B:75:0x011c, code lost:
        X.0Vh.LIZ(r6.dataChannel, true);
     */
    /* JADX WARNING: Code restructure failed: missing block: B:76:0x0121, code lost:
        return;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LIZIZ() {
        /*
            r6 = this;
            com.bytedance.ies.sdk.datachannel.DataChannelGlobal r0 = com.bytedance.ies.sdk.datachannel.DataChannelGlobal.LIZLLL
            boolean r0 = X.G09.LIZ((com.bytedance.ies.sdk.datachannel.DataChannelGlobal) r0)
            if (r0 == 0) goto L_0x0013
            android.content.Context r1 = X.0b0.LJ()
            r0 = 2131828792(0x7f112038, float:1.9290535E38)
            X.C1313Fz8.LIZ((android.content.Context) r1, (int) r0)
            return
        L_0x0013:
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r6.dataChannel
            if (r1 == 0) goto L_0x001c
            java.lang.Class<X.Gd1> r0 = X.C2490Gd1.class
            r1.LIZJ(r0)
        L_0x001c:
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r6.dataChannel
            r2 = 0
            if (r1 == 0) goto L_0x0044
            java.lang.Class<X.FzX> r0 = X.C1338FzX.class
            java.lang.Object r0 = r1.LIZIZ(r0)
        L_0x0027:
            java.lang.String r5 = ""
            if (r0 == 0) goto L_0x0046
            X.1sU r1 = r6.LIZLLL
            if (r1 != 0) goto L_0x0032
            kotlin.h.b.n.LIZ(r5)
        L_0x0032:
            r0 = 2131886850(0x7f120302, float:1.940829E38)
            r1.LIZ(r0)
            com.bytedance.ies.sdk.datachannel.DataChannel r2 = r6.dataChannel
            if (r2 == 0) goto L_0x0043
            java.lang.Class<X.Gc5> r1 = X.C2432Gc5.class
            X.G40 r0 = X.G40.NORMAL_BLOCK
            r2.LIZJ(r1, r0)
        L_0x0043:
            return
        L_0x0044:
            r0 = r2
            goto L_0x0027
        L_0x0046:
            X.GIv r0 = r6.LIZ()
            int[] r1 = X.GGW.LIZ
            int r0 = r0.ordinal()
            r1 = r1[r0]
            r0 = 0
            r4 = 1
            if (r1 == r4) goto L_0x0083
            r0 = 2
            if (r1 == r0) goto L_0x00a6
            r0 = 3
            if (r1 == r0) goto L_0x0060
        L_0x005c:
            r6.LIZ((boolean) r4)
            return
        L_0x0060:
            X.GGT r0 = r6.LJIILJJIL
            if (r0 == 0) goto L_0x0081
            boolean r0 = r0.LIZJ
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0)
        L_0x006a:
            boolean r0 = X.C1430G2l.LIZJ((java.lang.Boolean) r0)
            if (r0 == 0) goto L_0x005c
            X.GFT r0 = r6.LJIILL
            if (r0 == 0) goto L_0x007a
            boolean r0 = r0.LIZJ
            java.lang.Boolean r2 = java.lang.Boolean.valueOf(r0)
        L_0x007a:
            boolean r0 = X.C1430G2l.LIZ((java.lang.Boolean) r2)
            if (r0 == 0) goto L_0x005c
            goto L_0x00c6
        L_0x0081:
            r0 = r2
            goto L_0x006a
        L_0x0083:
            X.GGT r0 = r6.LJIILJJIL
            if (r0 == 0) goto L_0x00a4
            boolean r0 = r0.LIZ
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0)
        L_0x008d:
            boolean r0 = X.C1430G2l.LIZJ((java.lang.Boolean) r0)
            if (r0 == 0) goto L_0x005c
            X.GFT r0 = r6.LJIILL
            if (r0 == 0) goto L_0x009d
            boolean r0 = r0.LIZ
            java.lang.Boolean r2 = java.lang.Boolean.valueOf(r0)
        L_0x009d:
            boolean r0 = X.C1430G2l.LIZ((java.lang.Boolean) r2)
            if (r0 == 0) goto L_0x005c
            goto L_0x00c6
        L_0x00a4:
            r0 = r2
            goto L_0x008d
        L_0x00a6:
            X.GGT r0 = r6.LJIILJJIL
            if (r0 == 0) goto L_0x0122
            boolean r0 = r0.LIZIZ
            java.lang.Boolean r0 = java.lang.Boolean.valueOf(r0)
        L_0x00b0:
            boolean r0 = X.C1430G2l.LIZJ((java.lang.Boolean) r0)
            if (r0 == 0) goto L_0x005c
            X.GFT r0 = r6.LJIILL
            if (r0 == 0) goto L_0x00c0
            boolean r0 = r0.LIZIZ
            java.lang.Boolean r2 = java.lang.Boolean.valueOf(r0)
        L_0x00c0:
            boolean r0 = X.C1430G2l.LIZ((java.lang.Boolean) r2)
            if (r0 == 0) goto L_0x005c
        L_0x00c6:
            java.util.Map<java.lang.String, java.lang.Boolean> r1 = r6.LJIILLIIL
            java.lang.String r0 = r6.LJFF()
            java.lang.Object r0 = r1.get(r0)
            java.lang.Boolean r0 = (java.lang.Boolean) r0
            boolean r0 = X.C1430G2l.LIZJ((java.lang.Boolean) r0)
            if (r0 == 0) goto L_0x005c
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r6.dataChannel
            if (r1 == 0) goto L_0x00f6
            java.lang.Class<X.G45> r0 = X.G45.class
            java.lang.Object r1 = r1.LIZIZ(r0)
            java.util.Map r1 = (java.util.Map) r1
            if (r1 == 0) goto L_0x00f6
            java.lang.String r0 = r6.LJFF()
            java.lang.Object r0 = r1.get(r0)
            X.0Yp r0 = (X.0Yp) r0
            if (r0 == 0) goto L_0x00f6
            int r0 = r0.LJII
            if (r0 == r4) goto L_0x005c
        L_0x00f6:
            android.content.Context r0 = r6.context
            X.1hK r3 = X.0bI.LIZIZ(r0)
            if (r3 == 0) goto L_0x010f
            X.GAc r2 = X.C1629GAc.LIZJ
            com.bytedance.ies.sdk.datachannel.DataChannel r1 = r6.dataChannel
            kotlin.h.b.n.LIZIZ(r1, r5)
            java.lang.String r0 = r6.LJFF()
            kotlin.h.b.n.LIZIZ(r3, r5)
            r2.LIZ((com.bytedance.ies.sdk.datachannel.DataChannel) r1, (java.lang.String) r0, (X.1hK) r3)
        L_0x010f:
            com.bytedance.ies.sdk.datachannel.DataChannel r2 = r6.dataChannel
            if (r2 == 0) goto L_0x011c
            X.GAc r1 = X.C1629GAc.LIZJ
            java.lang.String r0 = r6.LJFF()
            r1.LIZ(r2, r0)
        L_0x011c:
            com.bytedance.ies.sdk.datachannel.DataChannel r0 = r6.dataChannel
            X.0Vh.LIZ(r0, r4)
            return
        L_0x0122:
            r0 = r2
            goto L_0x00b0
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.livesdk.broadcast.preview.widget.start_live.PreviewStartLiveWidget.LIZIZ():void");
    }

    public static final /* synthetic */ 1sU LIZ(PreviewStartLiveWidget previewStartLiveWidget) {
        1sU r1 = previewStartLiveWidget.LIZLLL;
        if (r1 == null) {
            n.LIZ("");
        }
        return r1;
    }

    public static void LIZ(HK3 hk3) {
        hk3.show();
        2fU.LIZ.LIZ(hk3);
    }

    private final void LIZ(Intent intent) {
        Boolean bool;
        if (C1393G1a.LJ(LIZ())) {
            intent.putExtra("hotsoon.intent.extra.PROJECTION_INTENT", this.LIZJ);
            DataChannel dataChannel = this.dataChannel;
            if (dataChannel != null) {
                bool = (Boolean) dataChannel.LIZIZ(C1088FvV.class);
            } else {
                bool = null;
            }
            intent.putExtra("hotsoon.intent.extra.IS_LANDSCAPE", bool);
        }
    }

    public final void LIZIZ(String str) {
        String str2;
        C3491GtA LIZ2 = C3491GtA.LJFF.LIZ("livesdk_live_phone_verify_exit");
        LIZ2.LIZ(this.dataChannel);
        DataChannel dataChannel = this.dataChannel;
        if (dataChannel == null || (str2 = (String) dataChannel.LIZIZ(C1412G1t.class)) == null) {
            str2 = "";
        }
        LIZ2.LIZ("room_title", str2);
        LIZ2.LIZ("exit_type", str);
        LIZ2.LIZLLL();
    }

    public final void LIZJ(String str) {
        String str2;
        C3491GtA LIZ2 = C3491GtA.LJFF.LIZ("livesdk_live_phone_verify_success");
        LIZ2.LIZ(this.dataChannel);
        DataChannel dataChannel = this.dataChannel;
        if (dataChannel == null || (str2 = (String) dataChannel.LIZIZ(C1412G1t.class)) == null) {
            str2 = "";
        }
        LIZ2.LIZ("room_title", str2);
        LIZ2.LIZ("verify_type", str);
        LIZ2.LIZLLL();
    }

    public final void LIZ(int i) {
        GHN ghn = GHN.LJIILJJIL;
        C1856GIv LIZ2 = LIZ();
        M12.LIZ(LIZ2);
        C3491GtA LIZ3 = C3491GtA.LJFF.LIZ("livesdk_create_room");
        LIZ3.LIZ();
        LIZ3.LIZ("live_type", LIZ2.logStreamingType);
        LIZ3.LIZ("error_type", 1);
        int i2 = i;
        LIZ3.LIZ("error_code", i2);
        LIZ3.LIZ("error_code_1", 0);
        LIZ3.LIZ("error_msg", "");
        LIZ3.LIZ("duration", 0);
        LIZ3.LIZLLL();
        ghn.LIZ(1, i2, 0, "", LIZ2);
        GI0.LJIIJJI().startLiveManager().LIZ(i2, this.dataChannel);
        C2053GQk.LJIIIZ.LIZ((LsC<? super C2052GQj, 2Pr>) new GGQ(i2));
        C2053GQk.LJIIIZ.LIZIZ(LIZ());
    }

    public final void LIZ(BRR brr) {
        String str;
        C1856GIv gIv;
        C6064HtZ LIZ2;
        M12.LIZ(brr);
        if (n.LIZ(brr.LIZ, "ttlive_apply_success")) {
            K4r k4r = brr.LIZIZ;
            String str2 = null;
            if (k4r != null) {
                str = k4r.LJFF("status");
            } else {
                str = null;
            }
            if (n.LIZ(str, "success")) {
                K4r k4r2 = brr.LIZIZ;
                if (k4r2 != null) {
                    this.LJIILLIIL.put(k4r2.LJFF("mode"), true);
                    DialogFragment dialogFragment = C1629GAc.LIZ;
                    if (dialogFragment != null) {
                        dialogFragment.dismissAllowingStateLoss();
                    }
                    SparkContext sparkContext = C1629GAc.LIZIZ;
                    if (!(sparkContext == null || (LIZ2 = sparkContext.LIZ()) == null)) {
                        LIZ2.LIZJ();
                    }
                    C1313Fz8.LIZ((Activity) C1430G2l.LIZ(this.context), (CharSequence) 0b0.LIZ(2131829204));
                    C3491GtA LIZ3 = C3491GtA.LJFF.LIZ("livesdk_anchor_live_access_apply_success");
                    LIZ3.LIZ(this.dataChannel);
                    DataChannel dataChannel = this.dataChannel;
                    if (!(dataChannel == null || (gIv = (C1856GIv) dataChannel.LIZIZ(C1376G0j.class)) == null)) {
                        str2 = C1393G1a.LIZ(gIv);
                    }
                    LIZ3.LIZ("live_type", str2);
                    LIZ3.LIZLLL();
                    return;
                }
                return;
            }
            K4r k4r3 = brr.LIZIZ;
            if (k4r3 != null) {
                str2 = k4r3.LJFF("status");
            }
            if (n.LIZ(str2, "hit-risk")) {
                C1313Fz8.LIZ(0b0.LJ(), 0b0.LIZ(2131829199), 0);
            }
        }
    }

    public static void LIZ(Context context, Intent intent) {
        3i8.LIZ(intent, context);
        context.startActivity(intent);
    }

    public static Object LIZ(Context context, String str) {
        Object obj;
        MethodCollector.i(10619);
        if (Build.VERSION.SDK_INT > 27 || !"clipboard".equals(str)) {
            if (!2FV.LIZIZ && "connectivity".equals(str)) {
                try {
                    new 7s1().LIZ();
                    2FV.LIZIZ = true;
                    obj = context.getSystemService(str);
                } catch (Throwable unused) {
                }
            }
            obj = context.getSystemService(str);
        } else if (2FV.LIZ) {
            synchronized (ClipboardManager.class) {
                try {
                    obj = context.getSystemService(str);
                    if (Thread.currentThread() != Looper.getMainLooper().getThread()) {
                        Field declaredField = ClipboardManager.class.getDeclaredField("mHandler");
                        declaredField.setAccessible(true);
                        declaredField.set(obj, new 2He((Handler) declaredField.get(obj)));
                    }
                } catch (Exception e) {
                    8jA.LIZ(e, "ClipboardManager Handler Reflect Fail");
                } catch (Throwable th) {
                    MethodCollector.o(10619);
                    throw th;
                }
                2FV.LIZ = false;
            }
        } else {
            obj = context.getSystemService(str);
        }
        MethodCollector.o(10619);
        return obj;
    }

    private final void LIZ(int i, String str) {
        String str2;
        C3491GtA LIZ2 = C3491GtA.LJFF.LIZ("livesdk_live_phone_verify_show");
        LIZ2.LIZ(this.dataChannel);
        DataChannel dataChannel = this.dataChannel;
        if (dataChannel == null || (str2 = (String) dataChannel.LIZIZ(C1412G1t.class)) == null) {
            str2 = "";
        }
        LIZ2.LIZ("room_title", str2);
        LIZ2.LIZLLL();
        1Lu r2 = new 1Lu(this.context);
        r2.LIZIZ(2131830645);
        r2.LIZJ(2131830644);
        r2.LIZ(2131830642, new H7X(this, i, str));
        r2.LIZIZ(2131830643, new C1786GGd(this));
        r2.LJIJ = false;
        LiveDialog LIZIZ2 = r2.LIZIZ();
        LIZIZ2.show();
        2fU.LIZ.LIZ(LIZIZ2);
    }

    public PreviewStartLiveWidget(User user, LsC<? super Boolean, 2Pr> lsC, Ls2<? extends C1743GEm> ls2) {
        M12.LIZ(lsC, ls2);
        this.LJIJJ = user;
        this.LJIJJLI = lsC;
        this.LJIL = ls2;
        OJw oJw = new OJw();
        n.LIZIZ(oJw, "");
        this.LJIJ = oJw;
        this.LJIIIIZZ = 7vl.LIZ(GH6.LIZ);
        this.LJIIIZ = 7vl.LIZ(GH5.LIZ);
        this.LJIIJ = 7vl.LIZ(new GGI(this));
        this.LJIIJJI = true;
        this.LJIJI = new Mjy();
    }
}
