package com.bytedance.android.livesdk;

import X.0CC;
import X.0HH;
import X.0Rl;
import X.0UK;
import X.0aP;
import X.0b0;
import X.0b7;
import X.0bI;
import X.0bV;
import X.0cO;
import X.0cP;
import X.0cm;
import X.0ed;
import X.0yx;
import X.1Mn;
import X.1ey;
import X.1hK;
import X.1jk;
import X.2K7;
import X.4ZZ;
import X.C1313Fz8;
import X.C2270GYt;
import X.C2311Ga8;
import X.C2331GaS;
import X.C2384GbJ;
import X.C2400GbZ;
import X.C2675Gg0;
import X.C2755GhI;
import X.C2902Gjf;
import X.C3267GpY;
import X.C3270Gpb;
import X.C3294Gpz;
import X.C3296Gq1;
import X.C3308GqD;
import X.C3310GqF;
import X.C3320GqP;
import X.C3331Gqa;
import X.C3332Gqb;
import X.C3357Gr0;
import X.C3432GsD;
import X.C3433GsE;
import X.C3436GsH;
import X.C3442GsN;
import X.C3443GsO;
import X.C3445GsQ;
import X.C3448GsT;
import X.C3454GsZ;
import X.C3458Gsd;
import X.C3464Gsj;
import X.C3465Gsk;
import X.C3476Gsv;
import X.C3486Gt5;
import X.C3489Gt8;
import X.C3491GtA;
import X.C3499GtI;
import X.C3509GtS;
import X.C3513GtW;
import X.C3527Gtk;
import X.C3533Gtq;
import X.C3548Gu5;
import X.C3551Gu8;
import X.C3593Guo;
import X.C3601Guw;
import X.C3614Gv9;
import X.C3626GvL;
import X.C3647Gvg;
import X.C3680GwD;
import X.C3694GwR;
import X.C3699GwW;
import X.C3708Gwf;
import X.C3714Gwl;
import X.C3827Gya;
import X.C3828Gyb;
import X.C3830Gyd;
import X.C3832Gyf;
import X.C3842Gyp;
import X.C3843Gyq;
import X.C3845Gys;
import X.C3945H1e;
import X.C4074H6d;
import X.C4282HEd;
import X.C4366HHj;
import X.DEF;
import X.GAX;
import X.GJ2;
import X.GVY;
import X.HEP;
import X.HEY;
import X.M12;
import X.Mjy;
import X.T3q;
import X.ToV;
import android.app.Activity;
import android.content.res.Configuration;
import android.os.Bundle;
import android.os.SystemClock;
import android.os.Vibrator;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import androidx.fragment.app.Fragment;
import androidx.viewpager.widget.PagerAdapter;
import com.bytedance.android.live.base.model.RoomStatus;
import com.bytedance.android.live.liveinteract.api.IInteractService;
import com.bytedance.android.live.livepullstream.api.IPullStreamService;
import com.bytedance.android.livesdk.chatroom.LiveOntologyInfoManager$$Lambda$0;
import com.bytedance.android.livesdk.chatroom.api.PortalApi;
import com.bytedance.android.livesdk.chatroom.ui.LivePlayFragment;
import com.bytedance.android.livesdk.list.MultiRoomIdListProvider;
import com.bytedance.android.livesdk.liveroom.RoomListener;
import com.bytedance.android.livesdk.liveroom.RoomStatusController;
import com.bytedance.android.livesdk.liveroom.RoomTaskController;
import com.bytedance.android.livesdk.livesetting.other.LiveFeedPreloadSetting;
import com.bytedance.android.livesdk.livesetting.performance.LiveEnableALogSetting;
import com.bytedance.android.livesdk.livesetting.performance.degrade.BackRoomViewOptSetting;
import com.bytedance.android.livesdk.livesetting.performance.degrade.ViewAutoPreloadOptSetting;
import com.bytedance.android.livesdk.livesetting.watchlive.EnableSlideEnterRoomOptSetting;
import com.bytedance.android.livesdk.livesetting.watchlive.LiveMtRoomSlideUpGuideSetting;
import com.bytedance.android.livesdk.livesetting.watchlive.RecommendEndAtFollowingSetting;
import com.bytedance.android.livesdk.livesetting.watchlive.firstscreen.LiveMultiPlayerEnableSetting;
import com.bytedance.android.livesdk.livesetting.watchlive.player.EnablePreDownloadLive;
import com.bytedance.android.livesdk.performance.LivePerformanceManager;
import com.bytedance.android.livesdk.rank.api.IRankService;
import com.bytedance.android.livesdk.survey.ISurveyService;
import com.bytedance.android.livesdk.ui.BaseFragment;
import com.bytedance.android.livesdk.watch.chatroom.StackContext;
import com.bytedance.android.livesdk.widget.RecommendSwipeWidget;
import com.bytedance.android.livesdkapi.depend.model.live.Room;
import com.bytedance.android.livesdkapi.host.IHostContext;
import com.bytedance.android.livesdkapi.host.IHostLog;
import com.bytedance.android.livesdkapi.host.IHostStartLiveManager;
import com.bytedance.android.livesdkapi.session.EnterRoomConfig;
import com.bytedance.android.livesdkapi.session.EnterRoomLinkSession;
import com.bytedance.android.livesdkapi.session.Event;
import com.bytedance.android.message.IMessageService;
import com.bytedance.covode.number.Covode;
import com.bytedance.ies.sdk.datachannel.DataChannelGlobal;
import com.bytedance.ies.sdk.widgets.FluencyOpt;
import com.bytedance.ies.sdk.widgets.IWidgetProvider;
import com.bytedance.ies.sdk.widgets.LiveWidgetProvider;
import com.bytedance.ies.sdk.widgets.RecyclableWidgetManager;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Objects;
import kotlin.h.b.n;
import kotlin.o.y;
import kotlin.o.z;

public class LiveRoomFragment extends BaseFragment implements C3699GwW, C3357Gr0, C2384GbJ, C3308GqD, C3828Gyb {
    public static C3436GsH LIZ;
    public static boolean LJIILJJIL = true;
    public RoomStatusController LIZIZ;
    public RoomListener LIZJ;
    public ViewGroup LIZLLL;
    public C3442GsN LJ;
    public boolean LJFF = true;
    public float LJI;
    public int LJII;
    public int LJIIIIZZ;
    public boolean LJIIIZ = true;
    public boolean LJIIJ;
    public String LJIIJJI = "";
    public String LJIIL;
    public String LJIILIIL;
    public T3q LJIILL;
    public FrameLayout LJIILLIIL;
    public C3464Gsj LJIIZILJ;
    public C3458Gsd LJIJ;
    public Runnable LJIJI;
    public C3433GsE LJIJJ;
    public 1ey LJIJJLI;
    public C3694GwR LJIL;
    public final boolean LJJ = EnableSlideEnterRoomOptSetting.INSTANCE.getValue();
    public long LJJI = 0;
    public boolean LJJIFFI = true;
    public boolean LJJII = true;
    public boolean LJJIII = false;
    public String LJJIIJ;
    public boolean LJJIIJZLJL = LiveMultiPlayerEnableSetting.INSTANCE.getValue();
    public boolean LJJIIZ = EnablePreDownloadLive.INSTANCE.isEnable();
    public Runnable LJJIIZI = null;
    public RoomTaskController LJJIJ;
    public C3443GsO LJJIJIIJI;
    public boolean LJJIJIIJIL;
    public long LJJIJIL = -1;
    public boolean LJJIJL;
    public C2331GaS LJJIJLIJ;
    public boolean LJJIL;
    public Mjy LJJIZ = new Mjy();
    public boolean LJJJ = false;
    public C3267GpY LJJJI;
    public final C3843Gyq LJJJIL = new C3647Gvg(this);
    public boolean LJJJJ = false;

    public final Fragment LIZIZ() {
        return this;
    }

    public final boolean LJIIIZ() {
        return this.LJJJJ;
    }

    public void onStop() {
        LiveRoomFragment.super.onStop();
    }

    public final void LIZ(boolean z, int i, int i2) {
        C3486Gt5 LIZIZ2;
        C3464Gsj gsj = this.LJIIZILJ;
        C3454GsZ gsZ = (gsj == null || !(gsj instanceof C3454GsZ)) ? null : (C3454GsZ) gsj;
        if (z) {
            this.LJIILIIL = C3445GsQ.LJIIIIZZ;
            this.LJIIL = C3445GsQ.LJIIIZ;
            if (gsZ != null) {
                gsZ.LIZ(C3445GsQ.LJIIL);
                gsZ.LIZIZ(C3445GsQ.LJIILIIL);
            }
        } else {
            this.LJIILIIL = C3445GsQ.LJI;
            this.LJIIL = C3445GsQ.LJII;
            if (gsZ != null) {
                gsZ.LIZ(C3445GsQ.LJIIJ);
                gsZ.LIZIZ(C3445GsQ.LJIIJJI);
            }
        }
        C3320GqP gqP = (C3320GqP) DataChannelGlobal.LIZLLL.LIZIZ(C4282HEd.class);
        if (gqP != null) {
            gqP.LIZIZ = this.LJIILIIL;
            gqP.LIZ = this.LJIIL;
        }
        C3270Gpb.LJIILJJIL.LIZ(this.LJIIL, this.LJIILIIL);
        if (i2 == 1) {
            this.LJIIJJI = "click";
        }
        C3458Gsd gsd = this.LJIJ;
        if (gsd != null && i <= gsd.LIZIZ() && (LIZIZ2 = this.LJIJ.LIZIZ(i)) != null && LIZIZ2.LJJIIJZLJL() != null && LIZIZ2.LJJIIJZLJL().LIZLLL != null) {
            LIZIZ2.LJJIIJZLJL().LIZLLL.LJJJJJ = this.LJIIL;
            LIZIZ2.LJJIIJZLJL().LIZLLL.LJJJJI = this.LJIILIIL;
        }
    }

    public final void LIZ(String str) {
        C3486Gt5 LIZJ2 = LIZJ();
        if (LIZJ2 != null) {
            C3331Gqa LJIILJJIL2 = LIZJ2.LJIILJJIL();
            if (LJIILJJIL2 == C3331Gqa.LIVE_STARTED || LJIILJJIL2 == C3331Gqa.DETACHED) {
                GAX.LIZ.LIZ();
                C3436GsH gsH = LIZ;
                if (gsH != null) {
                    gsH.LIZ(LIZJ2.LJJIIJZLJL());
                }
                C3296Gq1.LIZ.LIZ(str);
                if (LJIILJJIL2 == C3331Gqa.LIVE_STARTED) {
                    return;
                }
            }
            if (this.LJJIL) {
                this.LJJIL = false;
                LJIL();
            } else if (TextUtils.equals(str, "click")) {
                LIZJ2.LJIIZILJ();
            } else {
                C3433GsE gsE = this.LJIJJ;
                if (gsE != null) {
                    gsE.LIZ(gsE.LIZJ, LIZJ2);
                }
            }
        }
    }

    public final boolean LIZ(long j) {
        C3464Gsj gsj = this.LJIIZILJ;
        if (gsj == null || gsj.LIZIZ() == null || this.LJIIZILJ.LIZIZ().size() <= 1) {
            return false;
        }
        for (Room next : this.LJIIZILJ.LIZIZ()) {
            if (next != null && j == next.getId()) {
                this.LJIIZILJ.LIZ(j);
                return true;
            }
        }
        return false;
    }

    public final boolean LIZ(int i, int i2) {
        C3464Gsj gsj;
        C3445GsQ gsQ = C3445GsQ.LJIILL;
        if (gsQ.LIZIZ(gsQ.LIZJ()) && (gsj = this.LJIIZILJ) != null && i >= 0 && i < gsj.LIZ() && i2 >= 0 && i2 < this.LJIIZILJ.LIZ()) {
            EnterRoomConfig LIZ2 = LIZ(i);
            EnterRoomConfig LIZ3 = LIZ(i2);
            String str = LIZ2.LIZLLL.LJZL;
            String str2 = LIZ3.LIZLLL.LJZL;
            if (!TextUtils.isEmpty(str)) {
                Iterator<String> it = C3445GsQ.LJIILJJIL.iterator();
                while (true) {
                    if (!it.hasNext()) {
                        break;
                    }
                    String next = it.next();
                    if (str != null && z.LIZ(str, next, false)) {
                        break;
                    }
                }
            }
            if (str2 == null || !z.LIZ(str2, "follow_live_empty_loadmore", false)) {
                return false;
            }
            return true;
        }
        return false;
    }

    public final void LIZ(EnterRoomConfig enterRoomConfig) {
        if (getActivity() != null && this.LJIILL != null && this.LJIIZILJ != null && LIZJ() != null) {
            LIZJ();
            if (LIZJ().LJJIIJZLJL() != null) {
                EnterRoomConfig LJJIIJZLJL2 = LIZJ().LJJIIJZLJL();
                if (!(LJJIIJZLJL2 == null || LJJIIJZLJL2.LIZLLL.LJJJI == null || LJJIIJZLJL2.LIZLLL.LJJJI.length <= 0)) {
                    LJJIIJZLJL2.LIZLLL.LJJJZ = this.LJIILL.getCurrentItem();
                }
                if (LIZJ().LJJIJIIJI() != null) {
                    StackContext stackContext = new StackContext();
                    stackContext.setActivityHashCode(getActivity().hashCode());
                    C3533Gtq.LIZ.LIZ((Activity) getActivity()).LIZ(LJJIIJZLJL2, enterRoomConfig, stackContext);
                }
            }
        }
    }

