package com.bytedance.android.livesdk.function;

import X.0Bx;
import X.0ZZ;
import X.0Zn;
import X.0Zo;
import X.0Zp;
import X.0Zq;
import X.0cm;
import X.0cp;
import X.0hQ;
import X.0yx;
import X.158;
import X.1hK;
import X.1jc;
import X.28u;
import X.2fU;
import X.7vl;
import X.C0920Fsn;
import X.C1043Fum;
import X.C1064Fv7;
import X.C1084FvR;
import X.C1209FxS;
import X.C1265FyM;
import X.C1430G2l;
import X.C1474G4d;
import X.C1475G4e;
import X.C2182GVj;
import X.C2187GVo;
import X.C2206GWh;
import X.C2207GWi;
import X.C2272GYv;
import X.C2330GaR;
import X.C2704GgT;
import X.C3028Glh;
import X.C3318GqN;
import X.C3320GqP;
import X.C3339Gqi;
import X.C3491GtA;
import X.C3665Gvy;
import X.C4100H7d;
import X.C4331HGa;
import X.C4345HGo;
import X.C4453HKs;
import X.C5629HmY;
import X.C5633Hmc;
import X.C6455Hzs;
import X.Crj;
import X.G39;
import X.G4X;
import X.GAW;
import X.GJG;
import X.GSF;
import X.GT5;
import X.GWC;
import X.GWL;
import X.GZH;
import X.J7M;
import X.Lel;
import X.M12;
import X.Pm5;
import X.SRf;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.Message;
import android.util.LongSparseArray;
import androidx.fragment.app.Fragment;
import com.bytedance.android.live.base.model.user.User;
import com.bytedance.android.live.browser.IHybridContainerService;
import com.bytedance.android.live.function.IRoomFunctionService;
import com.bytedance.android.live.publicscreen.api.IPublicScreenService;
import com.bytedance.android.live.share.IShareService;
import com.bytedance.android.livesdk.IBarrageService;
import com.bytedance.android.livesdk.callback.IHostLongPressCallback;
import com.bytedance.android.livesdk.dialog.BroadcastDialogDispatcher;
import com.bytedance.android.livesdk.interaction.custompoll.CustomPollCardWidget;
import com.bytedance.android.livesdk.interaction.drawguess.network.DrawGuessApi;
import com.bytedance.android.livesdk.interaction.drawguess.ui.DrawGuessCanvasWidget;
import com.bytedance.android.livesdk.interaction.drawguess.ui.DrawGuessStatusWidget;
import com.bytedance.android.livesdk.interaction.drawguess.ui.DrawGuessToolbarWidget;
import com.bytedance.android.livesdk.interaction.poll.selectpoll.widget.GiftSelectPollWidget;
import com.bytedance.android.livesdk.interaction.poll.selectpoll.widget.NormalSelectPollWidget;
import com.bytedance.android.livesdk.interaction.poll.ui.progresseffect.widget.LiveGiftPollEffectWidget;
import com.bytedance.android.livesdk.interaction.poll.ui.progresseffect.widget.LiveNormalPollEffectWidget;
import com.bytedance.android.livesdk.livesetting.broadcast.CustomPollLynxUrl;
import com.bytedance.android.livesdk.livesetting.broadcast.CustomPollResultLynxUrl;
import com.bytedance.android.livesdk.livesetting.roomfunction.ShareEffectShowIntervalSetting;
import com.bytedance.android.livesdk.model.RoomAuthStatus;
import com.bytedance.android.livesdk.model.message.BottomMessage;
import com.bytedance.android.livesdk.model.message.PollEndContent;
import com.bytedance.android.livesdk.model.message.PollMessage;
import com.bytedance.android.livesdk.model.message.PollOptionInfo;
import com.bytedance.android.livesdk.model.message.PollUpdateVotesContent;
import com.bytedance.android.livesdk.watch.IWatchLiveService;
import com.bytedance.android.livesdkapi.depend.model.live.Room;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.sdk.datachannel.DataChannel;
import com.bytedance.ies.sdk.widgets.LiveRecyclableWidget;
import com.ss.ugc.live.sdk.message.interfaces.IMessageManager;
import com.ss.ugc.live.sdk.message.interfaces.OnMessageListener;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import kotlin.h.b.n;

public class RoomFunctionService implements IRoomFunctionService, C3665Gvy, OnMessageListener {
    public final int MSG_WHAT_FETCH_ROOM = 2;
    public final LongSparseArray<DataChannel> mDataChannels = new LongSparseArray<>();
    public final Crj mHandler$delegate = 7vl.LIZ(new GWL(this));
    public final LongSparseArray<ArrayList<0hQ>> mOnUserCountVisibilityChangeListeners = new LongSparseArray<>();

    static {
        Covode.recordClassIndex(16259);
    }

    public final C3339Gqi getMHandler() {
        return (C3339Gqi) this.mHandler$delegate.getValue();
    }

    public Class<? extends LiveRecyclableWidget> getCustomPollCardWidget() {
        return CustomPollCardWidget.class;
    }

    public 0Zq getCustomPollManager() {
        return C2182GVj.LJIIJJI;
    }

    public long getGiftPollId() {
        return GT5.LIZIZ;
    }

    public Class<? extends LiveRecyclableWidget> getGiftSelectPollWidget() {
        return GiftSelectPollWidget.class;
    }

    public Class<? extends LiveRecyclableWidget> getLiveRoomNotifyWidget() {
        return LiveRoomNotifyWidget.class;
    }

    public Class<? extends LiveRecyclableWidget> getNormalSelectPollWidget() {
        return NormalSelectPollWidget.class;
    }

    public Class<? extends LiveRecyclableWidget> getStreamInfoWidget() {
        return StreamInfoWidget.class;
    }

    public boolean isGiftPolling() {
        return GT5.LIZLLL;
    }

    public LiveRecyclableWidget loadDrawGuessCanvas() {
        return new DrawGuessCanvasWidget();
    }

    public LiveRecyclableWidget loadDrawGuessStatusWidget() {
        return new DrawGuessStatusWidget();
    }

    public void releaseDrawGuess() {
        C1265FyM fyM = C1265FyM.LJ;
        if (C1265FyM.LIZJ) {
            C1265FyM.LIZJ = false;
            fyM.LIZ().clear();
            C1265FyM.LIZ = null;
        }
    }

    public void releasePollCountdown() {
        G4X g4x = G4X.LJI;
        CountDownTimer countDownTimer = G4X.LIZ;
        if (countDownTimer != null) {
            countDownTimer.cancel();
        }
        G4X.LJ.clear();
        DataChannel dataChannel = G4X.LJFF;
        if (dataChannel != null) {
            dataChannel.LIZIZ((Object) g4x);
        }
        G4X.LJFF = null;
        G4X.LIZLLL = 0;
    }

    public void onInit() {
        0cp.LIZ.LIZ(2131234244, new 1jc());
        0cp.LIZ.LIZ(2131234805, new 1jc());
        0cp.LIZ.LIZ(2131234810, new 1jc());
        0cp.LIZ.LIZ(2131234806, new 1jc());
        0cp.LIZ.LIZ(2131234976, new 1jc());
        0cp.LIZ.LIZ(2131235158, new 1jc());
        0cp.LIZ.LIZ(2131234808, new 1jc());
        0cp.LIZ.LIZ(2131234803, new 1jc());
        0cp.LIZ.LIZ(2131234935, new 1jc());
    }

    public boolean isDrawGuessing(DataChannel dataChannel) {
        return C1209FxS.LIZIZ.LIZJ(dataChannel);
    }

    public static void INVOKEVIRTUAL_com_bytedance_android_livesdk_function_RoomFunctionService_com_ss_android_ugc_tiktok_security_lancet_DialogLancet_show(Dialog dialog) {
        dialog.show();
        2fU.LIZ.LIZ(dialog);
    }

    public void loadCustomPollBehavior(DataChannel dataChannel) {
        158.CUSTOM_POLL.load(dataChannel, new C1475G4e());
    }

    public LiveRecyclableWidget loadDrawGuessToolbar(Fragment fragment) {
        M12.LIZ(fragment);
        return new DrawGuessToolbarWidget(fragment);
    }

    public void loadInteractionFeatureBehavior(DataChannel dataChannel) {
        158.INTERACTION_FEATURES.load(dataChannel, new G39());
    }

    public GJG provideDialogDispatcher(0Bx r3) {
        M12.LIZ(r3);
        GJG LIZ = r3.LIZ(BroadcastDialogDispatcher.class);
        n.LIZIZ(LIZ, "");
        return LIZ;
    }

    public boolean shouldShowUserCount(Room room) {
        if (room == null) {
            return false;
        }
        RoomAuthStatus roomAuthStatus = room.getRoomAuthStatus();
        if (roomAuthStatus == null || roomAuthStatus.getUserCountDisplayState() != 2) {
            return true;
        }
        return false;
    }

    private final void handleMaskLayer(Room room) {
        if (room != null) {
            if (room.maskLayer == null) {
                0cm.LIZ(IWatchLiveService.class).showMaskLayer(room.getId(), false);
            } else {
                0cm.LIZ(IWatchLiveService.class).showMaskLayer(room.getId(), true);
            }
        }
    }

    public void handleMsg(Message message) {
        Object obj;
        int i;
        Object obj2 = null;
        if (message != null) {
            obj = message.obj;
        } else {
            obj = null;
        }
        if (obj instanceof Room) {
            if (message != null) {
                obj2 = message.obj;
            }
            Objects.requireNonNull(obj2, "null cannot be cast to non-null type com.bytedance.android.livesdkapi.depend.model.live.Room");
            if (Room.isValid((Room) obj2)) {
                Object obj3 = message.obj;
                Objects.requireNonNull(obj3, "null cannot be cast to non-null type com.bytedance.android.livesdkapi.depend.model.live.Room");
                handleWarningTag((Room) obj3);
                Object obj4 = message.obj;
                Objects.requireNonNull(obj4, "null cannot be cast to non-null type com.bytedance.android.livesdkapi.depend.model.live.Room");
                handleMaskLayer((Room) obj4);
            }
        }
        C2187GVo gVo = C2187GVo.LJI;
        if (message != null) {
            i = message.what;
        } else {
            i = 0;
        }
        gVo.LIZ(i);
    }