    public final boolean LIZ(Fragment fragment) {
        if (!(this.LJIJJ == null || LIZJ() == null || fragment == null)) {
            boolean z = this.LJIJJ.LIZIZ == 0;
            boolean z2 = LIZJ() == fragment;
            if (!z || !z2) {
                return false;
            }
            return true;
        }
        return false;
    }

    public final C3827Gya LIZLLL() {
        return this.LIZJ.getRoomAction();
    }

    public final C3714Gwl LJ() {
        return this.LIZJ.getRoomEventListener();
    }

    static {
        Covode.recordClassIndex(11223);
    }

    private boolean LJJ() {
        return 0cm.LIZ(IInteractService.class).isInteracting();
    }

    public static boolean LJJI() {
        try {
            return 2K7.LIZ.LIZJ();
        } catch (Exception unused) {
            return false;
        }
    }

    public final void LJIIL() {
        FrameLayout frameLayout = this.LJIILLIIL;
        if (frameLayout != null) {
            frameLayout.setBackgroundColor(0);
        }
    }

    public final String LJIIZILJ() {
        return GAX.LIZ.LIZ().LIZIZ.LIZLLL.LJJJJI;
    }

    public final String LJIJ() {
        return GAX.LIZ.LIZ().LIZIZ.LIZLLL.LJJJJJ;
    }

    public final void LJIJI() {
        if (LIZJ() != null) {
            LIZJ().LJJIJIL();
        }
    }

    private void LJIL() {
        T3q t3q;
        if (this.LJIJI != null && (t3q = this.LJIILL) != null && !this.LJJIL) {
            t3q.post(new C3626GvL(this));
        }
    }

    public final String LIZ() {
        return LJIIZILJ() + "_" + LJIJ();
    }

    public final C3486Gt5 LIZJ() {
        C3458Gsd gsd = this.LJIJ;
        if (gsd == null || gsd.LIZIZ() == 0) {
            return null;
        }
        return this.LJIJ.LIZIZ(this.LJIILL.getCurrentItem());
    }

    public final boolean LJI() {
        C3486Gt5 LIZJ2 = LIZJ();
        if (LIZJ2 == null || !LIZJ2.LJIIIIZZ()) {
            return LJIIJ();
        }
        return true;
    }

    public final boolean LJIIIIZZ() {
        if (this.LJIIZILJ.LIZ() <= 1) {
            return false;
        }
        LiveMtRoomSlideUpGuideSetting.INSTANCE.getValue().isGuideEnable(LIZ());
        return false;
    }

    public final boolean LJIIJ() {
        C3442GsN gsN = this.LJ;
        if (gsN != null && gsN.LIZ("draw")) {
            return true;
        }
        C3443GsO gsO = this.LJJIJIIJI;
        if (gsO == null || !gsO.LIZ("draw")) {
            return false;
        }
        return true;
    }

    public final void LJIIJJI() {
        boolean z;
        T3q t3q = this.LJIILL;
        if (t3q != null) {
            if (this.LJJIJIIJIL || this.LJJJJ || LJJ()) {
                z = false;
            } else {
                z = true;
            }
            t3q.setEnabled(z);
        }
    }

    public final void LJIILIIL() {
        Object LIZ2 = this.LJIJ.LIZ(this.LJIILL, this.LJIILL.getCurrentItem());
        if (LIZ2 instanceof LivePlayFragment) {
            ((LivePlayFragment) LIZ2).LJJIJIIJIL = true;
        }
    }

    public final void LJIILJJIL() {
        int i = RecommendEndAtFollowingSetting.INSTANCE.getValue().LIZ;
        if (i == 2 || i == 3) {
            this.LJIILL.LIZ(1.0f, true);
        }
    }

    public final void LJIILLIIL() {
        if (getActivity() != null) {
            getActivity().getIntent().putExtra("has_page_slide", true);
        }
    }

    public final boolean LJIJJ() {
        if (!"live_merge".equals(LJIIZILJ()) || !"live_cover".equals(LJIJ())) {
            return false;
        }
        return true;
    }

    public final void LJIJJLI() {
        GAX.LIZ.LIZ().LIZ(new Event("live_room_auto_page_down", 264, C3332Gqb.BussinessApiCall));
        this.LJIILL.LIZJ();
    }

    public void onResume() {
        super.onResume();
        GJ2.AUDIENCE.config();
        LJIL();
        this.LJJJ = false;
        1ey r0 = this.LJIJJLI;
        if (r0 != null) {
            r0.LJFF(false);
        }
    }

    public final void LJFF() {
        C2400GbZ.LIZIZ().LIZIZ("invite_issue_check", "LinkIn_Guest_resetViews");
        C3486Gt5 LIZJ2 = LIZJ();
        if (LIZJ2 != null) {
            LIZJ2.LJII();
        }
        try {
            this.LJIILL.setAdapter((PagerAdapter) null);
        } catch (Exception e) {
            0HH.LIZ(e);
        }
        C3458Gsd gsd = this.LJIJ;
        if (gsd != null) {
            gsd.LIZLLL();
            this.LJIJ = null;
        }
        C3464Gsj gsj = this.LJIIZILJ;
        if (gsj != null) {
            gsj.LIZJ();
            this.LJIIZILJ = null;
        }
    }

    public final String LJIILL() {
        if (this.LJIILL == null || this.LJIIZILJ == null || !0cm.LIZ(IHostContext.class).isOffline() || LIZJ() == null || LIZJ().LJJIJIIJI() == null) {
            return "";
        }
        return this.LJIIZILJ.LIZIZ(LIZJ().LJJIJIIJI().getId());
    }

    public void onDestroyView() {
        super.onDestroyView();
        C3445GsQ.LIZIZ = false;
        C3445GsQ.LIZJ = false;
        C3445GsQ.LIZ.clear();
        C3445GsQ.LIZLLL = null;
        C3445GsQ.LJ = 0;
        C3445GsQ.LJFF = "";
        C3445GsQ.LJI = "";
        C3445GsQ.LJII = "";
        C3445GsQ.LJIIIIZZ = "";
        C3445GsQ.LJIIIZ = "";
        C3445GsQ.LJIIJ = "";
        C3445GsQ.LJIIJJI = "";
        C3445GsQ.LJIIL = "";
        C3445GsQ.LJIILIIL = "";
    }

    /* renamed from: com.bytedance.android.livesdk.LiveRoomFragment$3  reason: invalid class name */
    public static /* synthetic */ class AnonymousClass3 {
        public static final /* synthetic */ int[] LIZ;

        /* JADX WARNING: Can't wrap try/catch for region: R(10:0|1|2|3|4|5|6|7|8|(3:9|10|12)) */
        /* JADX WARNING: Failed to process nested try/catch */
        /* JADX WARNING: Missing exception handler attribute for start block: B:3:0x0017 */
        /* JADX WARNING: Missing exception handler attribute for start block: B:5:0x0022 */
        /* JADX WARNING: Missing exception handler attribute for start block: B:7:0x002d */
        /* JADX WARNING: Missing exception handler attribute for start block: B:9:0x0038 */
        static {
            /*
                r0 = 11228(0x2bdc, float:1.5734E-41)
                com.bytedance.covode.number.Covode.recordClassIndex(r0)
                X.GtY[] r0 = X.C3515GtY.values()
                int r0 = r0.length
                int[] r2 = new int[r0]
                LIZ = r2
                X.GtY r0 = X.C3515GtY.WAIT     // Catch:{ NoSuchFieldError -> 0x0017 }
                int r1 = r0.ordinal()     // Catch:{ NoSuchFieldError -> 0x0017 }
                r0 = 1
                r2[r1] = r0     // Catch:{ NoSuchFieldError -> 0x0017 }
            L_0x0017:
                int[] r2 = LIZ     // Catch:{ NoSuchFieldError -> 0x0022 }
                X.GtY r0 = X.C3515GtY.WAIT_LOADING_FINISH_TO_PAGE_DOWN     // Catch:{ NoSuchFieldError -> 0x0022 }
                int r1 = r0.ordinal()     // Catch:{ NoSuchFieldError -> 0x0022 }
                r0 = 2
                r2[r1] = r0     // Catch:{ NoSuchFieldError -> 0x0022 }
            L_0x0022:
                int[] r2 = LIZ     // Catch:{ NoSuchFieldError -> 0x002d }
                X.GtY r0 = X.C3515GtY.PAGE_DOWN     // Catch:{ NoSuchFieldError -> 0x002d }
                int r1 = r0.ordinal()     // Catch:{ NoSuchFieldError -> 0x002d }
                r0 = 3
                r2[r1] = r0     // Catch:{ NoSuchFieldError -> 0x002d }
            L_0x002d:
                int[] r2 = LIZ     // Catch:{ NoSuchFieldError -> 0x0038 }
                X.GtY r0 = X.C3515GtY.EXIT_ROOM     // Catch:{ NoSuchFieldError -> 0x0038 }
                int r1 = r0.ordinal()     // Catch:{ NoSuchFieldError -> 0x0038 }
                r0 = 4
                r2[r1] = r0     // Catch:{ NoSuchFieldError -> 0x0038 }
            L_0x0038:
                int[] r2 = LIZ     // Catch:{ NoSuchFieldError -> 0x0043 }
                X.GtY r0 = X.C3515GtY.DELETE_CURRENT_ROOM     // Catch:{ NoSuchFieldError -> 0x0043 }
                int r1 = r0.ordinal()     // Catch:{ NoSuchFieldError -> 0x0043 }
                r0 = 5
                r2[r1] = r0     // Catch:{ NoSuchFieldError -> 0x0043 }
            L_0x0043:
                return
            */
            throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.livesdk.LiveRoomFragment.AnonymousClass3.<clinit>():void");
        }
    }

    public void onPause() {
        int currentItem;
        LIZ((MotionEvent) null);
        if (getActivity() != null && getActivity().isFinishing()) {
            if ((this.LJIIZILJ instanceof C3845Gys) && (currentItem = this.LJIILL.getCurrentItem()) >= 0 && currentItem < this.LJIIZILJ.LIZ()) {
                this.LJIIZILJ.LIZ(currentItem);
            }
            0cm.LIZ(IMessageService.class).releaseAll();
            if (this.LJJIJL) {
                this.LJJIJL = false;
            } else {
                DataChannelGlobal.LIZLLL.LIZJ(HEP.class);
            }
        }
        super.onPause();
        C3499GtI LIZ2 = C3499GtI.LIZ();
        1hK activity = getActivity();
        if (activity != null && activity.hashCode() == LIZ2.LIZJ && activity.isFinishing()) {
            LIZ2.LIZ = false;
            LIZ2.LIZIZ = null;
        }
    }

    public final void LJII() {
        C3458Gsd gsd;
        int i;
        String str;
        int currentItem = this.LJIILL.getCurrentItem();
        if (currentItem >= 0 && (gsd = this.LJIJ) != null) {
            int LIZIZ2 = gsd.LIZIZ() - currentItem;
            C3680GwD value = LiveFeedPreloadSetting.INSTANCE.getValue();
            if (value == null || (i = value.LIZJ) <= 0) {
                i = 2;
            }
            if (LIZIZ2 > i) {
                return;
            }
            if (this.LJIIZILJ.LJ()) {
                this.LJIIZILJ.LIZIZ(currentItem);
                return;
            }
            this.LJIIIZ = false;
            if (C3445GsQ.LJIILL.LIZ()) {
                C3464Gsj gsj = this.LJIIZILJ;
                if (gsj instanceof C3454GsZ) {
                    C3454GsZ gsZ = (C3454GsZ) gsj;
                    C3445GsQ gsQ = C3445GsQ.LJIILL;
                    String str2 = gsZ.LJIIIIZZ;
                    String str3 = gsZ.LJIIIZ;
                    M12.LIZ(str2, str3);
                    C3445GsQ.LJIIJ = str2;
                    C3445GsQ.LJIIJJI = str3;
                    C3445GsQ.LJIIL = "follow_live_empty";
                    C3445GsQ.LJIILIIL = "36";
                    C3445GsQ.LJI = C3270Gpb.LJIIJJI;
                    C3445GsQ.LJII = C3270Gpb.LJIIL;
                    String LIZIZ3 = gsQ.LIZIZ();
                    if (RecommendEndAtFollowingSetting.INSTANCE.getValue().LIZLLL.contains(LIZIZ3)) {
                        if (y.LIZIZ(LIZIZ3, "homepage_follow_", false)) {
                            str = "homepage_follow";
                        } else if (y.LIZIZ(LIZIZ3, "message_", false)) {
                            str = "message";
                        } else if (y.LIZIZ(LIZIZ3, "push_", false)) {
                            str = "push";
                        } else if (y.LIZIZ(LIZIZ3, "inner_push_", false)) {
                            str = "inner_push";
                        }
                        C3445GsQ.LJIIIZ = str;
                        C3445GsQ.LJIIIIZZ = "follow_recommend";
                        C3445GsQ.LJ = System.currentTimeMillis();
                        gsZ.LIZ("follow_live_empty");
                        gsZ.LIZIZ("36");
                        this.LJIIZILJ.LIZIZ(currentItem);
                    }
                    str = C3270Gpb.LJIIJJI;
                    C3445GsQ.LJIIIZ = str;
                    C3445GsQ.LJIIIIZZ = "follow_recommend";
                    C3445GsQ.LJ = System.currentTimeMillis();
                    gsZ.LIZ("follow_live_empty");
                    gsZ.LIZIZ("36");
                    this.LJIIZILJ.LIZIZ(currentItem);
                }
            }
        }
    }