    private final void handleWarningTag(Room room) {
        BottomMessage currentBottomMessage;
        if (room != null) {
            IPublicScreenService LIZ = 0cm.LIZ(IPublicScreenService.class);
            int i = 4;
            if (room.warningTag != null && room.warningTag.text != null) {
                if (room.warningTag.tagSource != 1) {
                    i = 3;
                }
                if (room.warningTag.punishInfo != null) {
                    i = 6;
                }
                if (LIZ != null) {
                    LIZ.insertBottomMessage(room.getId(), "", room.warningTag.text, room.warningTag.duration, room.warningTag.punishInfo, 1, 0, i);
                }
            } else if (LIZ != null && (currentBottomMessage = LIZ.getCurrentBottomMessage(room.getId())) != null) {
                if (currentBottomMessage.LJ == 3 || currentBottomMessage.LJ == 4) {
                    LIZ.hideWarningMessage(room.getId());
                }
            }
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:7:0x000d, code lost:
        r1 = r0.LIZJ;
     */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void onMessage(com.ss.ugc.live.sdk.message.data.IMessage r9) {
        /*
            r8 = this;
            boolean r0 = r9 instanceof X.C3553GuA
            if (r0 != 0) goto L_0x00c8
            r0 = 0
        L_0x0005:
            X.HEu r0 = (X.C4299HEu) r0
            if (r0 == 0) goto L_0x0023
            com.bytedance.android.livesdkapi.message.CommonMessageData r0 = r0.LJJJJ
            if (r0 == 0) goto L_0x0023
            long r1 = r0.LIZJ
            android.util.LongSparseArray<com.bytedance.ies.sdk.datachannel.DataChannel> r0 = r8.mDataChannels
            java.lang.Object r3 = r0.get(r1)
            com.bytedance.ies.sdk.datachannel.DataChannel r3 = (com.bytedance.ies.sdk.datachannel.DataChannel) r3
            if (r3 == 0) goto L_0x0023
            java.lang.Class<X.Fv7> r0 = X.C1064Fv7.class
            java.lang.Object r4 = r3.LIZIZ(r0)
            com.bytedance.android.livesdkapi.depend.model.live.Room r4 = (com.bytedance.android.livesdkapi.depend.model.live.Room) r4
            if (r4 != 0) goto L_0x0024
        L_0x0023:
            return
        L_0x0024:
            boolean r0 = r9 instanceof com.bytedance.android.livesdk.model.message.RoomVerifyMessage
            r5 = 1
            if (r0 == 0) goto L_0x005c
            com.bytedance.android.livesdk.model.message.RoomVerifyMessage r9 = (com.bytedance.android.livesdk.model.message.RoomVerifyMessage) r9
            int r3 = r9.LIZ
            r0 = 32
            if (r3 != r0) goto L_0x00cc
            com.bytedance.android.livesdk.model.RoomAuthStatus r0 = r4.getRoomAuthStatus()
            if (r0 == 0) goto L_0x003a
            r0.setUserCountDisplayState(r5)
        L_0x003a:
            android.util.LongSparseArray<java.util.ArrayList<X.0hQ>> r0 = r8.mOnUserCountVisibilityChangeListeners
            java.lang.Object r0 = r0.get(r1)
            java.util.ArrayList r0 = (java.util.ArrayList) r0
            if (r0 == 0) goto L_0x00cb
            java.util.Iterator r2 = r0.iterator()
        L_0x0048:
            boolean r0 = r2.hasNext()
            if (r0 == 0) goto L_0x00cb
            java.lang.Object r1 = r2.next()
            X.0hQ r1 = (X.0hQ) r1
            boolean r0 = r8.shouldShowUserCount(r4)
            r1.LIZ(r0)
            goto L_0x0048
        L_0x005c:
            boolean r0 = r9 instanceof com.bytedance.android.livesdk.model.message.SocialMessage
            if (r0 == 0) goto L_0x0023
            com.bytedance.android.livesdk.model.message.SocialMessage r9 = (com.bytedance.android.livesdk.model.message.SocialMessage) r9
            long r3 = r9.LIZ
            r6 = 3
            int r0 = (r3 > r6 ? 1 : (r3 == r6 ? 0 : -1))
            if (r0 != 0) goto L_0x0023
            com.bytedance.android.livesdk.livesetting.roomfunction.ShareEffectShowIntervalSetting r0 = com.bytedance.android.livesdk.livesetting.roomfunction.ShareEffectShowIntervalSetting.INSTANCE
            X.GVg r0 = r0.getValue()
            boolean r0 = r0.LIZJ
            if (r0 == 0) goto L_0x0023
            com.bytedance.android.live.base.model.user.User r0 = r9.LIZIZ
            if (r0 == 0) goto L_0x0023
            com.bytedance.android.live.base.model.user.User r0 = r9.LIZIZ
            java.lang.String r3 = ""
            kotlin.h.b.n.LIZIZ(r0, r3)
            long r6 = r0.getId()
            X.H7d r0 = X.C4100H7d.LIZ()
            X.Glh r0 = r0.LIZIZ()
            kotlin.h.b.n.LIZIZ(r0, r3)
            long r3 = r0.LIZJ()
            int r0 = (r6 > r3 ? 1 : (r6 == r3 ? 0 : -1))
            if (r0 == 0) goto L_0x0023
            boolean r0 = X.C2187GVo.LIZLLL
            if (r0 == 0) goto L_0x00bf
            com.bytedance.android.livesdk.livesetting.roomfunction.ShareEffectShowIntervalSetting r0 = com.bytedance.android.livesdk.livesetting.roomfunction.ShareEffectShowIntervalSetting.INSTANCE
            X.GVg r0 = r0.getValue()
            int r3 = r0.LIZ
        L_0x00a2:
            int r0 = X.C2187GVo.LIZIZ
            int r0 = r0 + r5
            X.C2187GVo.LIZIZ = r0
            int r0 = r0 % r3
            X.C2187GVo.LIZIZ = r0
            if (r0 != 0) goto L_0x0023
            java.lang.Class<com.bytedance.android.livesdk.IBarrageService> r0 = com.bytedance.android.livesdk.IBarrageService.class
            X.0UT r0 = X.0cm.LIZ(r0)
            com.bytedance.android.livesdk.IBarrageService r0 = (com.bytedance.android.livesdk.IBarrageService) r0
            X.GYv r0 = r0.getLikeHelper(r1)
            if (r0 == 0) goto L_0x0023
            r0.LJIILLIIL()
            goto L_0x0023
        L_0x00bf:
            com.bytedance.android.livesdk.livesetting.roomfunction.ShareEffectShowIntervalSetting r0 = com.bytedance.android.livesdk.livesetting.roomfunction.ShareEffectShowIntervalSetting.INSTANCE
            X.GVg r0 = r0.getValue()
            int r3 = r0.LIZIZ
            goto L_0x00a2
        L_0x00c8:
            r0 = r9
            goto L_0x0005
        L_0x00cb:
            return
        L_0x00cc:
            int r3 = r9.LIZ
            r0 = 33
            if (r3 != r0) goto L_0x00fe
            com.bytedance.android.livesdk.model.RoomAuthStatus r3 = r4.getRoomAuthStatus()
            if (r3 == 0) goto L_0x00dc
            r0 = 2
            r3.setUserCountDisplayState(r0)
        L_0x00dc:
            android.util.LongSparseArray<java.util.ArrayList<X.0hQ>> r0 = r8.mOnUserCountVisibilityChangeListeners
            java.lang.Object r0 = r0.get(r1)
            java.util.ArrayList r0 = (java.util.ArrayList) r0
            if (r0 == 0) goto L_0x00fe
            java.util.Iterator r2 = r0.iterator()
        L_0x00ea:
            boolean r0 = r2.hasNext()
            if (r0 == 0) goto L_0x00fe
            java.lang.Object r1 = r2.next()
            X.0hQ r1 = (X.0hQ) r1
            boolean r0 = r8.shouldShowUserCount(r4)
            r1.LIZ(r0)
            goto L_0x00ea
        L_0x00fe:
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.livesdk.function.RoomFunctionService.onMessage(com.ss.ugc.live.sdk.message.data.IMessage):void");
    }

    public LiveGiftPollEffectWidget getLiveGiftPollWidget(boolean z, int i) {
        if (z) {
            return new LiveGiftPollEffectWidget(i);
        }
        return null;
    }

    public LiveNormalPollEffectWidget getLiveNormalPollWidget(boolean z, int i) {
        if (z) {
            return new LiveNormalPollEffectWidget(i);
        }
        return null;
    }

    public void loadAudienceInteractionFeatureBehavior(DataChannel dataChannel, boolean z) {
        158.AUDIENCE_INTERACTION_FEATURES.load(dataChannel, new C1474G4d(), z);
    }

    public void addOnUserCountVisibilityChangeListener(long j, 0hQ r5) {
        M12.LIZ(r5);
        List list = this.mOnUserCountVisibilityChangeListeners.get(j);
        if (list == null) {
            list = new ArrayList();
            this.mOnUserCountVisibilityChangeListeners.put(j, list);
        }
        list.add(r5);
    }

    public void leave(DataChannel dataChannel, Room room) {
        IMessageManager iMessageManager;
        if (room != null) {
            this.mDataChannels.remove(room.getId());
            this.mOnUserCountVisibilityChangeListeners.remove(room.getId());
            C2187GVo gVo = C2187GVo.LJI;
            if (ShareEffectShowIntervalSetting.INSTANCE.getValue().LIZJ) {
                Handler handler = C2187GVo.LJFF;
                if (handler != null) {
                    handler.removeMessages(291);
                }
                gVo.LIZ(291);
                C2272GYv likeHelper = 0cm.LIZ(IBarrageService.class).getLikeHelper(C2187GVo.LJ);
                if (likeHelper != null) {
                    likeHelper.LIZIZ((GZH) gVo.LIZ());
                }
                C2187GVo.LIZJ = null;
                C2187GVo.LJFF = null;
            }
        }
        if (dataChannel != null && (iMessageManager = (IMessageManager) dataChannel.LIZIZ(C4345HGo.class)) != null) {
            iMessageManager.removeMessageListener(C4453HKs.ROOM_VERIFY.getIntType(), this);
            iMessageManager.removeMessageListener(C4453HKs.SOCIAL.getIntType(), this);
        }
    }

    public void guessWord(String str, Fragment fragment) {
        long j;
        Boolean bool;
        C1209FxS fxS = C1209FxS.LIZIZ;
        String str2 = str;
        if (str2 != null) {
            M12.LIZ(str2);
            DataChannel LIZ = GSF.LIZ(fragment);
            if (LIZ != null) {
                Long LIZ2 = fxS.LIZ(LIZ);
                long j2 = 0;
                if (LIZ2 != null) {
                    j = LIZ2.longValue();
                } else {
                    j = 0;
                }
                Long l = (Long) LIZ.LIZIZ(28u.class);
                if (l != null) {
                    long longValue = l.longValue();
                    if (longValue > 0) {
                        HashMap hashMap = (HashMap) LIZ.LIZIZ(C1084FvR.class);
                        if (hashMap != null) {
                            bool = Boolean.valueOf(hashMap.containsKey(Long.valueOf(longValue)));
                        } else {
                            bool = null;
                        }
                        if (!C1430G2l.LIZ(bool)) {
                            DrawGuessApi drawGuessApi = (DrawGuessApi) 0yx.LIZ().LIZ(DrawGuessApi.class);
                            long LIZIZ = C1430G2l.LIZIZ(LIZ);
                            Long l2 = (Long) LIZ.LIZIZ(28u.class);
                            if (l2 != null) {
                                j2 = l2.longValue();
                            }
                            drawGuessApi.guessWord(LIZIZ, j2, str2).LIZ(new C6455Hzs()).LIZ(Pm5.LIZ(fragment, SRf.DESTROY)).LIZ(new C1043Fum(LIZ, longValue, j), C0920Fsn.LIZ);
                        }
                    }
                }
            }
        }
    }

    public void leavePlayOrBroadCastFragment(DataChannel dataChannel, Room room) {
        List<PollOptionInfo> list;
        PollUpdateVotesContent pollUpdateVotesContent;
        IMessageManager iMessageManager;
        if (room != null) {
            C2182GVj gVj = C2182GVj.LJIIJJI;
            long id = room.getId();
            DataChannel dataChannel2 = C2182GVj.LIZ.get(id);
            if (!(dataChannel2 == null || (iMessageManager = (IMessageManager) dataChannel2.LIZIZ(C4345HGo.class)) == null)) {
                iMessageManager.removeMessageListener(C2182GVj.LIZIZ.get(id));
            }
            0Zo LJ = gVj.LJ(id);
            if (LJ != null) {
                if (C1430G2l.LIZJ(C2182GVj.LIZ.get(id))) {
                    LJ.LIZ(0Zn.LIVE_END);
                    PollMessage pollMessage = LJ.LJFF;
                    if (pollMessage != null) {
                        PollEndContent pollEndContent = new PollEndContent();
                        PollMessage pollMessage2 = C2182GVj.LJ;
                        if (pollMessage2 == null || (pollUpdateVotesContent = pollMessage2.LJ) == null || (list = pollUpdateVotesContent.LIZ) == null) {
                            list = Lel.INSTANCE;
                        }
                        pollEndContent.LIZIZ = list;
                        pollMessage.LIZLLL = pollEndContent;
                    }
                    0Zp.LIZ.LIZ(C2182GVj.LIZ.get(id), LJ, "close_take");
                } else {
                    LJ.LIZ(0Zn.LEAVE_ROOM);
                }
                C2182GVj.LJIIJJI.LIZJ(id, LJ);
            }
            C5629HmY.LIZIZ("custom_poll_start", (C5633Hmc) gVj);
            C5629HmY.LIZIZ("custom_poll_template_page_status", (C5633Hmc) gVj);
            C5629HmY.LIZIZ("custom_poll_open_interact", (C5633Hmc) gVj);
            C2182GVj.LJI.remove(id);
            C2182GVj.LJ = null;
            C2182GVj.LJFF = false;
            C2182GVj.LJIIJ.remove(id);
            C2182GVj.LIZLLL.remove(id);
            C2182GVj.LJIIIIZZ.remove(id);
            C2182GVj.LJII.remove(id);
            C2182GVj.LIZIZ.remove(id);
            C2182GVj.LIZ.remove(id);
            C2182GVj.LIZJ.remove(id);
            C2182GVj.LJI.remove(id);
        }
    }

    public void likeMicStateChange(long j, int i, boolean z) {
        double d;
        if (i == 1) {
            d = 1.0d;
        } else {
            d = 2.0d;
        }
        getMHandler().postDelayed(new GWC(this, z, j), (long) (d * 1000.0d));
    }

    private final void logOnLongPress(boolean z, Room room, C2704GgT ggT) {
        String str;
        String str2;
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        C2330GaR gaR = C2330GaR.LIZ;
        String str3 = ggT.LJJIFFI;
        n.LIZIZ(str3, "");
        String str4 = ggT.LJJII;
        String str5 = ggT.LJJIII;
        n.LIZIZ(str5, "");
        gaR.LIZ(linkedHashMap, room, str3, str4, str5);
        if (z) {
            str = "anchor";
        } else {
            str = "user";
        }
        linkedHashMap.put("user_type", str);
        if (z) {
            String str6 = "1";
            if (Collections.unmodifiableList(ggT.LJJIL).size() > 0) {
                linkedHashMap.put("top_supporters_cnt", String.valueOf(Collections.unmodifiableList(ggT.LJJIL).size()));
                str2 = str6;
            } else {
                str2 = "0";
            }
            linkedHashMap.put("is_top_supporters", str2);
            if (Collections.unmodifiableList(ggT.LJJIZ).size() > 0) {
                linkedHashMap.put("recently_shared_cnt", String.valueOf(Collections.unmodifiableList(ggT.LJJIZ).size()));
            } else {
                str6 = "0";
            }
            linkedHashMap.put("is_recently_shared", str6);
        }
        C3491GtA LIZ = C3491GtA.LJFF.LIZ("click_trans_layer");
        LIZ.LIZ();
        LIZ.LIZ((Map<String, String>) linkedHashMap);
        LIZ.LIZLLL();
    }

    /* JADX WARNING: Removed duplicated region for block: B:20:0x006f  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void enter(X.0CH r9, com.bytedance.ies.sdk.datachannel.DataChannel r10, com.bytedance.android.livesdkapi.depend.model.live.Room r11) {
        /*
            r8 = this;
            X.M12.LIZ(r9)
            r2 = 0
            if (r11 == 0) goto L_0x0080
            android.util.LongSparseArray<com.bytedance.ies.sdk.datachannel.DataChannel> r3 = r8.mDataChannels
            long r0 = r11.getId()
            r3.put(r0, r10)
            X.GVo r7 = X.C2187GVo.LJI
            X.Gqi r3 = r8.getMHandler()
            X.M12.LIZ(r3)
            if (r10 == 0) goto L_0x0022
            java.lang.Class<X.HGa> r0 = X.C4331HGa.class
            java.lang.Object r2 = r10.LIZIZ(r0)
            X.GqN r2 = (X.C3318GqN) r2
        L_0x0022:
            com.bytedance.android.livesdk.livesetting.roomfunction.ShareEffectShowIntervalSetting r0 = com.bytedance.android.livesdk.livesetting.roomfunction.ShareEffectShowIntervalSetting.INSTANCE
            X.GVg r0 = r0.getValue()
            boolean r0 = r0.LIZJ
            if (r0 == 0) goto L_0x0080
            if (r2 == 0) goto L_0x00a3
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = r2.LIZIZ
            if (r0 == 0) goto L_0x00a3
            long r0 = r0.getId()
        L_0x0036:
            X.C2187GVo.LJ = r0
            X.C2187GVo.LIZJ = r10
            X.C2187GVo.LJFF = r3
            r6 = 0
            if (r2 == 0) goto L_0x00a1
            com.bytedance.android.livesdkapi.depend.model.live.Room r0 = r2.LIZIZ
            if (r0 == 0) goto L_0x00a1
            long r4 = r0.getOwnerUserId()
            X.H7d r0 = X.C4100H7d.LIZ()
            X.Glh r1 = r0.LIZIZ()
            java.lang.String r0 = ""
            kotlin.h.b.n.LIZIZ(r1, r0)
            long r1 = r1.LIZJ()
            int r0 = (r4 > r1 ? 1 : (r4 == r1 ? 0 : -1))
            if (r0 != 0) goto L_0x00a1
            r0 = 1
        L_0x005d:
            X.C2187GVo.LIZLLL = r0
            java.lang.Class<com.bytedance.android.livesdk.IBarrageService> r0 = com.bytedance.android.livesdk.IBarrageService.class
            X.0UT r2 = X.0cm.LIZ(r0)
            com.bytedance.android.livesdk.IBarrageService r2 = (com.bytedance.android.livesdk.IBarrageService) r2
            long r0 = X.C2187GVo.LJ
            X.GYv r1 = r2.getLikeHelper(r0)
            if (r1 == 0) goto L_0x0076
            X.GWe r0 = r7.LIZ()
            r1.LIZ((X.GZH) r0)
        L_0x0076:
            X.C2187GVo.LIZIZ = r6
            r2 = 291(0x123, float:4.08E-43)
            r0 = 60000(0xea60, double:2.9644E-319)
            r3.sendEmptyMessageDelayed(r2, r0)
        L_0x0080:
            if (r10 == 0) goto L_0x00a0
            java.lang.Class<X.HGo> r0 = X.C4345HGo.class
            java.lang.Object r2 = r10.LIZIZ(r0)
            com.ss.ugc.live.sdk.message.interfaces.IMessageManager r2 = (com.ss.ugc.live.sdk.message.interfaces.IMessageManager) r2
            if (r2 == 0) goto L_0x00a0
            X.HKs r0 = X.C4453HKs.ROOM_VERIFY
            int r1 = r0.getIntType()
            r0 = r8
            r2.addMessageListener(r1, r0)
            X.HKs r0 = X.C4453HKs.SOCIAL
            int r1 = r0.getIntType()
            r0 = r8
            r2.addMessageListener(r1, r0)
        L_0x00a0:
            return
        L_0x00a1:
            r0 = 0
            goto L_0x005d
        L_0x00a3:
            r0 = 0
            goto L_0x0036
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.livesdk.function.RoomFunctionService.enter(X.0CH, com.bytedance.ies.sdk.datachannel.DataChannel, com.bytedance.android.livesdkapi.depend.model.live.Room):void");
    }

    /*  JADX ERROR: JadxRuntimeException in pass: CodeShrinkVisitor
        jadx.core.utils.exceptions.JadxRuntimeException: Don't wrap MOVE or CONST insns: 0x0009: MOVE  (r7v0 com.bytedance.android.livesdkapi.depend.model.live.Room) = 
          (r22v0 com.bytedance.android.livesdkapi.depend.model.live.Room)
        
        	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.shrink.CodeShrinkVisitor.visit(CodeShrinkVisitor.java:35)
        */
    public void enterPlayOrBroadCastFragment(androidx.fragment.app.Fragment r20, com.bytedance.ies.sdk.datachannel.DataChannel r21, com.bytedance.android.livesdkapi.depend.model.live.Room r22) {
        /*
            r19 = this;
            r18 = r20
            X.M12.LIZ(r18)
            r8 = r21
            if (r8 == 0) goto L_0x01f6
            r7 = r22
            if (r7 == 0) goto L_0x01f6
            X.GVj r13 = X.C2182GVj.LJIIJJI
            r0 = r18
            X.M12.LIZ(r0, r7, r8)
            r0 = 0
            X.C2182GVj.LJ = r0
            r17 = 0
            X.C2182GVj.LJFF = r17
            android.util.LongSparseArray<com.bytedance.ies.sdk.datachannel.DataChannel> r2 = X.C2182GVj.LIZ
            long r0 = r7.getId()
            r2.put(r0, r8)
            long r0 = r7.getId()
            X.C2182GVj.LJIIIZ = r0
            com.bytedance.android.livesdk.model.RoomAuthStatus r0 = r7.getRoomAuthStatus()
            java.lang.Long r0 = r0.customizablepoll
            r4 = 1
            if (r0 != 0) goto L_0x0041
        L_0x0033:
            android.util.LongSparseArray<java.lang.Integer> r3 = X.C2182GVj.LIZJ
            long r1 = r7.getId()
            java.lang.Integer r0 = java.lang.Integer.valueOf(r4)
            r3.put(r1, r0)
            return
        L_0x0041:
            long r5 = r0.longValue()
            r1 = 1
            int r0 = (r5 > r1 ? 1 : (r5 == r1 ? 0 : -1))
            if (r0 == 0) goto L_0x004c
            goto L_0x0033
        L_0x004c:
            android.util.LongSparseArray<java.lang.Integer> r3 = X.C2182GVj.LIZJ
            long r0 = r7.getId()
            r2 = r17
            java.lang.Integer r2 = java.lang.Integer.valueOf(r2)
            r3.put(r0, r2)
            boolean r0 = X.C1430G2l.LIZJ((com.bytedance.ies.sdk.datachannel.DataChannel) r8)
            if (r0 == 0) goto L_0x0092
            X.0yx r1 = X.0yx.LIZ()
            java.lang.Class<com.bytedance.android.live.poll.PollApi> r0 = com.bytedance.android.live.poll.PollApi.class
            java.lang.Object r2 = r1.LIZ(r0)
            com.bytedance.android.live.poll.PollApi r2 = (com.bytedance.android.live.poll.PollApi) r2
            long r0 = r7.getId()
            X.PgU r1 = r2.getPollHistory(r0)
            X.Hzs r0 = new X.Hzs
            r0.<init>()
            X.PgU r1 = r1.LIZ(r0)
            X.Gg6 r0 = X.DEF.LIZ(r18)
            java.lang.Object r2 = r1.LIZ(r0)
            X.HHj r2 = (X.C4366HHj) r2
            X.GVk r1 = new X.GVk
            r1.<init>(r7)
            X.GWZ r0 = X.GWZ.LIZ
            r2.LIZ(r1, r0)
        L_0x0092:
            r2 = r18
            java.lang.Class<X.FwJ> r1 = X.C1138FwJ.class
            X.GVy r0 = new X.GVy
            r0.<init>(r7)
            r8.LIZ((X.0CH) r2, r1, r0)
            java.lang.Class<X.FxA> r1 = X.C1191FxA.class
            X.GVz r0 = new X.GVz
            r0.<init>(r7)
            r8.LIZ((X.0CH) r2, r1, r0)
            java.lang.Class<X.Fvh> r1 = X.C1100Fvh.class
            X.GW0 r0 = new X.GW0
            r0.<init>(r7)
            r8.LIZ((X.0CH) r2, r1, r0)
            java.lang.Class<X.FvT> r1 = X.C1086FvT.class
            X.GW1 r0 = new X.GW1
            r0.<init>(r7)
            r8.LIZ((X.0CH) r2, r1, r0)
            java.lang.Class<X.FvB> r1 = X.C1068FvB.class
            X.GW2 r0 = new X.GW2
            r0.<init>(r7)
            r8.LIZ((X.0CH) r2, r1, r0)
            java.lang.Class<X.FxD> r1 = X.C1194FxD.class
            X.GW3 r0 = new X.GW3
            r0.<init>(r7)
            r8.LIZ((X.0CH) r2, r1, r0)
            java.lang.Class<X.FxC> r1 = X.C1193FxC.class
            X.GW4 r0 = new X.GW4
            r0.<init>(r7)
            r8.LIZ((X.0CH) r2, r1, r0)
            java.lang.Class<X.2D5> r1 = X.2D5.class
            X.GVm r0 = new X.GVm
            r0.<init>(r7, r8)
            r8.LIZ((X.0CH) r2, r1, r0)
            java.lang.Class<X.G2p> r1 = X.C1434G2p.class
            X.GVp r0 = new X.GVp
            r0.<init>(r7)
            r8.LIZ((X.0CH) r2, r1, r0)
            java.lang.Class<X.2Ce> r1 = X.2Ce.class
            X.GVx r0 = new X.GVx
            r0.<init>(r7)
            r8.LIZ((X.0CH) r2, r1, r0)
            com.bytedance.android.livesdk.model.PollInfo r6 = r7.advancedPollInfo
            if (r6 == 0) goto L_0x019c
            com.bytedance.android.livesdk.model.PollData r0 = r6.LIZ
            if (r0 == 0) goto L_0x019c
            int r1 = r0.LIZ
            r0 = 2
            if (r1 != r0) goto L_0x019c
            android.util.LongSparseArray<java.lang.Boolean> r3 = X.C2182GVj.LIZLLL
            long r0 = r7.getId()
            java.lang.Boolean r2 = java.lang.Boolean.valueOf(r4)
            r3.put(r0, r2)
            com.bytedance.android.livesdk.model.PollData r0 = r6.LIZ
            if (r0 == 0) goto L_0x019c
            int r0 = r0.LIZJ
            if (r0 != r4) goto L_0x019c
            X.GVj r16 = X.C2182GVj.LJIIJJI
            long r14 = r7.getId()
            X.0Zo r5 = new X.0Zo
            long r0 = r7.getId()
            r5.<init>(r0)
            com.bytedance.android.livesdk.model.PollData r4 = r6.LIZ
            if (r4 == 0) goto L_0x017a
            long r2 = r4.LJ
            long r0 = r4.LIZLLL
            long r2 = r2 - r0
            r9 = 2592000000(0x9a7ec800, double:1.280618154E-314)
            r11 = 0
            int r0 = (r2 > r9 ? 1 : (r2 == r9 ? 0 : -1))
            if (r0 < 0) goto L_0x01f9
            r0 = -1
        L_0x013f:
            r5.LIZIZ = r0
            X.GVj r2 = X.C2182GVj.LJIIJJI
            long r0 = r5.LIZ
            boolean r0 = r2.LIZ((long) r0)
            r5.LIZLLL = r0
            com.bytedance.android.livesdk.model.message.PollMessage r2 = new com.bytedance.android.livesdk.model.message.PollMessage
            r2.<init>()
            long r0 = r4.LIZIZ
            r2.LIZIZ = r0
            r0 = 2
            java.lang.Integer r0 = java.lang.Integer.valueOf(r0)
            r2.LJFF = r0
            r2.LIZ = r11
            com.bytedance.android.livesdk.model.message.PollStartContent r3 = new com.bytedance.android.livesdk.model.message.PollStartContent
            r3.<init>()
            long r0 = r4.LIZLLL
            r3.LIZ = r0
            long r0 = r4.LJ
            r3.LIZIZ = r0
            java.lang.String r0 = r4.LJI
            r3.LIZLLL = r0
            com.bytedance.android.live.base.model.user.User r0 = r4.LJII
            r3.LJ = r0
            java.util.List<com.bytedance.android.livesdk.model.message.PollOptionInfo> r0 = r4.LJFF
            r3.LIZJ = r0
            r2.LIZJ = r3
            r5.LJFF = r2
        L_0x017a:
            com.bytedance.android.livesdk.model.UserVoteInfo r0 = r6.LIZIZ
            if (r0 == 0) goto L_0x01f7
            boolean r0 = r0.LIZ
        L_0x0180:
            r5.LIZJ = r0
            r0 = r16
            r1 = r14
            r3 = r5
            r0.LIZIZ((long) r1, (X.0Zo) r3)
            android.util.LongSparseArray<X.0Zo> r5 = X.C2182GVj.LJIIJ
            long r1 = r7.getId()
            X.GVj r0 = X.C2182GVj.LJIIJJI
            long r3 = r7.getId()
            X.0Zo r0 = r0.LJ(r3)
            r5.put(r1, r0)
        L_0x019c:
            java.lang.String r0 = "custom_poll_start"
            X.C5629HmY.LIZ((java.lang.String) r0, (X.C5633Hmc) r13)
            java.lang.String r0 = "custom_poll_template_page_status"
            X.C5629HmY.LIZ((java.lang.String) r0, (X.C5633Hmc) r13)
            java.lang.String r0 = "custom_poll_open_interact"
            X.C5629HmY.LIZ((java.lang.String) r0, (X.C5633Hmc) r13)
            X.GVl r4 = new X.GVl
            r4.<init>(r8, r7)
            android.util.LongSparseArray<com.ss.ugc.live.sdk.message.interfaces.OnMessageListener> r2 = X.C2182GVj.LIZIZ
            long r0 = r7.getId()
            r2.put(r0, r4)
            java.lang.Class<com.bytedance.android.message.IMessageService> r0 = com.bytedance.android.message.IMessageService.class
            X.0UT r2 = X.0cm.LIZ(r0)
            com.bytedance.android.message.IMessageService r2 = (com.bytedance.android.message.IMessageService) r2
            long r0 = r7.getId()
            com.ss.ugc.live.sdk.message.interfaces.IMessageManager r1 = r2.get(r0)
            if (r1 != 0) goto L_0x01ed
            java.lang.Class<com.bytedance.android.message.IMessageService> r0 = com.bytedance.android.message.IMessageService.class
            X.0UT r3 = X.0cm.LIZ(r0)
            com.bytedance.android.message.IMessageService r3 = (com.bytedance.android.message.IMessageService) r3
            long r1 = r7.getId()
            r0 = r18
            android.content.Context r0 = r0.getContext()
            r9 = r3
            r10 = r1
            r12 = r17
            r13 = r0
            com.ss.ugc.live.sdk.message.interfaces.IMessageManager r1 = r9.messageManagerProvider(r10, r12, r13)
            java.lang.Class<X.HGo> r0 = X.C4345HGo.class
            r8.LIZ(r0, r1)
            if (r1 == 0) goto L_0x01f6
        L_0x01ed:
            X.HKs r0 = X.C4453HKs.LIVE_POLL_MESSAGE
            int r0 = r0.getIntType()
            r1.addMessageListener(r0, r4)
        L_0x01f6:
            return
        L_0x01f7:
            r0 = 0
            goto L_0x0180
        L_0x01f9:
            long r2 = r4.LJ
            long r9 = java.lang.System.currentTimeMillis()
            long r0 = X.47t.LIZ
            long r9 = r9 + r0
            long r2 = r2 - r9
            com.bytedance.android.livesdk.model.PollData r0 = r6.LIZ
            if (r0 == 0) goto L_0x020f
            long r0 = r0.LJ
        L_0x0209:
            long r0 = X.06Z.LIZ(r2, r0)
            goto L_0x013f
        L_0x020f:
            long r9 = r4.LIZLLL
            long r0 = r11 - r9
            goto L_0x0209
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.livesdk.function.RoomFunctionService.enterPlayOrBroadCastFragment(androidx.fragment.app.Fragment, com.bytedance.ies.sdk.datachannel.DataChannel, com.bytedance.android.livesdkapi.depend.model.live.Room):void");
    }

    public void showCustomPollDialog(String str, 1hK r18, DataChannel dataChannel, boolean z) {
        long j;
        Boolean bool;
        Boolean bool2;
        String str2;
        Room room;
        String str3;
        Long l;
        String str4;
        Room room2;
        User owner;
        long id;
        String str5;
        String str6;
        C3318GqN gqN;
        C3320GqP gqP;
        C3318GqN gqN2;
        C3320GqP gqP2;
        PollMessage pollMessage;
        String valueOf;
        Room room3;
        Room room4;
        1hK r3 = r18;
        String str7 = str;
        M12.LIZ(str7, r3);
        M12.LIZ(str7, r3);
        DataChannel dataChannel2 = dataChannel;
        if (dataChannel2 == null || (room4 = (Room) dataChannel2.LIZIZ(C1064Fv7.class)) == null) {
            j = 0;
        } else {
            j = room4.getId();
        }
        Long l2 = null;
        if (dataChannel2 == null || (room3 = (Room) dataChannel2.LIZIZ(C1064Fv7.class)) == null) {
            bool = null;
        } else {
            bool = Boolean.valueOf(room3.isThirdParty);
        }
        if (C1430G2l.LIZ(bool)) {
            str2 = "third_party";
        } else {
            if (dataChannel2 == null || (room = (Room) dataChannel2.LIZIZ(C1064Fv7.class)) == null) {
                bool2 = null;
            } else {
                bool2 = Boolean.valueOf(room.isScreenshot);
            }
            if (C1430G2l.LIZ(bool2)) {
                str2 = "screen_share";
            } else {
                str2 = "video_live";
            }
        }
        C2207GWi gWi = C2206GWh.LIZ;
        if (C1430G2l.LIZJ() || C1430G2l.LIZJ(dataChannel2) || C1430G2l.LJFF(dataChannel2)) {
            str3 = CustomPollLynxUrl.INSTANCE.getValue();
        } else {
            str3 = CustomPollResultLynxUrl.INSTANCE.getValue();
        }
        C2206GWh LIZ = gWi.LIZ(str3);
        LIZ.LIZJ("bottom");
        LIZ.LJ("bottom");
        C2206GWh unused = LIZ.LIZIZ(8, GAW.DP);
        LIZ.LIZ(60, GAW.PERCENT);
        LIZ.LJIIIIZZ();
        LIZ.LJIIIZ();
        String str8 = "1";
        LIZ.LIZIZ("hide_nav_bar", str8);
        String str9 = "0";
        LIZ.LIZIZ("hide_status_bar", str9);
        C3028Glh LIZIZ = C4100H7d.LIZ().LIZIZ();
        if (LIZIZ != null) {
            l = Long.valueOf(LIZIZ.LIZJ());
        } else {
            l = null;
        }
        LIZ.LIZIZ("user_id", String.valueOf(l));
        if (j == 0) {
            LIZ.LIZIZ("room_id", "");
        } else {
            LIZ.LIZIZ("room_id", String.valueOf(j));
        }
        LIZ.LIZIZ("keyboard_adjust", str8);
        LIZ.LIZIZ("enter_from", str7);
        if (C1430G2l.LIZJ() || C1430G2l.LIZJ(dataChannel2) || C1430G2l.LJFF(dataChannel2)) {
            LIZ.LIZIZ("live_type", str2);
            if (z) {
                str4 = str8;
            } else {
                str4 = str9;
            }
            LIZ.LIZIZ("isInLive", str4);
            if (!C1430G2l.LIZJ(dataChannel2) && !C1430G2l.LIZJ()) {
                str8 = str9;
            }
            LIZ.LIZIZ("isHost", str8);
            if (C1430G2l.LIZJ()) {
                C3028Glh LIZIZ2 = C4100H7d.LIZ().LIZIZ();
                if (LIZIZ2 != null) {
                    id = LIZIZ2.LIZJ();
                }
                LIZ.LIZIZ("anchor_id", String.valueOf(l2));
            } else {
                if (!(dataChannel2 == null || (room2 = (Room) dataChannel2.LIZIZ(C1064Fv7.class)) == null || (owner = room2.getOwner()) == null)) {
                    id = owner.getId();
                }
                LIZ.LIZIZ("anchor_id", String.valueOf(l2));
            }
            l2 = Long.valueOf(id);
            LIZ.LIZIZ("anchor_id", String.valueOf(l2));
        } else {
            0Zo LJ = C2182GVj.LJIIJJI.LJ(j);
            if (!(LJ == null || (pollMessage = LJ.LJFF) == null || (valueOf = String.valueOf(pollMessage.LIZIZ)) == null)) {
                str9 = valueOf;
            }
            LIZ.LIZIZ("poll_id", str9);
            if (!C1430G2l.LIZ(Boolean.valueOf(C2182GVj.LJIIJJI.LIZLLL(j)))) {
                str8 = "2";
            }
            LIZ.LIZIZ("poll_status", str8);
            if (dataChannel2 == null || (gqN2 = (C3318GqN) dataChannel2.LIZIZ(C4331HGa.class)) == null || (gqP2 = gqN2.LJFF) == null || (str5 = gqP2.LIZIZ) == null) {
                str5 = "";
            }
            LIZ.LIZIZ("enter_from_merge", str5);
            if (dataChannel2 == null || (gqN = (C3318GqN) dataChannel2.LIZIZ(C4331HGa.class)) == null || (gqP = gqN.LJFF) == null || (str6 = gqP.LIZ) == null) {
                str6 = "";
            }
            LIZ.LIZIZ("enter_method", str6);
        }
        String uri = LIZ.LJIIJ().toString();
        n.LIZIZ(uri, "");
        IHybridContainerService LIZ2 = 0cm.LIZ(IHybridContainerService.class);
        if (LIZ2 != null) {
            0ZZ.LIZ(LIZ2, r3, uri);
        }
    }

    public DialogInterface onLongPress(Context context, boolean z, Room room, C2704GgT ggT, IHostLongPressCallback iHostLongPressCallback, J7M j7m) {
        Room room2 = room;
        Context context2 = context;
        M12.LIZ(context2, room2, ggT, j7m);
        if (!0cm.LIZ(IShareService.class).shareable(room2)) {
            if (z) {
                return null;
            }
            DialogInterface openLongPressDialog = 0cm.LIZ(IWatchLiveService.class).openLongPressDialog(iHostLongPressCallback, context2, room2, ggT.LJJIFFI, ggT.LJJII, ggT.LJJJI, ggT.LJJJJL);
            logOnLongPress(z, room2, ggT);
            return openLongPressDialog;
        } else if (z) {
            1hK LIZ = C1430G2l.LIZ(context2);
            if (LIZ == null) {
                return null;
            }
            Dialog LIZJ = 0cm.LIZ(IShareService.class).share().LIZJ(LIZ, ggT, j7m);
            if (LIZJ != null) {
                INVOKEVIRTUAL_com_bytedance_android_livesdk_function_RoomFunctionService_com_ss_android_ugc_tiktok_security_lancet_DialogLancet_show(LIZJ);
            }
            logOnLongPress(z, room2, ggT);
            return LIZJ;
        } else {
            1hK LIZ2 = C1430G2l.LIZ(context2);
            if (LIZ2 == null) {
                return null;
            }
            Dialog LIZJ2 = 0cm.LIZ(IShareService.class).share().LIZJ(LIZ2, ggT, j7m);
            if (LIZJ2 != null) {
                INVOKEVIRTUAL_com_bytedance_android_livesdk_function_RoomFunctionService_com_ss_android_ugc_tiktok_security_lancet_DialogLancet_show(LIZJ2);
            }
            logOnLongPress(z, room2, ggT);
            return LIZJ2;
        }
    }
}