    public void onDestroy() {
        super.onDestroy();
        C3509GtS LIZ2 = C3509GtS.LIZ();
        for (C3593Guo guo : LIZ2.LIZ.values()) {
            guo.LIZ.clear();
        }
        LIZ2.LIZ.clear();
        0bV.LIZ().removeCallbacksAndMessages((Object) null);
        0ed.LIZ().removeCallbacksAndMessages((Object) null);
        ToV.LJ.LJIIIIZZ();
        1Mn.LIZJ();
        C3465Gsk.LIZJ.LIZ("live_room_ctr").LIZ.clear();
        C3310GqF.LJIIJJI.LIZ().LIZJ = true;
        0cm.LIZ(ISurveyService.class).release();
        C3448GsT.LIZIZ().LIZJ();
        C3533Gtq gtq = C3533Gtq.LIZ;
        1hK activity = getActivity();
        if (activity != null && activity.isFinishing()) {
            gtq.LIZ().remove(Integer.valueOf(activity.hashCode()));
        }
        0aP.LIZ(3, "LiveBackRoomStack", "destroyBackRoomStack for " + activity + ", remaining cnt: " + gtq.LIZ().size());
        0cm.LIZ(IInteractService.class).removeInteractStateChangeListener(this.LJJJIL);
        C3464Gsj gsj = this.LJIIZILJ;
        if (gsj instanceof C3454GsZ) {
            ((C3454GsZ) gsj).LJI();
        }
        if (C3533Gtq.LIZ.LIZ((Activity) getActivity()).LIZ() == null && !this.LJJJ) {
            0UK.LJII.LIZLLL();
        }
        if (this.LJJJ || getActivity() == null || getActivity().getLifecycle().LIZ().isAtLeast(0CC.INITIALIZED)) {
            1hK activity2 = getActivity();
            if (activity2 != null) {
                activity2.getLifecycle().LIZ(new LiveRoomFragment$$Lambda$6(this, activity2));
            }
        } else {
            LJFF();
            if (this.LJIL.LIZIZ() == this.LJIIZILJ) {
                this.LJIL.LIZ();
            }
        }
        0cm.LIZ(IPullStreamService.class).getLivePlayControllerManager().LIZ(0cm.LIZ(IHostContext.class).context());
        LiveWidgetProvider.getInstance().clear();
        LivePerformanceManager.getInstance().onModuleStop("stream");
        LivePerformanceManager.getInstance().reportBatteryDrainage();
        LivePerformanceManager.getInstance().onExitRoom();
        LivePerformanceManager.getInstance().stopTimerMonitor();
        LivePerformanceManager.getInstance().release();
        String str = this.LJJIIJ;
        1ey r0 = this.LJIJJLI;
        if (r0 != null) {
            r0.LIZLLL();
            if (str != null) {
                C3294Gpz.LIZ("LiveRoomFragment", "onDestroy -> stop Play. playerTag:".concat(String.valueOf(str)));
                this.LJIJJLI.LIZ(true, str, "onDestroy");
                0cm.LIZ(IPullStreamService.class).stopRoomPlayer(str, false);
                0cm.LIZ(IPullStreamService.class).recycleRoomPlayer(str);
            }
            this.LJIJJLI.LJIJI();
        }
        if (this.LJJIJIL > 0) {
            this.LJJIJIL = 0;
        }
        if ((getActivity() instanceof C3842Gyp) && !this.LJJJ) {
            getActivity();
        }
        if (this.LJ != null) {
            this.LJ = null;
        }
        C3433GsE gsE = this.LJIJJ;
        if (gsE != null) {
            gsE.LIZ = null;
            this.LJIJJ = null;
            this.LJIJI = null;
        }
        DataChannelGlobal.LIZLLL.LIZIZ((Object) this);
        DataChannelGlobal.LIZLLL.LIZJ(C4282HEd.class);
        DataChannelGlobal.LIZLLL.LIZJ(HEY.class);
        Mjy mjy = this.LJJIZ;
        if (mjy != null && !mjy.isDisposed()) {
            this.LJJIZ.dispose();
            this.LJJIZ = null;
        }
        C3513GtW.LIZ.clear();
        C3513GtW.LIZIZ.clear();
        C4074H6d.LIZ.LIZJ();
        C3945H1e.LIZ.clear();
    }

    public final Room LIZIZ(int i) {
        return this.LJIIZILJ.LIZJ(i);
    }

    public final EnterRoomConfig LIZ(int i) {
        return this.LJIIZILJ.LIZ(i);
    }

    public final boolean LIZIZ(boolean z) {
        if (z) {
            T3q t3q = this.LJIILL;
            if (t3q != null) {
                return t3q.LIZJ();
            }
            return false;
        } else if (this.LJIJJ.LIZJ + 1 >= this.LJIIZILJ.LIZ()) {
            return false;
        } else {
            return true;
        }
    }

    public final void LIZ(boolean z) {
        this.LJJJJ = z;
        LJIIJJI();
    }

    public final boolean LIZIZ(long j) {
        C3464Gsj gsj;
        int i;
        T3q t3q;
        C3433GsE gsE = this.LJIJJ;
        if (gsE != null && (gsj = this.LJIIZILJ) != null && !(gsj instanceof C3830Gyd) && !(gsj instanceof MultiRoomIdListProvider)) {
            int i2 = gsE.LIZJ;
            if (this.LJFF) {
                i = i2 + 1;
            } else {
                i = i2 - 1;
            }
            if (i >= 0 && i < this.LJIIZILJ.LIZ() && (t3q = this.LJIILL) != null) {
                t3q.LIZ(i, true);
                this.LJIILL.postDelayed(new C3614Gv9(this, j), 100);
                return true;
            }
        }
        return false;
    }

    public final void LIZJ(boolean z) {
        T3q t3q;
        this.LJJIIZI = new C3432GsD(this);
        C3458Gsd gsd = this.LJIJ;
        if (gsd == null) {
            return;
        }
        if ((z || gsd.LIZIZ() > 1) && (t3q = this.LJIILL) != null) {
            t3q.post(this.LJJIIZI);
        }
    }

    public void onConfigurationChanged(Configuration configuration) {
        boolean z;
        C3442GsN gsN;
        LiveRoomFragment.super.onConfigurationChanged(configuration);
        if (configuration.orientation == 2) {
            z = true;
        } else {
            z = false;
        }
        this.LJJIJIIJIL = z;
        LJIIJJI();
        if (getActivity() != null && (gsN = this.LJ) != null) {
            int i = configuration.orientation;
            if (gsN.LIZ == null) {
                return;
            }
            if (i == 1) {
                gsN.LIZ(false);
            } else {
                gsN.LIZ(true);
            }
        }
    }

    public final void LIZ(MotionEvent motionEvent) {
        C3486Gt5 LIZJ2 = LIZJ();
        if (LIZJ2 instanceof LivePlayFragment) {
            LivePlayFragment livePlayFragment = (LivePlayFragment) LIZJ2;
            if (motionEvent == null) {
                this.LJIILL.LIZ(1.0f, true);
                livePlayFragment.LJJIL();
                livePlayFragment.LJJIZ();
            } else if (motionEvent.getAction() == 1) {
                livePlayFragment.LIZ(Math.abs(motionEvent.getY() - this.LJI) / ((float) 0b0.LIZ(getActivity()).heightPixels));
                livePlayFragment.LJJIL();
                livePlayFragment.LJJIZ();
            }
        }
    }

    public final void LIZ(RoomStatus roomStatus) {
        C3464Gsj gsj = this.LJIIZILJ;
        if (gsj instanceof C3830Gyd) {
            M12.LIZ(roomStatus);
            HashMap hashMap = new HashMap();
            hashMap.put("roomId", String.valueOf(roomStatus.LIZ));
            hashMap.put("anchorId", String.valueOf(roomStatus.LIZIZ));
            hashMap.put("countOfWatchUsers", String.valueOf(roomStatus.LIZLLL));
            hashMap.put("isFinish", String.valueOf(roomStatus.LIZJ));
            C3832Gyf gyf = ((C3830Gyd) gsj).LIZJ;
            if (gyf != null) {
                gyf.LIZ((Map<String, String>) hashMap);
            }
        }
    }

    public void onCreate(Bundle bundle) {
        GJ2.AUDIENCE.config();
        LiveEnableALogSetting.INSTANCE.update();
        1Mn.LIZ();
        1Mn.LIZIZ();
        C3270Gpb.LJIIJ = false;
        C3310GqF.LJIIJJI.LIZ().LIZJ = false;
        String LIZ2 = LIZ();
        if (LiveMtRoomSlideUpGuideSetting.INSTANCE.getValue().isGuideEnable(LIZ2)) {
            C3448GsT LIZIZ2 = C3448GsT.LIZIZ();
            LIZIZ2.LIZJ();
            LIZIZ2.LIZ = true;
            LIZIZ2.LJII = LIZ2;
            C2311Ga8.LIZ().LJ();
            C2311Ga8.LIZ().LIZ.observeForever(LIZIZ2);
        }
        this.LJJI = System.currentTimeMillis();
        0cP.LIZIZ(0cO.StartLivePlay);
        HashMap hashMap = new HashMap();
        long elapsedRealtime = SystemClock.elapsedRealtime();
        super.onCreate((Bundle) null);
        hashMap.put("time", String.valueOf(SystemClock.elapsedRealtime() - elapsedRealtime));
        hashMap.put("location", "live detail after super oncreate");
        0cm.LIZ(IHostLog.class).LIZ("feed_enter_room", hashMap);
        this.LJJJI = new C3267GpY();
        this.LJIL = C2902Gjf.LIZ;
        this.LJJIIJ = GAX.LIZ.LIZ().LIZIZ.LIZLLL.LJJIJLIJ;
        1ey LIZIZ3 = 0cm.LIZ(IPullStreamService.class).getLivePlayControllerManager().LIZIZ(this.LJJIIJ);
        this.LJIJJLI = LIZIZ3;
        if (LIZIZ3 != null) {
            LIZIZ3.LIZJ();
        }
        0cm.LIZ(IInteractService.class).registerInteractStateChangeListener(this.LJJJIL);
        0cm.LIZ(IPullStreamService.class).getDnsOptimizer().LIZ();
        0cm.LIZ(IPullStreamService.class).getLiveStreamStrategy().LIZ();
        RoomListener roomListener = new RoomListener(this);
        this.LIZJ = roomListener;
        if (roomListener.initRoomEnvironment()) {
            this.LIZIZ = new RoomStatusController(this);
            this.LJJIJ = new RoomTaskController();
            getLifecycle().LIZ(this.LIZIZ);
            getLifecycle().LIZ(this.LJJIJ);
            C3499GtI LIZ3 = C3499GtI.LIZ();
            1hK activity = getActivity();
            EnterRoomConfig enterRoomConfig = GAX.LIZ.LIZ().LIZIZ;
            if (activity != null) {
                LIZ3.LIZ = true;
                LIZ3.LIZIZ = new C3489Gt8(LIZ3, enterRoomConfig);
                LIZ3.LIZJ = activity.hashCode();
                if (LIZ3.LIZLLL == null) {
                    LIZ3.LIZLLL = new LiveOntologyInfoManager$$Lambda$0(LIZ3);
                    activity.getLifecycle().LIZ(LIZ3.LIZLLL);
                }
            }
            Mjy mjy = this.LJJIZ;
            if (mjy != null) {
                mjy.LIZ(C2675Gg0.LIZ().LIZ(C2270GYt.class).LIZLLL(new C2755GhI(this)));
                this.LJJIZ.LIZ(C2675Gg0.LIZ().LIZ(GVY.class).LIZLLL(new C3551Gu8(this)));
                this.LJJIZ.LIZ(C2675Gg0.LIZ().LIZ(C3708Gwf.class).LIZLLL(new C3476Gsv(this)));
            }
            if (!(getActivity() == null || getActivity().getRequestedOrientation() == 1 || bundle != null)) {
                C1313Fz8.LIZ(0b0.LJ(), 2131830504);
            }
            if (0cm.LIZ(IRankService.class).getRankOptOutPresenter() != null) {
                0cm.LIZ(IRankService.class).getRankOptOutPresenter().LIZ();
            }
            C3465Gsk.LIZJ.LIZ("live_room_ctr").LIZ(this, 1);
            0cm.LIZ(IHostContext.class).trafficDeteriorationAB(5);
        }
    }

    /* JADX WARNING: Code restructure failed: missing block: B:75:0x01eb, code lost:
        if (com.bytedance.android.livesdk.livesetting.watchlive.LiveFeedInnerStyleSetting.INSTANCE.getValue() != 0) goto L_0x01ed;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:80:0x0209, code lost:
        if (com.bytedance.android.livesdk.live.model.LiveFeedDraw.isEnable(r2.LJIILIIL, r2.LJIIL) != false) goto L_0x01ed;
     */
    /* JADX WARNING: Code restructure failed: missing block: B:82:0x0215, code lost:
        if (X.C3482Gt1.LJIIIZ.LIZ().LIZ() != false) goto L_0x01ed;
     */
    /* JADX WARNING: Removed duplicated region for block: B:100:0x0266  */
    /* JADX WARNING: Removed duplicated region for block: B:105:0x027b  */
    /* JADX WARNING: Removed duplicated region for block: B:108:0x0282  */
    /* JADX WARNING: Removed duplicated region for block: B:114:0x02c9  */
    /* JADX WARNING: Removed duplicated region for block: B:171:0x0418  */
    /* JADX WARNING: Removed duplicated region for block: B:56:0x0194  */
    /* JADX WARNING: Removed duplicated region for block: B:59:0x01a4  */
    /* JADX WARNING: Removed duplicated region for block: B:85:0x021e A[SYNTHETIC, Splitter:B:85:0x021e] */
    /* JADX WARNING: Removed duplicated region for block: B:89:0x022d  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public void onActivityCreated(android.os.Bundle r21) {
        /*
            r20 = this;
            r2 = r20
            r2 = r2
            r0 = r21
            com.bytedance.android.livesdk.LiveRoomFragment.super.onActivityCreated(r0)
            X.1hK r0 = r2.getActivity()
            r5 = 0
            if (r0 == 0) goto L_0x0038
            X.1hK r0 = r2.getActivity()
            boolean r0 = X.0bM.LIZ(r0)
            if (r0 == 0) goto L_0x0026
            X.1hK r0 = r2.getActivity()
            android.view.Window r1 = r0.getWindow()
            r0 = 48
            r1.setSoftInputMode(r0)
        L_0x0026:
            r2.LJJIJIIJIL = r5
            r2.LJIIJJI()
            X.1hK r0 = r2.getActivity()
            android.view.Window r1 = r0.getWindow()
            r0 = 128(0x80, float:1.794E-43)
            r1.addFlags(r0)
        L_0x0038:
            X.Glf r1 = X.GAX.LIZ
            java.lang.String r0 = r1.LIZ
            r1.LIZIZ = r0
            X.Glf r0 = X.GAX.LIZ
            com.bytedance.android.livesdkapi.session.EnterRoomLinkSession r0 = r0.LIZ()
            com.bytedance.android.livesdkapi.session.EnterRoomConfig r1 = r0.LIZIZ
            r2.LJFF()
            X.H7d r0 = X.C4100H7d.LIZ()
            X.Glh r0 = r0.LIZIZ()
            r18 = 0
            if (r0 == 0) goto L_0x0498
            X.H7d r0 = X.C4100H7d.LIZ()
            X.Glh r0 = r0.LIZIZ()
            long r11 = r0.LIZJ()
        L_0x0061:
            java.lang.String r8 = "error"
            java.lang.String r0 = "room_fg_enter_room_fail"
            r4 = 1
            int r3 = (r11 > r18 ? 1 : (r11 == r18 ? 0 : -1))
            if (r3 <= 0) goto L_0x0106
            com.bytedance.ies.sdk.datachannel.DataChannelGlobal r6 = com.bytedance.ies.sdk.datachannel.DataChannelGlobal.LIZLLL
            java.lang.Class<X.HEP> r3 = X.HEP.class
            java.lang.Object r7 = r6.LIZIZ(r3)
            com.bytedance.android.livesdkapi.depend.model.live.Room r7 = (com.bytedance.android.livesdkapi.depend.model.live.Room) r7
            if (r7 == 0) goto L_0x0106
            com.bytedance.android.live.base.model.user.User r3 = r7.getOwner()
            if (r3 == 0) goto L_0x0106
            com.bytedance.android.live.base.model.user.User r3 = r7.getOwner()
            long r9 = r3.getId()
            int r3 = (r9 > r11 ? 1 : (r9 == r11 ? 0 : -1))
            if (r3 != 0) goto L_0x0106
            X.1hK r3 = r2.getActivity()
            r5 = 2131834057(0x7f1134c9, float:1.9301214E38)
            if (r3 == 0) goto L_0x009c
            android.content.Context r6 = r3.getApplicationContext()
            boolean r3 = X.7lW.LIZJ
            if (r3 != 0) goto L_0x0100
        L_0x0099:
            X.C1313Fz8.LIZ((android.content.Context) r6, (int) r5)
        L_0x009c:
            r2.LJJIJL = r4
            r4 = 123(0x7b, float:1.72E-43)
            java.lang.String r3 = r2.getString(r5)
            r2.LIZ((int) r4, (java.lang.String) r3)
            X.GsH r9 = LIZ
            if (r9 == 0) goto L_0x00b9
            java.lang.String r11 = java.lang.String.valueOf(r11)
            long r12 = r7.getId()
            java.lang.String r14 = "user_is_broadcasting"
            r10 = r1
            r9.LIZ(r10, r11, r12, r14)
        L_0x00b9:
            com.bytedance.android.livesdkapi.session.Event r4 = new com.bytedance.android.livesdkapi.session.Event
            r3 = 33027(0x8103, float:4.628E-41)
            X.Gqb r1 = X.C3332Gqb.BussinessApiCall
            r4.<init>(r0, r3, r1)
            java.lang.String r0 = X.0b0.LIZ(r5)
            r4.LIZ(r0)
            X.Glf r0 = X.GAX.LIZ
            com.bytedance.android.livesdkapi.session.EnterRoomLinkSession r0 = r0.LIZ()
            r0.LIZ((com.bytedance.android.livesdkapi.session.Event) r4)
            com.bytedance.android.livesdk.liveroom.RoomListener r0 = r2.LIZJ
            X.Gya r0 = r0.getRoomAction()
            r0.LIZ(r8)
        L_0x00dc:
            com.bytedance.android.livesdk.liveroom.RoomStatusController r1 = r2.LIZIZ
            if (r1 == 0) goto L_0x00e5
            X.Gsj r0 = r2.LJIIZILJ
            r1.setListProvider(r0)
        L_0x00e5:
            X.GsN r0 = r2.LJ
            if (r0 == 0) goto L_0x00f0
            android.view.ViewGroup r1 = r0.LIZJ
            r0 = 8
            X.C5112HeD.LIZ((android.view.View) r1, (int) r0)
        L_0x00f0:
            com.bytedance.android.livesdk.chatroom.helper.AudienceOrientationManager.start()
            com.bytedance.ies.sdk.datachannel.DataChannelGlobal r3 = com.bytedance.ies.sdk.datachannel.DataChannelGlobal.LIZLLL
            java.lang.Class<X.HGO> r1 = X.HGO.class
            X.Gu7 r0 = new X.Gu7
            r0.<init>(r2)
            r3.LIZ(r2, r2, r1, r0)
            return
        L_0x0100:
            if (r6 == 0) goto L_0x0103
            goto L_0x0099
        L_0x0103:
            android.app.Application r6 = X.7lW.LIZ
            goto L_0x0099
        L_0x0106:
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            java.lang.String r7 = r3.LJJLI
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            java.lang.String r3 = r3.LJJJJI
            r2.LJIILIIL = r3
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            java.lang.String r3 = r3.LJJJJJ
            r2.LJIIL = r3
            java.lang.String r3 = "live"
            boolean r3 = android.text.TextUtils.equals(r7, r3)
            if (r3 != 0) goto L_0x0129
            java.lang.Class<com.bytedance.android.livesdk.watch.IWatchLiveService> r3 = com.bytedance.android.livesdk.watch.IWatchLiveService.class
            X.0UT r3 = X.0cm.LIZ(r3)
            com.bytedance.android.livesdk.watch.IWatchLiveService r3 = (com.bytedance.android.livesdk.watch.IWatchLiveService) r3
            r3.setLiveRoomChangeCount(r5)
        L_0x0129:
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            java.lang.String r5 = r3.LJJLIIIJJIZ
            boolean r17 = android.text.TextUtils.isEmpty(r5)
            r17 = r17 ^ r4
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            boolean r3 = r3.LJLJL
            java.lang.String r9 = X.C3271Gpc.LIZIZ((com.bytedance.android.livesdkapi.session.EnterRoomConfig) r1)
            if (r3 != 0) goto L_0x01cf
            java.lang.String r4 = r2.LJIIL
            boolean r3 = android.text.TextUtils.isEmpty(r4)
            if (r3 != 0) goto L_0x01cf
            X.GpC r3 = X.C3245GpC.WEEKLY_RANK
            java.lang.String r3 = r3.getRankName()
            boolean r3 = android.text.TextUtils.equals(r4, r3)
            if (r3 != 0) goto L_0x017d
            java.lang.String r3 = "weekly_rank_notice"
            boolean r3 = android.text.TextUtils.equals(r4, r3)
            if (r3 != 0) goto L_0x017d
            X.GpC r3 = X.C3245GpC.WEEKLY_RISING_RANK
            java.lang.String r3 = r3.getRankName()
            boolean r3 = android.text.TextUtils.equals(r4, r3)
            if (r3 != 0) goto L_0x017d
            X.GpC r3 = X.C3245GpC.WEEKLY_ROOKIE_RANK
            java.lang.String r3 = r3.getRankName()
            boolean r3 = android.text.TextUtils.equals(r4, r3)
            if (r3 != 0) goto L_0x017d
            X.GpC r3 = X.C3245GpC.HOURLY_RANK
            java.lang.String r3 = r3.getRankName()
            boolean r3 = android.text.TextUtils.equals(r4, r3)
            if (r3 == 0) goto L_0x01cf
        L_0x017d:
            com.bytedance.android.livesdk.livesetting.feed.FeedDrawMtSetting r3 = com.bytedance.android.livesdk.livesetting.feed.FeedDrawMtSetting.INSTANCE
            com.bytedance.android.livesdk.live.model.LiveFeedDraw r3 = r3.getValue()
            java.lang.String r9 = r3.getUrl()
            r16 = 1
            r15 = 0
        L_0x018a:
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            boolean r10 = r3.LJJJLZIJ
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            int r5 = r3.LJJJZ
            if (r5 >= 0) goto L_0x0195
            r5 = 0
        L_0x0195:
            java.util.ArrayList r6 = new java.util.ArrayList
            r6.<init>()
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            java.lang.String r3 = r3.LJJJIL
            boolean r3 = android.text.TextUtils.isEmpty(r3)
            if (r3 == 0) goto L_0x021e
            r12 = 0
        L_0x01a5:
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            long[] r3 = r3.LJJJI
            if (r3 == 0) goto L_0x022b
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            long[] r3 = r3.LJJJI
            int r3 = r3.length
            if (r12 >= r3) goto L_0x022b
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            long[] r3 = r3.LJJJI
            r13 = r3[r12]
            int r3 = (r13 > r18 ? 1 : (r13 == r18 ? 0 : -1))
            if (r3 == 0) goto L_0x01ca
            com.bytedance.android.livesdkapi.depend.model.live.RoomInfo r11 = new com.bytedance.android.livesdkapi.depend.model.live.RoomInfo
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            long[] r3 = r3.LJJJI
            r3 = r3[r12]
            r11.<init>(r3)
            r6.add(r11)
        L_0x01ca:
            int r12 = r12 + 1
            r18 = 0
            goto L_0x01a5
        L_0x01cf:
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            java.lang.String r3 = r3.LJIILL
            boolean r3 = X.86a.LIZ(r3)
            if (r3 == 0) goto L_0x0218
            boolean r3 = X.86a.LIZ(r9)
            if (r3 != 0) goto L_0x01e3
            r16 = 0
            r15 = 1
            goto L_0x018a
        L_0x01e3:
            if (r17 == 0) goto L_0x01ef
            com.bytedance.android.livesdk.livesetting.watchlive.LiveFeedInnerStyleSetting r3 = com.bytedance.android.livesdk.livesetting.watchlive.LiveFeedInnerStyleSetting.INSTANCE
            int r3 = r3.getValue()
            if (r3 == 0) goto L_0x0218
        L_0x01ed:
            r15 = 1
            goto L_0x0219
        L_0x01ef:
            com.bytedance.android.livesdk.livesetting.feed.FeedDrawMtSetting r3 = com.bytedance.android.livesdk.livesetting.feed.FeedDrawMtSetting.INSTANCE
            com.bytedance.android.livesdk.live.model.LiveFeedDraw r3 = r3.getValue()
            java.lang.String r5 = r3.getUrl()
            com.bytedance.android.livesdk.livesetting.watchlive.LiveEnableDrawSetting r3 = com.bytedance.android.livesdk.livesetting.watchlive.LiveEnableDrawSetting.INSTANCE
            boolean r3 = r3.getValue()
            if (r3 == 0) goto L_0x020b
            java.lang.String r4 = r2.LJIILIIL
            java.lang.String r3 = r2.LJIIL
            boolean r3 = com.bytedance.android.livesdk.live.model.LiveFeedDraw.isEnable(r4, r3)
            if (r3 != 0) goto L_0x01ed
        L_0x020b:
            X.Gua r3 = X.C3482Gt1.LJIIIZ
            X.Gt1 r3 = r3.LIZ()
            boolean r3 = r3.LIZ()
            if (r3 == 0) goto L_0x0218
            goto L_0x01ed
        L_0x0218:
            r15 = 0
        L_0x0219:
            r9 = r5
            r16 = 0
            goto L_0x018a
        L_0x021e:
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL     // Catch:{ s -> 0x022b }
            java.lang.String r4 = r3.LJJJIL     // Catch:{ s -> 0x022b }
            java.lang.Class<com.bytedance.android.livesdkapi.depend.model.live.RoomInfo> r3 = com.bytedance.android.livesdkapi.depend.model.live.RoomInfo.class
            java.util.List r3 = X.C3847Gyu.LIZIZ(r4, r3)     // Catch:{ s -> 0x022b }
            r6.addAll(r3)     // Catch:{ s -> 0x022b }
        L_0x022b:
            if (r16 == 0) goto L_0x02c9
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            long r3 = r3.LJJJJZI
            r5 = 0
        L_0x0232:
            int r10 = r6.size()
            if (r5 >= r10) goto L_0x02be
            java.lang.Object r10 = r6.get(r5)
            if (r10 == 0) goto L_0x02ba
            java.lang.Object r10 = r6.get(r5)
            com.bytedance.android.livesdkapi.depend.model.live.RoomInfo r10 = (com.bytedance.android.livesdkapi.depend.model.live.RoomInfo) r10
            long r11 = r10.getRoomId()
            int r10 = (r3 > r11 ? 1 : (r3 == r11 ? 0 : -1))
            if (r10 != 0) goto L_0x02ba
            r3 = 1
        L_0x024d:
            com.bytedance.android.livesdk.list.MultiPlusFeedRoomListProvider r10 = new com.bytedance.android.livesdk.list.MultiPlusFeedRoomListProvider
            X.0CD r11 = r2.getLifecycle()
            r12 = r6
            r13 = r5
            r14 = r1
            r15 = r9
            r10.<init>(r11, r12, r13, r14, r15)
            r2.LJIIZILJ = r10
        L_0x025c:
            X.GsT r6 = X.C3448GsT.LIZIZ()
            X.Gsj r4 = r2.LJIIZILJ
            boolean r3 = r6.LIZ
            if (r3 == 0) goto L_0x026d
            r6.LIZIZ = r4
            if (r4 == 0) goto L_0x026d
            r4.LIZ((X.C3702GwZ) r6)
        L_0x026d:
            X.Gsj r4 = r2.LJIIZILJ
            X.GtQ r3 = new X.GtQ
            r3.<init>(r2)
            r4.LIZ((X.C3702GwZ) r3)
            X.GsH r3 = LIZ
            if (r3 == 0) goto L_0x027e
            r3.LIZ(r1)
        L_0x027e:
            X.Gsj r3 = r2.LJIIZILJ
            if (r3 != 0) goto L_0x0418
            r4 = 124(0x7c, float:1.74E-43)
            java.lang.String r3 = "list provider is null"
            r2.LIZ((int) r4, (java.lang.String) r3)
            X.GsH r9 = LIZ
            if (r9 == 0) goto L_0x0297
            r12 = 0
            java.lang.String r11 = ""
            java.lang.String r14 = "room_list_provider_error"
            r10 = r1
            r9.LIZ(r10, r11, r12, r14)
        L_0x0297:
            com.bytedance.android.livesdkapi.session.Event r4 = new com.bytedance.android.livesdkapi.session.Event
            r3 = 33026(0x8102, float:4.6279E-41)
            X.Gqb r1 = X.C3332Gqb.BussinessApiCall
            r4.<init>(r0, r3, r1)
            java.lang.String r0 = "live provider is empty."
            r4.LIZ(r0)
            X.Glf r0 = X.GAX.LIZ
            com.bytedance.android.livesdkapi.session.EnterRoomLinkSession r0 = r0.LIZ()
            r0.LIZ((com.bytedance.android.livesdkapi.session.Event) r4)
            com.bytedance.android.livesdk.liveroom.RoomListener r0 = r2.LIZJ
            X.Gya r0 = r0.getRoomAction()
            r0.LIZ(r8)
            goto L_0x00dc
        L_0x02ba:
            int r5 = r5 + 1
            goto L_0x0232
        L_0x02be:
            com.bytedance.android.livesdkapi.depend.model.live.RoomInfo r5 = new com.bytedance.android.livesdkapi.depend.model.live.RoomInfo
            r5.<init>(r3)
            r3 = 0
            r6.add(r3, r5)
            r5 = 0
            goto L_0x024d
        L_0x02c9:
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$SearchWrapData r3 = r1.LJFF
            java.lang.String r3 = r3.LIZ
            boolean r3 = android.text.TextUtils.isEmpty(r3)
            if (r3 != 0) goto L_0x02f0
            X.Gyd r5 = new X.Gyd
            java.lang.Class<com.bytedance.android.livesdkapi.host.IHostAction> r3 = com.bytedance.android.livesdkapi.host.IHostAction.class
            X.0UT r4 = X.0cm.LIZ(r3)
            com.bytedance.android.livesdkapi.host.IHostAction r4 = (com.bytedance.android.livesdkapi.host.IHostAction) r4
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$SearchWrapData r3 = r1.LJFF
            java.lang.String r3 = r3.LIZ
            X.Gyf r3 = r4.getSearchComponent(r3)
            r5.<init>(r1, r3)
            r2.LJIIZILJ = r5
            int r5 = r5.LIZ((com.bytedance.android.livesdkapi.session.EnterRoomConfig) r1)
            goto L_0x025c
        L_0x02f0:
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            boolean r3 = r3.LJJJJ
            if (r3 == 0) goto L_0x0326
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            long r3 = r3.LJJJJZI
            r12 = 0
        L_0x02fb:
            int r9 = r6.size()
            if (r12 >= r9) goto L_0x0316
            java.lang.Object r9 = r6.get(r12)
            if (r9 == 0) goto L_0x0323
            java.lang.Object r9 = r6.get(r12)
            com.bytedance.android.livesdkapi.depend.model.live.RoomInfo r9 = (com.bytedance.android.livesdkapi.depend.model.live.RoomInfo) r9
            long r10 = r9.getRoomId()
            int r9 = (r3 > r10 ? 1 : (r3 == r10 ? 0 : -1))
            if (r9 != 0) goto L_0x0323
            r5 = r12
        L_0x0316:
            com.bytedance.android.livesdk.list.MultiRoomIdListProvider r4 = new com.bytedance.android.livesdk.list.MultiRoomIdListProvider
            X.0CD r3 = r2.getLifecycle()
            r4.<init>(r3, r6, r1)
            r2.LJIIZILJ = r4
            goto L_0x025c
        L_0x0323:
            int r12 = r12 + 1
            goto L_0x02fb
        L_0x0326:
            if (r15 == 0) goto L_0x03cd
            java.lang.String r6 = ""
            if (r17 == 0) goto L_0x03ca
            java.lang.String r10 = "draw"
        L_0x032e:
            java.lang.String r4 = r2.LJIIL
            java.lang.String r3 = "drawer_cover"
            boolean r3 = r3.equals(r4)
            if (r3 == 0) goto L_0x034d
            boolean r3 = android.text.TextUtils.isEmpty(r10)
            if (r3 == 0) goto L_0x034d
            X.GtI r3 = X.C3499GtI.LIZ()
            java.lang.String r10 = r3.LIZLLL()
            boolean r3 = android.text.TextUtils.isEmpty(r10)
            if (r3 == 0) goto L_0x03b8
            r10 = r6
        L_0x034d:
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            java.lang.String r3 = r3.LJLIL
            boolean r3 = android.text.TextUtils.isEmpty(r3)
            if (r3 != 0) goto L_0x035b
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            java.lang.String r10 = r3.LJLIL
        L_0x035b:
            java.lang.String r4 = r2.LJIILIIL
            java.lang.String r3 = r2.LJIIL
            java.lang.String r4 = com.bytedance.android.livesdk.live.model.LiveFeedDraw.getChannelId(r4, r3)
            java.lang.String r11 = r2.LJIILIIL
            java.lang.String r3 = "live_merge"
            boolean r3 = r3.equals(r11)
            if (r3 == 0) goto L_0x03af
            java.lang.String r11 = r2.LJIIL
            java.lang.String r3 = "live_cover"
            boolean r3 = r3.equals(r11)
            if (r3 == 0) goto L_0x03af
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            java.lang.String r13 = r3.LLF
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            java.lang.String r12 = r3.LLFF
            boolean r3 = android.text.TextUtils.isEmpty(r13)
            if (r3 != 0) goto L_0x03a7
            boolean r3 = android.text.TextUtils.isEmpty(r12)
            if (r3 != 0) goto L_0x03a7
            java.lang.StringBuilder r11 = new java.lang.StringBuilder
            r11.<init>()
            r11.append(r9)
            java.lang.String r3 = "&bubble_room_id="
            r11.append(r3)
            r11.append(r13)
            java.lang.String r3 = "&bubble_owner_id="
            r11.append(r3)
            r11.append(r12)
            java.lang.String r9 = r11.toString()
        L_0x03a7:
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            r3.LLF = r6
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            r3.LLFF = r6
        L_0x03af:
            X.GsZ r3 = new X.GsZ
            r3.<init>(r1, r9, r10, r4)
            r2.LJIIZILJ = r3
            goto L_0x025c
        L_0x03b8:
            java.lang.StringBuilder r4 = new java.lang.StringBuilder
            r4.<init>()
            r4.append(r10)
            java.lang.String r3 = "_drawer"
            r4.append(r3)
            java.lang.String r10 = r4.toString()
            goto L_0x034d
        L_0x03ca:
            r10 = r6
            goto L_0x032e
        L_0x03cd:
            if (r10 == 0) goto L_0x03d9
            X.GwR r3 = r2.LJIL
            X.Gsj r3 = r3.LIZIZ()
            r2.LJIIZILJ = r3
            goto L_0x025c
        L_0x03d9:
            int r3 = r6.size()
            if (r3 <= 0) goto L_0x040f
            com.bytedance.android.livesdkapi.session.EnterRoomConfig$RoomsData r3 = r1.LIZLLL
            long r3 = r3.LJJJJZI
            r12 = 0
        L_0x03e4:
            int r9 = r6.size()
            if (r12 >= r9) goto L_0x03ff
            java.lang.Object r9 = r6.get(r12)
            if (r9 == 0) goto L_0x040c
            java.lang.Object r9 = r6.get(r12)
            com.bytedance.android.livesdkapi.depend.model.live.RoomInfo r9 = (com.bytedance.android.livesdkapi.depend.model.live.RoomInfo) r9
            long r10 = r9.getRoomId()
            int r9 = (r3 > r10 ? 1 : (r3 == r10 ? 0 : -1))
            if (r9 != 0) goto L_0x040c
            r5 = r12
        L_0x03ff:
            com.bytedance.android.livesdk.list.MultiRoomIdListProvider r4 = new com.bytedance.android.livesdk.list.MultiRoomIdListProvider
            X.0CD r3 = r2.getLifecycle()
            r4.<init>(r3, r6, r1)
            r2.LJIIZILJ = r4
            goto L_0x025c
        L_0x040c:
            int r12 = r12 + 1
            goto L_0x03e4
        L_0x040f:
            X.GtU r3 = new X.GtU
            r3.<init>(r1)
            r2.LJIIZILJ = r3
            goto L_0x025c
        L_0x0418:
            X.Glf r0 = X.GAX.LIZ
            com.bytedance.android.livesdkapi.session.EnterRoomLinkSession r6 = r0.LIZ()
            com.bytedance.android.livesdkapi.session.Event r4 = new com.bytedance.android.livesdkapi.session.Event
            r3 = 2305(0x901, float:3.23E-42)
            X.Gqb r1 = X.C3332Gqb.ServerApiCall
            java.lang.String r0 = "live_room_create_list_provider"
            r4.<init>(r0, r3, r1)
            X.Gsj r0 = r2.LJIIZILJ
            java.lang.Class r0 = r0.getClass()
            java.lang.String r0 = r0.getSimpleName()
            r4.LIZ(r0)
            r6.LIZ((com.bytedance.android.livesdkapi.session.Event) r4)
            com.bytedance.android.livesdk.LiveRoomFragment$1 r3 = new com.bytedance.android.livesdk.LiveRoomFragment$1
            X.0AA r1 = r2.getChildFragmentManager()
            X.Gsj r0 = r2.LJIIZILJ
            r3.<init>(r1, r0, r7)
            r2.LJIJ = r3
            X.T3q r1 = r2.LJIILL
            r0 = 1
            r1.setOffscreenPageLimit(r0)
            X.T3q r1 = r2.LJIILL     // Catch:{ Exception -> 0x0457 }
            X.Gsd r0 = r2.LJIJ     // Catch:{ Exception -> 0x0457 }
            r1.setAdapter(r0)     // Catch:{ Exception -> 0x0457 }
            X.Gsd r0 = r2.LJIJ     // Catch:{ Exception -> 0x0457 }
            r0.LIZLLL = r2     // Catch:{ Exception -> 0x0457 }
        L_0x0457:
            X.T3q r0 = r2.LJIILL
            r3 = 0
            r0.LIZ(r5, r3)
            X.GsE r1 = new X.GsE
            r1.<init>(r2, r7)
            r2.LJIJJ = r1
            X.T3q r0 = r2.LJIILL
            r0.setOnPageChangeListener(r1)
            X.GaS r1 = new X.GaS
            r1.<init>(r3)
            r2.LJJIJLIJ = r1
            X.T3q r0 = r2.LJIILL
            r0.setOnSlideInterceptor(r1)
            X.GsF r0 = new X.GsF
            r0.<init>(r2, r7)
            r2.LJIJI = r0
            r2.LJIL()
            r2.LJIIJJI()
            X.T3q r1 = r2.LJIILL
            com.bytedance.android.livesdk.LiveRoomFragment$2 r0 = new com.bytedance.android.livesdk.LiveRoomFragment$2
            r0.<init>()
            r1.setOverScrollListener(r0)
            X.T3q r1 = r2.LJIILL
            X.GsU r0 = new X.GsU
            r0.<init>(r2)
            r1.setOnTouchListener(r0)
            goto L_0x00dc
        L_0x0498:
            r11 = 0
            goto L_0x0061
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.livesdk.LiveRoomFragment.onActivityCreated(android.os.Bundle):void");
    }

    private void LIZ(int i, String str) {
        C3267GpY gpY = this.LJJJI;
        if (gpY != null) {
            gpY.LIZ(i, str);
        }
    }

    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View view;
        if (ViewAutoPreloadOptSetting.INSTANCE.getEnable()) {
            view = 0Rl.LJ.LIZ(2131561766, getContext());
        } else {
            view = null;
        }
        if (view == null) {
            view = 0HH.LIZ(layoutInflater, 2131561766, viewGroup, false);
        }
        this.LJIILLIIL = (FrameLayout) view.findViewById(2131363673);
        EnterRoomConfig enterRoomConfig = GAX.LIZ.LIZ().LIZIZ;
        if (this.LJIILLIIL != null) {
            if (enterRoomConfig == null || !enterRoomConfig.LJ.LIZ) {
                this.LJIILLIIL.setBackgroundColor(getResources().getColor(2131100139));
            } else {
                this.LJIILLIIL.setBackgroundColor(0);
            }
        }
        if (BackRoomViewOptSetting.INSTANCE.getEnable()) {
            this.LJJIJIIJI = new C3443GsO(getContext());
        } else {
            this.LIZLLL = (ViewGroup) view.findViewById(2131362584);
            this.LJ = new C3442GsN(getContext(), this.LIZLLL);
        }
        T3q findViewById = view.findViewById(2131372992);
        this.LJIILL = findViewById;
        RoomStatusController roomStatusController = this.LIZIZ;
        if (roomStatusController != null) {
            roomStatusController.setViewPager(findViewById);
        }
        C3448GsT LIZIZ2 = C3448GsT.LIZIZ();
        FrameLayout frameLayout = this.LJIILLIIL;
        if (LIZIZ2.LIZ) {
            LIZIZ2.LJ = frameLayout;
        }
        return view;
    }

    public final void LIZ(long j, EnterRoomConfig enterRoomConfig, boolean z) {
        long j2;
        EnterRoomConfig.RoomsData roomsData;
        String str;
        EnterRoomConfig.RoomsData roomsData2;
        long j3;
        EnterRoomConfig.RoomsData roomsData3;
        String str2;
        EnterRoomConfig.RoomsData roomsData4;
        EnterRoomConfig enterRoomConfig2 = enterRoomConfig;
        GAX.LIZ.LIZ().LIZ(new Event("live_room_jump_to_other", 258, C3332Gqb.BussinessApiCall));
        if (z) {
            String str3 = "0";
            if (this.LIZLLL != null) {
                C3442GsN gsN = this.LJ;
                String str4 = enterRoomConfig2.LIZLLL.LJLJJL;
                C3491GtA LIZ2 = C3491GtA.LJFF.LIZ("livesdk_return_last_click");
                LIZ2.LIZ();
                LIZ2.LIZ("layer_level", C3533Gtq.LIZ.LIZ(0bI.LIZ(gsN.LIZIZ)).LIZJ());
                EnterRoomConfig enterRoomConfig3 = gsN.LIZ;
                if (enterRoomConfig3 == null || (roomsData4 = enterRoomConfig3.LIZLLL) == null) {
                    j3 = 0;
                } else {
                    j3 = roomsData4.LJJJJZI;
                }
                LIZ2.LIZ("to_room_id", j3);
                EnterRoomConfig enterRoomConfig4 = gsN.LIZ;
                if (!(enterRoomConfig4 == null || (roomsData3 = enterRoomConfig4.LIZLLL) == null || (str2 = roomsData3.LJJIJIIJI) == null)) {
                    str3 = str2;
                }
                LIZ2.LIZ("to_anchor_id", str3);
                LIZ2.LIZ("return_type", str4);
                LIZ2.LIZ("process_duration", 0);
                LIZ2.LIZLLL();
            } else {
                C3443GsO gsO = this.LJJIJIIJI;
                if (gsO != null) {
                    String str5 = enterRoomConfig2.LIZLLL.LJLJJL;
                    C3491GtA LIZ3 = C3491GtA.LJFF.LIZ("livesdk_return_last_click");
                    LIZ3.LIZ();
                    LIZ3.LIZ("layer_level", C3533Gtq.LIZ.LIZ(0bI.LIZ(gsO.LIZIZ)).LIZJ());
                    EnterRoomConfig enterRoomConfig5 = gsO.LIZ;
                    if (enterRoomConfig5 == null || (roomsData2 = enterRoomConfig5.LIZLLL) == null) {
                        j2 = 0;
                    } else {
                        j2 = roomsData2.LJJJJZI;
                    }
                    LIZ3.LIZ("to_room_id", j2);
                    EnterRoomConfig enterRoomConfig6 = gsO.LIZ;
                    if (!(enterRoomConfig6 == null || (roomsData = enterRoomConfig6.LIZLLL) == null || (str = roomsData.LJJIJIIJI) == null)) {
                        str3 = str;
                    }
                    LIZ3.LIZ("to_anchor_id", str3);
                    LIZ3.LIZ("return_type", str5);
                    LIZ3.LIZ("process_duration", 0);
                    LIZ3.LIZLLL();
                }
            }
            enterRoomConfig2 = C3533Gtq.LIZ.LIZ((Activity) getActivity()).LIZIZ();
        }
        if (enterRoomConfig2 == null) {
            C3294Gpz.LIZ("LiveRoomFragment", "jump2Other event is null");
            return;
        }
        enterRoomConfig2.LIZLLL.LJJL = "full_screen";
        enterRoomConfig2.LIZLLL.LJJJJZI = j;
        this.LJJJ = true;
        long j4 = enterRoomConfig2.LIZLLL.LJJLIIIIJ;
        if (!(LIZJ() == null || LIZJ().LJJIIJZLJL() == null)) {
            enterRoomConfig2.LIZLLL.LJJLI = LIZJ().LJJIIJZLJL().LIZLLL.LJJLI;
            enterRoomConfig2.LIZLLL.LJJJJLI = LIZJ().LJJIIJZLJL().LIZLLL.LJJJJLI;
            enterRoomConfig2.LIZLLL.LJJIIJ = LIZJ().LJJIIJZLJL().LIZLLL.LJJIIJ;
            if (j4 == 0) {
                j4 = LIZJ().LJJIIJZLJL().LIZLLL.LJJJJZI;
            }
            enterRoomConfig2.LIZLLL.LJJZ = LIZJ().LJJIIJZLJL().LIZLLL.LJJZZI;
            if (!LIZJ().LJJIIJZLJL().LIZLLL.LJLJL || !z) {
                enterRoomConfig2.LIZLLL.LJLJLLL = 0;
            } else {
                0UK r1 = 0UK.LJII;
                if (!r1.LIZ().empty()) {
                    Object pop = r1.LIZ().pop();
                    n.LIZIZ(pop, "");
                    ((Number) pop).longValue();
                }
                enterRoomConfig2.LIZLLL.LJLJLLL = 1;
                enterRoomConfig2.LIZLLL.LJJL = "small_picture";
            }
        }
        long j5 = enterRoomConfig2.LIZJ.LJIJJ;
        if (j5 > 0) {
            ((C4366HHj) ((PortalApi) 0yx.LIZ().LIZ(PortalApi.class)).ping(j4, j5, C3527Gtk.JUMP_TO_ROOM).LIZ(DEF.LIZ(this))).LIZ(C3601Guw.LIZ, C3548Gu5.LIZ);
        }
        enterRoomConfig2.LIZLLL.LJJJJZI = j;
        GAX.LIZ.LIZ(new EnterRoomLinkSession(enterRoomConfig2));
        0cm.LIZ(IHostStartLiveManager.class).LIZIZ(getContext(), enterRoomConfig2);
    }

    /* JADX WARNING: Code restructure failed: missing block: B:43:0x0101, code lost:
        if (r10.size() >= 10) goto L_0x00bb;
     */
    /* JADX WARNING: Removed duplicated region for block: B:11:0x004a  */
    /* JADX WARNING: Removed duplicated region for block: B:18:0x0066  */
    /* JADX WARNING: Removed duplicated region for block: B:69:0x01be  */
    /* Code decompiled incorrectly, please refer to instructions dump. */
    public final void LIZ(long r18, boolean r20, boolean r21, boolean r22, java.lang.String r23) {
        /*
            r17 = this;
            r9 = r23
            r4 = r17
            r4 = r4
            java.util.Map<java.lang.Long, java.lang.Long> r6 = X.C3513GtW.LIZ
            r0 = r18
            java.lang.Long r5 = java.lang.Long.valueOf(r0)
            long r2 = java.lang.System.currentTimeMillis()
            java.lang.Long r2 = java.lang.Long.valueOf(r2)
            r6.put(r5, r2)
            java.util.Set<java.lang.Long> r3 = X.C3513GtW.LIZIZ
            java.lang.Long r2 = java.lang.Long.valueOf(r0)
            r3.add(r2)
            r5 = 1
            X.C3513GtW.LIZJ = r5
            X.Gsj r2 = r4.LJIIZILJ
            boolean r2 = r2 instanceof X.C3511GtU
            r8 = 3
            r7 = 5
            r16 = 2131828075(0x7f111d6b, float:1.928908E38)
            r6 = 0
            if (r2 != 0) goto L_0x00bb
            X.T3q r2 = r4.LJIILL
            if (r2 == 0) goto L_0x003e
            X.Gsd r2 = r4.LJIJ
            if (r2 == 0) goto L_0x003e
            android.content.Context r2 = r4.getContext()
            if (r2 != 0) goto L_0x00b3
        L_0x003e:
            X.GtY r11 = X.C3515GtY.EXIT_ROOM
            java.lang.String r3 = X.0b0.LIZ(r16)
        L_0x0044:
            boolean r2 = android.text.TextUtils.isEmpty(r9)
            if (r2 == 0) goto L_0x004b
            r9 = r3
        L_0x004b:
            if (r21 == 0) goto L_0x005c
            boolean r2 = android.text.TextUtils.isEmpty(r9)
            if (r2 != 0) goto L_0x005c
            android.content.Context r10 = X.0b0.LJ()
            r2 = 0
            X.C1313Fz8.LIZ((android.content.Context) r10, (java.lang.String) r9, (long) r2)
        L_0x005c:
            int[] r3 = com.bytedance.android.livesdk.LiveRoomFragment.AnonymousClass3.LIZ
            int r2 = r11.ordinal()
            r3 = r3[r2]
            if (r3 == r5) goto L_0x01be
            r2 = 2
            if (r3 == r2) goto L_0x01a7
            if (r3 == r8) goto L_0x0182
            r2 = 4
            if (r3 == r2) goto L_0x008a
            if (r3 == r7) goto L_0x0071
        L_0x0070:
            return
        L_0x0071:
            com.bytedance.android.livesdkapi.session.Event r6 = new com.bytedance.android.livesdkapi.session.Event
            r5 = 33033(0x8109, float:4.6289E-41)
            X.Gqb r3 = X.C3332Gqb.BussinessApiCall
            java.lang.String r2 = "live_room_on_room_error_delete_current_room"
            r6.<init>(r2, r5, r3)
            X.Glf r2 = X.GAX.LIZ
            com.bytedance.android.livesdkapi.session.EnterRoomLinkSession r2 = r2.LIZ()
            r2.LIZ((com.bytedance.android.livesdkapi.session.Event) r6)
            r4.LIZ((long) r0)
            goto L_0x0070
        L_0x008a:
            com.bytedance.android.livesdkapi.session.Event r3 = new com.bytedance.android.livesdkapi.session.Event
            r2 = 33032(0x8108, float:4.6288E-41)
            X.Gqb r1 = X.C3332Gqb.BussinessApiCall
            java.lang.String r0 = "live_room_on_room_error_exit_room"
            r3.<init>(r0, r2, r1)
            X.Glf r0 = X.GAX.LIZ
            com.bytedance.android.livesdkapi.session.EnterRoomLinkSession r0 = r0.LIZ()
            r0.LIZ((com.bytedance.android.livesdkapi.session.Event) r3)
            if (r22 == 0) goto L_0x00a7
            boolean r0 = r4.LJIIJ()
            if (r0 != 0) goto L_0x0070
        L_0x00a7:
            com.bytedance.android.livesdk.liveroom.RoomListener r0 = r4.LIZJ
            X.Gya r1 = r0.getRoomAction()
            java.lang.String r0 = "error"
            r1.LIZ(r0)
            return
        L_0x00b3:
            java.util.Set<java.lang.Long> r2 = X.C3513GtW.LIZIZ
            int r2 = r2.size()
            if (r2 < r7) goto L_0x00c2
        L_0x00bb:
            X.GtY r11 = X.C3515GtY.EXIT_ROOM
            java.lang.String r3 = X.0b0.LIZ(r16)
            goto L_0x0044
        L_0x00c2:
            java.util.Set<java.lang.Long> r2 = X.C3513GtW.LIZIZ
            int r2 = r2.size()
            if (r2 < r8) goto L_0x0104
            long r14 = java.lang.System.currentTimeMillis()
            r2 = 10000(0x2710, double:4.9407E-320)
            long r14 = r14 - r2
            java.util.Map<java.lang.Long, java.lang.Long> r2 = X.C3513GtW.LIZ
            java.util.Collection r2 = r2.values()
            java.util.ArrayList r10 = new java.util.ArrayList
            r10.<init>()
            java.util.Iterator r13 = r2.iterator()
        L_0x00e0:
            boolean r2 = r13.hasNext()
            if (r2 == 0) goto L_0x00f9
            java.lang.Object r3 = r13.next()
            r2 = r3
            java.lang.Number r2 = (java.lang.Number) r2
            long r11 = r2.longValue()
            int r2 = (r11 > r14 ? 1 : (r11 == r14 ? 0 : -1))
            if (r2 < 0) goto L_0x00e0
            r10.add(r3)
            goto L_0x00e0
        L_0x00f9:
            java.util.List r10 = (java.util.List) r10
            int r3 = r10.size()
            r2 = 10
            if (r3 < r2) goto L_0x0104
            goto L_0x00bb
        L_0x0104:
            X.Gsd r2 = r4.LJIJ
            int r2 = r2.LIZIZ()
            if (r2 != r5) goto L_0x010e
            if (r20 != 0) goto L_0x00bb
        L_0x010e:
            X.Gsd r2 = r4.LJIJ
            int r2 = r2.LIZIZ()
            if (r2 != r5) goto L_0x011e
            X.Gsj r2 = r4.LJIIZILJ
            boolean r2 = r2.LIZLLL()
            if (r2 == 0) goto L_0x00bb
        L_0x011e:
            if (r20 == 0) goto L_0x0126
            X.GtY r11 = X.C3515GtY.DELETE_CURRENT_ROOM
            java.lang.String r3 = ""
            goto L_0x0044
        L_0x0126:
            r4.getContext()
            boolean r2 = LJJI()
            if (r2 != 0) goto L_0x013b
            X.GtY r11 = X.C3515GtY.WAIT
            r2 = 2131829752(0x7f1123f8, float:1.9292482E38)
            java.lang.String r9 = X.0b0.LIZ(r2)
            r3 = r9
            goto L_0x0044
        L_0x013b:
            X.T3q r2 = r4.LJIILL
            int r3 = r2.getCurrentItem()
            X.Gsd r2 = r4.LJIJ
            int r2 = r2.LIZIZ()
            int r2 = r2 - r5
            if (r3 != r2) goto L_0x015d
            X.Gsj r2 = r4.LJIIZILJ
            boolean r2 = r2.LIZLLL()
            if (r2 == 0) goto L_0x0177
            r2 = 2131828078(0x7f111d6e, float:1.9289087E38)
            java.lang.String r3 = X.0b0.LIZ(r2)
            X.GtY r11 = X.C3515GtY.WAIT_LOADING_FINISH_TO_PAGE_DOWN
            goto L_0x0044
        L_0x015d:
            X.T3q r2 = r4.LJIILL
            int r3 = r2.getCurrentItem()
            X.Gsd r2 = r4.LJIJ
            int r2 = r2.LIZIZ()
            int r2 = r2 - r5
            if (r3 >= r2) goto L_0x00bb
            X.GtY r11 = X.C3515GtY.PAGE_DOWN
            r2 = 2131828077(0x7f111d6d, float:1.9289085E38)
            java.lang.String r3 = X.0b0.LIZ(r2)
            goto L_0x0044
        L_0x0177:
            r2 = 2131828076(0x7f111d6c, float:1.9289083E38)
            java.lang.String r3 = X.0b0.LIZ(r2)
            X.GtY r11 = X.C3515GtY.WAIT
            goto L_0x0044
        L_0x0182:
            com.bytedance.android.livesdkapi.session.Event r3 = new com.bytedance.android.livesdkapi.session.Event
            r2 = 263(0x107, float:3.69E-43)
            X.Gqb r1 = X.C3332Gqb.BussinessApiCall
            java.lang.String r0 = "live_room_on_room_error_page_down"
            r3.<init>(r0, r2, r1)
            X.Glf r0 = X.GAX.LIZ
            com.bytedance.android.livesdkapi.session.EnterRoomLinkSession r0 = r0.LIZ()
            r0.LIZ((com.bytedance.android.livesdkapi.session.Event) r3)
            r4.LJJII = r6
            android.os.Handler r3 = X.0bV.LIZ()
            X.Gul r2 = new X.Gul
            r2.<init>(r4)
            r0 = 2000(0x7d0, double:9.88E-321)
            r3.postDelayed(r2, r0)
            return
        L_0x01a7:
            com.bytedance.android.livesdkapi.session.Event r3 = new com.bytedance.android.livesdkapi.session.Event
            r2 = 262(0x106, float:3.67E-43)
            X.Gqb r1 = X.C3332Gqb.BussinessApiCall
            java.lang.String r0 = "live_room_on_room_error_wait_loading_finish_to_page_down"
            r3.<init>(r0, r2, r1)
            X.Glf r0 = X.GAX.LIZ
            com.bytedance.android.livesdkapi.session.EnterRoomLinkSession r0 = r0.LIZ()
            r0.LIZ((com.bytedance.android.livesdkapi.session.Event) r3)
            r4.LJJIII = r5
            return
        L_0x01be:
            com.bytedance.android.livesdkapi.session.Event r3 = new com.bytedance.android.livesdkapi.session.Event
            r2 = 261(0x105, float:3.66E-43)
            X.Gqb r1 = X.C3332Gqb.BussinessApiCall
            java.lang.String r0 = "live_room_on_room_error_wait"
            r3.<init>(r0, r2, r1)
            X.Glf r0 = X.GAX.LIZ
            com.bytedance.android.livesdkapi.session.EnterRoomLinkSession r0 = r0.LIZ()
            r0.LIZ((com.bytedance.android.livesdkapi.session.Event) r3)
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: com.bytedance.android.livesdk.LiveRoomFragment.LIZ(long, boolean, boolean, boolean, java.lang.String):void");
    }

    public final void LIZ(LivePlayFragment livePlayFragment, float f, boolean z, boolean z2, float f2) {
        String str;
        float f3 = 1.0f;
        float f4 = f;
        float max = Math.max(0.9f, Math.abs((1.0f - f4) - 1.0E-4f));
        int i = this.LJIIIIZZ;
        T3q t3q = this.LJIILL;
        int i2 = RecommendEndAtFollowingSetting.INSTANCE.getValue().LIZ;
        boolean z3 = z;
        if (i2 == 2 || i2 == 3) {
            LivePlayFragment livePlayFragment2 = livePlayFragment;
            if (livePlayFragment2.LJJJJI == null) {
                if (livePlayFragment2.getContext() != null) {
                    livePlayFragment2.LJJJJI = new RecommendSwipeWidget();
                    RecyclableWidgetManager.of((Fragment) livePlayFragment2, livePlayFragment2.LJJJZ, false, (IWidgetProvider) LiveWidgetProvider.getInstance(), (FluencyOpt) 1Mn.LIZ).load(2131367106, livePlayFragment2.LJJJJI);
                    RecommendSwipeWidget recommendSwipeWidget = livePlayFragment2.LJJJJI;
                    View view = livePlayFragment2.LJJIIJZLJL;
                    M12.LIZ(view, t3q);
                    recommendSwipeWidget.LIZIZ = view;
                    recommendSwipeWidget.LIZ = t3q;
                    t3q.LIZ(0.99f, false);
                }
            }
            RecommendSwipeWidget recommendSwipeWidget2 = livePlayFragment2.LJJJJI;
            recommendSwipeWidget2.LJIILIIL = f4;
            recommendSwipeWidget2.LJIJ = z3;
            recommendSwipeWidget2.LJIILJJIL = max;
            recommendSwipeWidget2.LJIJJ = i;
            recommendSwipeWidget2.LJIJI = z2;
            recommendSwipeWidget2.LJIILLIIL = f2;
            if (recommendSwipeWidget2.LIZLLL != null && (recommendSwipeWidget2.LJIJJLI <= 0 || recommendSwipeWidget2.LJIJJLI != recommendSwipeWidget2.LIZ())) {
                recommendSwipeWidget2.LJIJJLI = recommendSwipeWidget2.LIZ();
                recommendSwipeWidget2.LJIL = 0b0.LIZ(40.0f);
            }
            if (recommendSwipeWidget2.LIZLLL != null) {
                if (recommendSwipeWidget2.LJIJ) {
                    LinearLayout linearLayout = recommendSwipeWidget2.LIZLLL;
                    if (linearLayout == null) {
                        n.LIZ("");
                    }
                    linearLayout.setVisibility(8);
                    LinearLayout linearLayout2 = recommendSwipeWidget2.LIZJ;
                    if (linearLayout2 == null) {
                        n.LIZ("");
                    }
                    linearLayout2.setVisibility(0);
                    1jk r0 = recommendSwipeWidget2.LJ;
                    if (r0 == null) {
                        n.LIZ("");
                    }
                    int measuredHeight = r0.getMeasuredHeight();
                    4ZZ r02 = recommendSwipeWidget2.LJIIIIZZ;
                    if (r02 == null) {
                        n.LIZ("");
                    }
                    int measuredHeight2 = r02.getMeasuredHeight();
                    1jk r03 = recommendSwipeWidget2.LJI;
                    if (r03 == null) {
                        n.LIZ("");
                    }
                    int measuredHeight3 = r03.getMeasuredHeight();
                    int i3 = measuredHeight + measuredHeight2;
                    float f5 = (float) i3;
                    if (Math.abs(recommendSwipeWidget2.LJIILLIIL) <= f5 || i3 <= 0) {
                        RelativeLayout relativeLayout = recommendSwipeWidget2.LJIIJ;
                        if (relativeLayout == null) {
                            n.LIZ("");
                        }
                        ViewGroup.LayoutParams layoutParams = relativeLayout.getLayoutParams();
                        layoutParams.height = measuredHeight2;
                        RelativeLayout relativeLayout2 = recommendSwipeWidget2.LJIIJ;
                        if (relativeLayout2 == null) {
                            n.LIZ("");
                        }
                        relativeLayout2.setLayoutParams(layoutParams);
                        4ZZ r04 = recommendSwipeWidget2.LJIIIIZZ;
                        if (r04 == null) {
                            n.LIZ("");
                        }
                        ViewGroup.LayoutParams layoutParams2 = r04.getLayoutParams();
                        Objects.requireNonNull(layoutParams2, "null cannot be cast to non-null type android.widget.RelativeLayout.LayoutParams");
                        RelativeLayout.LayoutParams layoutParams3 = (RelativeLayout.LayoutParams) layoutParams2;
                        layoutParams3.bottomMargin = 0;
                        4ZZ r05 = recommendSwipeWidget2.LJIIIIZZ;
                        if (r05 == null) {
                            n.LIZ("");
                        }
                        r05.setLayoutParams(layoutParams3);
                        4ZZ r06 = recommendSwipeWidget2.LJIIIIZZ;
                        if (r06 == null) {
                            n.LIZ("");
                        }
                        r06.setAlpha(0.0f);
                        1jk r07 = recommendSwipeWidget2.LJI;
                        if (r07 == null) {
                            n.LIZ("");
                        }
                        r07.setAlpha(0.0f);
                    } else {
                        RelativeLayout relativeLayout3 = recommendSwipeWidget2.LJIIJ;
                        if (relativeLayout3 == null) {
                            n.LIZ("");
                        }
                        ViewGroup.LayoutParams layoutParams4 = relativeLayout3.getLayoutParams();
                        layoutParams4.height = Math.min(0b0.LIZ(8.0f) + measuredHeight3 + measuredHeight2, (int) (Math.abs(recommendSwipeWidget2.LJIILLIIL) - ((float) measuredHeight)));
                        RelativeLayout relativeLayout4 = recommendSwipeWidget2.LJIIJ;
                        if (relativeLayout4 == null) {
                            n.LIZ("");
                        }
                        relativeLayout4.setLayoutParams(layoutParams4);
                        float min = Math.min(1.0f, (((Math.abs(recommendSwipeWidget2.LJIILLIIL) - f5) * 1.0f) / ((float) measuredHeight2)) + 0.2f);
                        4ZZ r08 = recommendSwipeWidget2.LJIIIIZZ;
                        if (r08 == null) {
                            n.LIZ("");
                        }
                        r08.setAlpha(min);
                        int i4 = i3 + measuredHeight3;
                        float f6 = (float) i4;
                        if (Math.abs(recommendSwipeWidget2.LJIILLIIL) > f6) {
                            RelativeLayout relativeLayout5 = recommendSwipeWidget2.LJIIJ;
                            if (relativeLayout5 == null) {
                                n.LIZ("");
                            }
                            ViewGroup.LayoutParams layoutParams5 = relativeLayout5.getLayoutParams();
                            Objects.requireNonNull(layoutParams5, "null cannot be cast to non-null type android.widget.LinearLayout.LayoutParams");
                            LinearLayout.LayoutParams layoutParams6 = (LinearLayout.LayoutParams) layoutParams5;
                            layoutParams6.bottomMargin = (int) Math.min(((float) 0b0.LIZ(28.0f)) * 1.0f, Math.abs(recommendSwipeWidget2.LJIILLIIL) - f6);
                            RelativeLayout relativeLayout6 = recommendSwipeWidget2.LJIIJ;
                            if (relativeLayout6 == null) {
                                n.LIZ("");
                            }
                            relativeLayout6.setLayoutParams(layoutParams6);
                            float min2 = Math.min(1.0f, (((Math.abs(recommendSwipeWidget2.LJIILLIIL) - f6) * 1.0f) / ((float) measuredHeight3)) + 0.2f);
                            1jk r09 = recommendSwipeWidget2.LJI;
                            if (r09 == null) {
                                n.LIZ("");
                            }
                            r09.setAlpha(min2);
                        } else {
                            RelativeLayout relativeLayout7 = recommendSwipeWidget2.LJIIJ;
                            if (relativeLayout7 == null) {
                                n.LIZ("");
                            }
                            ViewGroup.LayoutParams layoutParams7 = relativeLayout7.getLayoutParams();
                            Objects.requireNonNull(layoutParams7, "null cannot be cast to non-null type android.widget.LinearLayout.LayoutParams");
                            LinearLayout.LayoutParams layoutParams8 = (LinearLayout.LayoutParams) layoutParams7;
                            layoutParams8.bottomMargin = 0;
                            RelativeLayout relativeLayout8 = recommendSwipeWidget2.LJIIJ;
                            if (relativeLayout8 == null) {
                                n.LIZ("");
                            }
                            relativeLayout8.setLayoutParams(layoutParams8);
                            1jk r1 = recommendSwipeWidget2.LJI;
                            if (r1 == null) {
                                n.LIZ("");
                            }
                            r1.setAlpha(0.0f);
                        }
                        float LIZ2 = (float) (i4 + 0b0.LIZ(28.0f));
                        if (Math.abs(recommendSwipeWidget2.LJIILLIIL) > LIZ2) {
                            4ZZ r010 = recommendSwipeWidget2.LJIIIIZZ;
                            if (r010 == null) {
                                n.LIZ("");
                            }
                            ViewGroup.LayoutParams layoutParams9 = r010.getLayoutParams();
                            Objects.requireNonNull(layoutParams9, "null cannot be cast to non-null type android.widget.RelativeLayout.LayoutParams");
                            RelativeLayout.LayoutParams layoutParams10 = (RelativeLayout.LayoutParams) layoutParams9;
                            layoutParams10.bottomMargin = (int) Math.min(((float) 0b0.LIZ(8.0f)) * 1.0f, Math.abs(recommendSwipeWidget2.LJIILLIIL) - LIZ2);
                            4ZZ r011 = recommendSwipeWidget2.LJIIIIZZ;
                            if (r011 == null) {
                                n.LIZ("");
                            }
                            r011.setLayoutParams(layoutParams10);
                        } else {
                            4ZZ r012 = recommendSwipeWidget2.LJIIIIZZ;
                            if (r012 == null) {
                                n.LIZ("");
                            }
                            ViewGroup.LayoutParams layoutParams11 = r012.getLayoutParams();
                            Objects.requireNonNull(layoutParams11, "null cannot be cast to non-null type android.widget.RelativeLayout.LayoutParams");
                            RelativeLayout.LayoutParams layoutParams12 = (RelativeLayout.LayoutParams) layoutParams11;
                            layoutParams12.bottomMargin = 0;
                            4ZZ r013 = recommendSwipeWidget2.LJIIIIZZ;
                            if (r013 == null) {
                                n.LIZ("");
                            }
                            r013.setLayoutParams(layoutParams12);
                        }
                    }
                } else {
                    LinearLayout linearLayout3 = recommendSwipeWidget2.LIZLLL;
                    if (linearLayout3 == null) {
                        n.LIZ("");
                    }
                    linearLayout3.setVisibility(0);
                    LinearLayout linearLayout4 = recommendSwipeWidget2.LIZJ;
                    if (linearLayout4 == null) {
                        n.LIZ("");
                    }
                    linearLayout4.setVisibility(8);
                    1jk r014 = recommendSwipeWidget2.LJFF;
                    if (r014 == null) {
                        n.LIZ("");
                    }
                    int measuredHeight4 = r014.getMeasuredHeight();
                    4ZZ r015 = recommendSwipeWidget2.LJIIIZ;
                    if (r015 == null) {
                        n.LIZ("");
                    }
                    int measuredHeight5 = r015.getMeasuredHeight();
                    1jk r016 = recommendSwipeWidget2.LJII;
                    if (r016 == null) {
                        n.LIZ("");
                    }
                    int measuredHeight6 = r016.getMeasuredHeight();
                    int i5 = measuredHeight4 + measuredHeight5;
                    float f7 = (float) i5;
                    if (Math.abs(recommendSwipeWidget2.LJIILLIIL) <= f7 || i5 <= 0) {
                        RelativeLayout relativeLayout9 = recommendSwipeWidget2.LJIIJJI;
                        if (relativeLayout9 == null) {
                            n.LIZ("");
                        }
                        ViewGroup.LayoutParams layoutParams13 = relativeLayout9.getLayoutParams();
                        layoutParams13.height = measuredHeight5;
                        RelativeLayout relativeLayout10 = recommendSwipeWidget2.LJIIJJI;
                        if (relativeLayout10 == null) {
                            n.LIZ("");
                        }
                        relativeLayout10.setLayoutParams(layoutParams13);
                        4ZZ r017 = recommendSwipeWidget2.LJIIIZ;
                        if (r017 == null) {
                            n.LIZ("");
                        }
                        ViewGroup.LayoutParams layoutParams14 = r017.getLayoutParams();
                        Objects.requireNonNull(layoutParams14, "null cannot be cast to non-null type android.widget.RelativeLayout.LayoutParams");
                        RelativeLayout.LayoutParams layoutParams15 = (RelativeLayout.LayoutParams) layoutParams14;
                        layoutParams15.bottomMargin = 0;
                        4ZZ r018 = recommendSwipeWidget2.LJIIIZ;
                        if (r018 == null) {
                            n.LIZ("");
                        }
                        r018.setLayoutParams(layoutParams15);
                        4ZZ r019 = recommendSwipeWidget2.LJIIIZ;
                        if (r019 == null) {
                            n.LIZ("");
                        }
                        r019.setAlpha(0.0f);
                        1jk r020 = recommendSwipeWidget2.LJII;
                        if (r020 == null) {
                            n.LIZ("");
                        }
                        r020.setAlpha(0.0f);
                    } else {
                        RelativeLayout relativeLayout11 = recommendSwipeWidget2.LJIIJJI;
                        if (relativeLayout11 == null) {
                            n.LIZ("");
                        }
                        ViewGroup.LayoutParams layoutParams16 = relativeLayout11.getLayoutParams();
                        layoutParams16.height = Math.min(0b0.LIZ(8.0f) + measuredHeight6 + measuredHeight5, (int) (Math.abs(recommendSwipeWidget2.LJIILLIIL) - ((float) measuredHeight4)));
                        RelativeLayout relativeLayout12 = recommendSwipeWidget2.LJIIJJI;
                        if (relativeLayout12 == null) {
                            n.LIZ("");
                        }
                        relativeLayout12.setLayoutParams(layoutParams16);
                        float min3 = Math.min(1.0f, (((Math.abs(recommendSwipeWidget2.LJIILLIIL) - f7) * 1.0f) / ((float) measuredHeight5)) + 0.2f);
                        4ZZ r021 = recommendSwipeWidget2.LJIIIZ;
                        if (r021 == null) {
                            n.LIZ("");
                        }
                        r021.setAlpha(min3);
                        int i6 = i5 + measuredHeight6;
                        float f8 = (float) i6;
                        if (Math.abs(recommendSwipeWidget2.LJIILLIIL) > f8) {
                            RelativeLayout relativeLayout13 = recommendSwipeWidget2.LJIIJJI;
                            if (relativeLayout13 == null) {
                                n.LIZ("");
                            }
                            ViewGroup.LayoutParams layoutParams17 = relativeLayout13.getLayoutParams();
                            Objects.requireNonNull(layoutParams17, "null cannot be cast to non-null type android.widget.LinearLayout.LayoutParams");
                            LinearLayout.LayoutParams layoutParams18 = (LinearLayout.LayoutParams) layoutParams17;
                            layoutParams18.topMargin = (int) Math.min(((float) 0b0.LIZ(28.0f)) * 1.0f, Math.abs(recommendSwipeWidget2.LJIILLIIL) - f8);
                            RelativeLayout relativeLayout14 = recommendSwipeWidget2.LJIIJJI;
                            if (relativeLayout14 == null) {
                                n.LIZ("");
                            }
                            relativeLayout14.setLayoutParams(layoutParams18);
                            float min4 = Math.min(1.0f, (((Math.abs(recommendSwipeWidget2.LJIILLIIL) - f8) * 1.0f) / ((float) measuredHeight6)) + 0.2f);
                            1jk r022 = recommendSwipeWidget2.LJII;
                            if (r022 == null) {
                                n.LIZ("");
                            }
                            r022.setAlpha(min4);
                        } else {
                            1jk r12 = recommendSwipeWidget2.LJII;
                            if (r12 == null) {
                                n.LIZ("");
                            }
                            r12.setAlpha(0.0f);
                            RelativeLayout relativeLayout15 = recommendSwipeWidget2.LJIIJJI;
                            if (relativeLayout15 == null) {
                                n.LIZ("");
                            }
                            ViewGroup.LayoutParams layoutParams19 = relativeLayout15.getLayoutParams();
                            Objects.requireNonNull(layoutParams19, "null cannot be cast to non-null type android.widget.LinearLayout.LayoutParams");
                            LinearLayout.LayoutParams layoutParams20 = (LinearLayout.LayoutParams) layoutParams19;
                            layoutParams20.topMargin = 0;
                            RelativeLayout relativeLayout16 = recommendSwipeWidget2.LJIIJJI;
                            if (relativeLayout16 == null) {
                                n.LIZ("");
                            }
                            relativeLayout16.setLayoutParams(layoutParams20);
                        }
                        float LIZ3 = (float) (i6 + 0b0.LIZ(28.0f));
                        if (Math.abs(recommendSwipeWidget2.LJIILLIIL) > LIZ3) {
                            4ZZ r023 = recommendSwipeWidget2.LJIIIZ;
                            if (r023 == null) {
                                n.LIZ("");
                            }
                            ViewGroup.LayoutParams layoutParams21 = r023.getLayoutParams();
                            Objects.requireNonNull(layoutParams21, "null cannot be cast to non-null type android.widget.RelativeLayout.LayoutParams");
                            RelativeLayout.LayoutParams layoutParams22 = (RelativeLayout.LayoutParams) layoutParams21;
                            layoutParams22.topMargin = (int) Math.min(((float) 0b0.LIZ(8.0f)) * 1.0f, Math.abs(recommendSwipeWidget2.LJIILLIIL) - LIZ3);
                            4ZZ r024 = recommendSwipeWidget2.LJIIIZ;
                            if (r024 == null) {
                                n.LIZ("");
                            }
                            r024.setLayoutParams(layoutParams22);
                        } else {
                            4ZZ r025 = recommendSwipeWidget2.LJIIIZ;
                            if (r025 == null) {
                                n.LIZ("");
                            }
                            ViewGroup.LayoutParams layoutParams23 = r025.getLayoutParams();
                            Objects.requireNonNull(layoutParams23, "null cannot be cast to non-null type android.widget.RelativeLayout.LayoutParams");
                            RelativeLayout.LayoutParams layoutParams24 = (RelativeLayout.LayoutParams) layoutParams23;
                            layoutParams24.topMargin = 0;
                            4ZZ r026 = recommendSwipeWidget2.LJIIIZ;
                            if (r026 == null) {
                                n.LIZ("");
                            }
                            r026.setLayoutParams(layoutParams24);
                        }
                    }
                }
                float LIZ4 = ((float) 0b0.LIZ(8.0f)) * recommendSwipeWidget2.LJIILJJIL;
                View view2 = recommendSwipeWidget2.LIZIZ;
                if (view2 != null) {
                    0b7.LIZ(view2, (int) LIZ4);
                }
                if (recommendSwipeWidget2.LJIJI) {
                    if (recommendSwipeWidget2.LJIILLIIL <= 0.0f) {
                        f3 = -1.0f;
                    }
                    recommendSwipeWidget2.LJIILL = f3;
                    if (Math.abs(recommendSwipeWidget2.LJIILLIIL) < ((float) (recommendSwipeWidget2.LJIJJLI - recommendSwipeWidget2.LJIL)) || recommendSwipeWidget2.LJIJJLI <= 0) {
                        T3q t3q2 = recommendSwipeWidget2.LIZ;
                        if (t3q2 != null) {
                            t3q2.LIZ(recommendSwipeWidget2.LJIILIIL, false);
                        }
                        View view3 = recommendSwipeWidget2.LIZIZ;
                        if (view3 != null) {
                            view3.setTranslationY(recommendSwipeWidget2.LJIILLIIL);
                        }
                    } else {
                        View view4 = recommendSwipeWidget2.LIZIZ;
                        if (view4 != null) {
                            view4.setTranslationY(((float) (recommendSwipeWidget2.LJIJJLI - recommendSwipeWidget2.LJIL)) * recommendSwipeWidget2.LJIILL);
                        }
                        T3q t3q3 = recommendSwipeWidget2.LIZ;
                        if (t3q3 != null) {
                            t3q3.LIZ(recommendSwipeWidget2.LJIILIIL, true);
                        }
                    }
                    View view5 = recommendSwipeWidget2.LIZIZ;
                    if (view5 != null) {
                        view5.setScaleX(recommendSwipeWidget2.LJIILJJIL);
                    }
                    View view6 = recommendSwipeWidget2.LIZIZ;
                    if (view6 != null) {
                        view6.setScaleY(recommendSwipeWidget2.LJIILJJIL);
                    }
                    if (recommendSwipeWidget2.LJIILIIL >= 0.5f && !recommendSwipeWidget2.LJIIZILJ) {
                        try {
                            Object LIZ5 = RecommendSwipeWidget.LIZ(recommendSwipeWidget2.getContext(), "vibrator");
                            if (LIZ5 != null) {
                                ((Vibrator) LIZ5).vibrate(100);
                                recommendSwipeWidget2.LJIIZILJ = true;
                            } else {
                                throw new NullPointerException("null cannot be cast to non-null type android.os.Vibrator");
                            }
                        } catch (Exception e) {
                            0aP.LIZ("ALogger", e);
                        }
                    } else if (((double) recommendSwipeWidget2.LJIILIIL) < 0.4d) {
                        recommendSwipeWidget2.LJIIZILJ = false;
                    }
                }
            }
            livePlayFragment2.LJJJJI.show();
        }
        if (!this.LJIIJ) {
            C3491GtA LIZ6 = C3491GtA.LJFF.LIZ("livesdk_end_to_recommend_draw_show");
            if (!z3) {
                str = "up";
            } else {
                str = "down";
            }
            LIZ6.LIZ("draw_action", str);
            LIZ6.LIZ();
            LIZ6.LIZLLL();
            this.LJIIJ = true;
        }
    }
}
