导航菜单

页面标题

页面副标题

95爱播免登录版 v3.1.9 - AudioShowActivity.java 源代码

正在查看: 95爱播免登录版 v3.1.9 应用的 AudioShowActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.showself.ui.show;

import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.annotation.SuppressLint;
import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.hardware.Camera;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
import android.text.TextUtils;
import android.util.Base64;
import android.util.DisplayMetrics;
import android.util.Property;
import android.view.Display;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewStub;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.inputmethod.InputMethodManager;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.SeekBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.viewpager.widget.ViewPager;
import chat.entity.MessageInfo;
import chat.entity.MessageUserInfo;
import chat.entity.NotificationNumber;
import chat.view.SJChatMenuView;
import com.enmoli.core.util.JsonUtil;
import com.enmoli.themeservice.api.resolver.FragmentType;
import com.enmoli.themeservice.api.resolver.MessageResolver;
import com.enmoli.themeservice.api.resolver.ResolvedMessage;
import com.enmoli.themeservice.domain.RegionType;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.mifeng.ui.R;
import com.mobile.auth.BuildConfig;
import com.r.m.b.a;
import com.r.m.b.d;
import com.r.m.b.e;
import com.showself.domain.CatchData;
import com.showself.domain.ContributionData;
import com.showself.domain.GetRedPacketEnterBean;
import com.showself.domain.GetShowPosterParser;
import com.showself.domain.GiftSeatBean;
import com.showself.domain.LoginResultInfo;
import com.showself.domain.RoomGameType;
import com.showself.domain.RoomMemberInfo;
import com.showself.domain.SharedResultParse;
import com.showself.domain.ShowPosterInfo;
import com.showself.domain.StrBean;
import com.showself.domain.ViewerListInfo;
import com.showself.event.NewsClickEvent;
import com.showself.event.NewsHandleEvent;
import com.showself.event.NewsNoticeInfo;
import com.showself.provider.l.a;
import com.showself.resource.DefaultResourceProvider;
import com.showself.resource.ResourceManager;
import com.showself.show.bean.AnchorBean;
import com.showself.show.bean.BaseInfoInRoom;
import com.showself.show.bean.RoomInfo;
import com.showself.show.bean.box.BoxItemBean;
import com.showself.show.fragment.InputFragment;
import com.showself.show.fragment.JinshanPushFragment;
import com.showself.show.fragment.LiveStopAudienceFragment;
import com.showself.show.fragment.RoomPlayerView;
import com.showself.show.fragment.YJLiveShowLeftView;
import com.showself.show.fragment.YJLiveShowView;
import com.showself.show.view.ChatMenuViewDialog;
import com.showself.show.view.ChatViewDialog;
import com.showself.ui.CardActivity;
import com.showself.ui.HtmlDisplayActivity;
import com.showself.ui.LiveStopActivity;
import com.showself.ui.MessageActivity;
import com.showself.ui.ShowSelfApp;
import com.showself.ui.StorActivity;
import com.showself.ui.activity.ChangeAccountActivity;
import com.showself.ui.juvenile.a.b;
import com.showself.ui.view.SearchSongView;
import com.showself.utils.Utils;
import com.showself.utils.c1.a;
import com.showself.utils.d;
import com.showself.view.CustomViewPager;
import com.showself.view.DragChooseView;
import com.showself.view.FullScreenRelativeLayout;
import com.showself.view.ImmersiveStatusBar;
import com.showself.view.MusicModeView;
import com.showself.view.RedPacketCountdownView;
import com.showself.view.f0;
import com.showself.view.webview.SJWebView;
import com.sina.weibo.sdk.auth.Oauth2AccessToken;
import com.sina.weibo.sdk.statistic.LogBuilder;
import com.tencent.smtt.export.external.interfaces.IX5WebChromeClient;
import com.tencent.smtt.sdk.TbsListener;
import com.tencent.smtt.sdk.WebChromeClient;
import com.tencent.smtt.sdk.WebView;
import com.tencent.tauth.AuthActivity;
import com.xiaomi.mipush.sdk.Constants;
import easyphotos.models.album.entity.Photo;
import java.io.File;
import java.lang.ref.WeakReference;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Timer;
import java.util.TimerTask;
import org.apache.log4j.spi.LocationInfo;
import org.cocos2dx.lib.Cocos2dxActivity;
import org.cocos2dx.lib.Cocos2dxHelper;
import org.cocos2dx.lib.GameControllerDelegate;
import org.greenrobot.eventbus.ThreadMode;
import org.jivesoftware.smack.PacketListener;
import org.jivesoftware.smack.packet.Packet;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class AudioShowActivity extends Cocos2dxActivity {
    public int A0;
    private int A1;
    private q1 B;
    private RelativeLayout B0;
    public boolean B1;
    private n1 C;
    private RelativeLayout C0;
    private String C1;
    private RelativeLayout D0;
    public Handler D1;
    private RelativeLayout E0;
    public Handler E1;
    private RelativeLayout F0;
    public Handler F1;
    private HandlerThread G;
    private RelativeLayout G0;
    public RoomInfo G1;
    private Timer H;
    private RelativeLayout H0;
    private boolean H1;
    private String I;
    private RelativeLayout I0;
    private boolean I1;
    public int J0;
    private FrameLayout J1;
    private ImageView K;
    public int K0;
    private LinearLayout K1;
    public int L0;
    private ArrayList<ShowPosterInfo> L1;
    public List<BoxItemBean> M0;
    ViewerListInfo M1;
    public int N;
    private RelativeLayout N0;
    public View.OnClickListener N1;
    private RelativeLayout O0;
    public String O1;
    private Timer P;
    private ImageView P0;
    private String P1;
    private SJWebView Q0;
    private boolean Q1;
    private RelativeLayout R;
    private boolean R0;
    private ProgressDialog R1;
    private com.r.m.d.o S;
    private com.m.a.b S0;
    public boolean S1;
    private JinshanPushFragment T;
    public com.showself.view.f0 T0;
    private com.showself.view.q T1;
    private RoomPlayerView U;
    private String U0;
    private com.showself.view.q U1;
    private com.r.m.d.y V;
    private ArrayList<Integer> V0;
    public com.showself.view.q V1;
    private CustomViewPager W;
    private com.r.m.d.q W0;
    private String W1;
    public YJLiveShowView X;
    private com.r.m.d.u X0;
    public com.showself.view.e0 X1;
    private YJLiveShowLeftView Y;
    private int Y0;
    public MusicModeView Y1;
    private boolean Z;
    private String Z0;
    private boolean Z1;
    public int a;
    private List<GiftSeatBean> a0;
    private boolean a1;
    public boolean a2;
    public int b;
    public int b0;
    private com.r.m.d.l b1;
    private BroadcastReceiver b2;
    private androidx.fragment.app.g c;
    public int c0;
    private View c1;
    public int c2;
    public InputFragment d;
    private Timer d0;
    public String d1;
    public int d2;

    public boolean f3269e;
    private RelativeLayout e0;
    private String e1;
    private int e2;

    private int f3270f;
    private RelativeLayout f0;
    private com.showself.view.q f1;
    private SeekBar.OnSeekBarChangeListener f2;

    private boolean f3271g;
    private ImageView g0;
    public com.r.i.e g1;
    private boolean g2;

    public LoginResultInfo f3272h;
    private SeekBar h0;
    private int h1;
    private View.OnClickListener h2;

    private r1 f3273i;
    private int i0;
    private String i1;

    private com.showself.view.q f3274j;
    private p1 j0;
    private String j1;

    public BaseInfoInRoom f3275k;
    private FrameLayout k0;
    private boolean k1;
    public AnchorBean l;
    private int l0;
    private ChatMenuViewDialog l1;
    private TextView m;
    private f0.c m0;
    private ChatViewDialog m1;
    public HashMap<String, ArrayList<f.d.a>> n;
    private File n0;
    private com.r.m.d.k n1;
    public ArrayList<f.d.b> o;
    private d.d.c o0;
    private PropertyValuesHolder o1;
    public boolean p;
    private NotificationNumber p0;
    private PropertyValuesHolder p1;
    private TextView q;
    private RelativeLayout q0;
    public boolean q1;
    private ImageView r;
    private RelativeLayout.LayoutParams r0;
    public String r1;
    private FrameLayout s;
    private RelativeLayout.LayoutParams s0;
    public boolean s1;
    private ArrayList<GetRedPacketEnterBean> t0;
    private com.showself.view.q t1;
    private ArrayList<GetRedPacketEnterBean> u0;
    private SearchSongView u1;
    private com.showself.view.j v;
    private ArrayList<GetRedPacketEnterBean> v0;
    private int v1;
    private boolean w;
    private List<com.showself.view.x> w0;
    private String w1;
    private List<RedPacketCountdownView> x0;
    private String x1;
    private List<t1> y0;
    private int y1;
    private FullScreenRelativeLayout z;
    public int z0;
    private String z1;
    public boolean t = false;
    public boolean u = true;
    public int x = -1;
    public RoomGameType y = RoomGameType.NONE;
    private int[] A = {R.drawable.start_count_3, R.drawable.start_count_2, R.drawable.start_count_1};
    private List<JSONObject> J = Collections.synchronizedList(new ArrayList());
    private int L = 0;
    public int M = 0;
    public int O = 0;
    private com.r.m.e.b Q = null;

    class a extends Handler {
        a(AudioShowActivity audioShowActivity) {
        }

        @Override
        public void handleMessage(Message message) {
            super.handleMessage(message);
        }
    }

    class a0 implements Runnable {
        final String a;

        a0(String str) {
            this.a = str;
        }

        @Override
        public void run() {
            AudioShowActivity.this.initSmallHostGm(this.a);
        }
    }

    class a1 implements DefaultResourceProvider.GetVersionCallBack {
        final long a;

        class a implements DefaultResourceProvider.GetDataCallBack {
            a(a1 a1Var) {
            }

            @Override
            public void callBackData() {
            }
        }

        a1(AudioShowActivity audioShowActivity, long j2) {
            this.a = j2;
        }

        @Override
        public void callBackVersion(int i2) {
            if (i2 == -1) {
                return;
            }
            long j2 = i2;
            long j3 = this.a;
            if (j2 != j3) {
                if (j3 > j2) {
                    j3 = 0;
                }
                ResourceManager.getProvider().getPCRsData(i2, (int) j3, new a(this));
            }
        }
    }

    class b implements Runnable {
        final JSONObject a;

        b(JSONObject jSONObject) {
            this.a = jSONObject;
        }

        @Override
        public void run() {
            JSONObject jSONObject = this.a;
            if (jSONObject != null) {
                AudioShowActivity.this.P2(jSONObject);
            }
        }
    }

    class b0 extends Handler {
        b0() {
        }

        @Override
        public void handleMessage(Message message) {
            AudioShowActivity audioShowActivity = AudioShowActivity.this;
            if (audioShowActivity == null || audioShowActivity.Q1) {
                com.showself.utils.p.a("AudioShowActivity", "mVipHandler->mShouldExitActivity=true");
                return;
            }
            AudioShowActivity audioShowActivity2 = AudioShowActivity.this;
            YJLiveShowView yJLiveShowView = audioShowActivity2.X;
            if (yJLiveShowView == null) {
                return;
            }
            int i2 = message.what;
            if (i2 != 100) {
                if (i2 != 101) {
                    return;
                }
                yJLiveShowView.z2(Boolean.FALSE);
                AudioShowActivity.this.u = true;
                return;
            }
            if (audioShowActivity2.u) {
                return;
            }
            yJLiveShowView.z2(Boolean.FALSE);
            AudioShowActivity.this.u = true;
        }
    }

    class b1 implements Runnable {

        class a implements a.c {
            final Bundle a;

            a(Bundle bundle) {
                this.a = bundle;
            }

            @Override
            public void a(int i2) {
                if (i2 > 0) {
                    this.a.putInt("fuid", i2);
                    AudioShowActivity.this.K3(this.a);
                }
            }
        }

        b1() {
        }

        @Override
        public void run() {
            Bundle bundle = new Bundle();
            bundle.putString("favatar", d.c.a.n().i());
            bundle.putString("fnickname", d.c.a.n().j());
            bundle.putString("isOfficial", "1");
            com.showself.provider.l.a.c().e(AudioShowActivity.this, new a(bundle));
        }
    }

    class c implements Runnable {
        c() {
        }

        @Override
        public void run() {
            if (ShowSelfApp.h().c) {
                AudioShowActivity.this.removeGmLayer();
                AudioShowActivity.this.f3(0);
            }
        }
    }

    class c0 implements Runnable {
        c0() {
        }

        @Override
        public void run() {
            AudioShowActivity.this.removeGmLayer();
        }
    }

    class c1 implements Runnable {
        final String a;

        c1(String str) {
            this.a = str;
        }

        @Override
        public void run() {
            AudioShowActivity.this.appToCocoXmppMessage(this.a);
        }
    }

    class d extends Thread {
        d() {
        }

        @Override
        public void run() {
            AudioShowActivity.this.n = ResourceManager.getSJGiftListData();
            AudioShowActivity.this.o = ResourceManager.getSJGiftTplsListData();
        }
    }

    class d0 implements com.showself.utils.l {
        d0() {
        }

        @Override
        public void a(boolean z) {
            if (z) {
                AudioShowActivity.this.s3();
                Intent intent = new Intent((Context) AudioShowActivity.this, (Class<?>) LiveStopActivity.class);
                intent.putExtra("isMaster", true);
                AudioShowActivity.this.startActivity(intent);
                AudioShowActivity.this.finish();
            }
        }
    }

    class d1 implements com.showself.utils.l {
        d1(AudioShowActivity audioShowActivity) {
        }

        @Override
        public void a(boolean z) {
        }
    }

    class e implements View.OnClickListener {
        e() {
        }

        @Override
        public void onClick(View view) {
            AudioShowActivity.this.g2();
        }
    }

    class e0 implements com.r.c.d {
        e0() {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
            AudioShowActivity.this.Y1((JSONObject) obj);
        }
    }

    class e1 implements DragChooseView.a {
        final TextView a;

        e1(TextView textView) {
            this.a = textView;
        }

        @Override
        public void a(int i2, String str) {
            AudioShowActivity.this.h1 = i2;
            if (i2 == 0) {
                this.a.setTextSize(14.0f);
            } else if (i2 == 1) {
                this.a.setTextSize(16.0f);
            } else {
                this.a.setTextSize(18.0f);
            }
        }
    }

    class f implements View.OnClickListener {
        f() {
        }

        @Override
        public void onClick(View view) {
            AudioShowActivity.this.g2();
        }
    }

    class f0 implements com.r.c.d {
        f0() {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
            AudioShowActivity.this.Y1((JSONObject) obj);
        }
    }

    class f1 implements View.OnClickListener {
        f1() {
        }

        @Override
        public void onClick(View view) {
            com.r.n.g j2 = com.r.n.g.j();
            com.r.n.d c = com.r.n.d.c();
            c.e("TreasureBox");
            c.f("TreasureBoxPage");
            c.d("FontChange");
            c.h(com.r.n.e.Click);
            c.a(Oauth2AccessToken.KEY_UID, Integer.valueOf(AudioShowActivity.this.f3272h.getUserId()));
            c.a("roomid", Integer.valueOf(AudioShowActivity.this.Q1()));
            c.a("status", Integer.valueOf(AudioShowActivity.this.h1 + 1));
            j2.u(c.b());
            Utils.a1("设置成功");
            com.showself.utils.r0.H0(AudioShowActivity.this.f3272h.getUserId(), AudioShowActivity.this.h1);
            AudioShowActivity.this.t1();
        }
    }

    class g extends WebChromeClient {
        private View a = null;
        private IX5WebChromeClient.CustomViewCallback b = null;

        g() {
        }

        @Override
        public void onHideCustomView() {
            if (this.a != null) {
                IX5WebChromeClient.CustomViewCallback customViewCallback = this.b;
                if (customViewCallback != null) {
                    customViewCallback.onCustomViewHidden();
                    this.b = null;
                }
                ViewGroup viewGroup = (ViewGroup) this.a.getParent();
                viewGroup.removeView(this.a);
                viewGroup.addView(AudioShowActivity.this.Q0);
                this.a = null;
            }
        }

        @Override
        public void onShowCustomView(View view, IX5WebChromeClient.CustomViewCallback customViewCallback) {
            IX5WebChromeClient.CustomViewCallback customViewCallback2 = this.b;
            if (customViewCallback2 != null) {
                customViewCallback2.onCustomViewHidden();
                this.b = null;
                return;
            }
            ViewGroup viewGroup = (ViewGroup) AudioShowActivity.this.Q0.getParent();
            viewGroup.removeView(AudioShowActivity.this.Q0);
            viewGroup.addView(view);
            this.a = view;
            this.b = customViewCallback;
        }
    }

    class g0 implements Runnable {
        final JSONObject a;

        g0(JSONObject jSONObject) {
            this.a = jSONObject;
        }

        @Override
        public void run() {
            AudioShowActivity.this.toSendRequestCallback(this.a.toString());
        }
    }

    class g1 implements DialogInterface.OnDismissListener {
        g1() {
        }

        @Override
        public void onDismiss(DialogInterface dialogInterface) {
            AudioShowActivity.this.Z3();
        }
    }

    class h implements com.r.c.d {
        h() {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
            AudioShowActivity.this.a2((HashMap) obj);
        }
    }

    class h0 implements Runnable {
        h0() {
        }

        @Override
        public void run() {
            AudioShowActivity.this.showPlaneGmMaximize();
        }
    }

    class h1 implements Comparator<BoxItemBean> {
        h1(AudioShowActivity audioShowActivity) {
        }

        @Override
        public int compare(BoxItemBean boxItemBean, BoxItemBean boxItemBean2) {
            return boxItemBean.seq > boxItemBean2.seq ? 1 : -1;
        }
    }

    class i implements Runnable {
        i() {
        }

        @Override
        public void run() {
            YJLiveShowView yJLiveShowView = AudioShowActivity.this.X;
            if (yJLiveShowView != null) {
                yJLiveShowView.g1();
            }
        }
    }

    class i0 extends TimerTask {
        int a = 0;

        class a implements Runnable {
            a() {
            }

            @Override
            public void run() {
                i0 i0Var = i0.this;
                int i2 = i0Var.a;
                if (i2 < 5) {
                    i0Var.a = i2 + 1;
                }
            }
        }

        i0() {
        }

        @Override
        public void run() {
            AudioShowActivity.this.runOnUiThread(new a());
        }
    }

    class i1 extends com.sjnet.j.b {
        i1() {
        }

        @Override
        public void e(int i2, String str, com.sjnet.j.a aVar) {
            if (i2 == 0) {
                String e2 = aVar.e("str");
                AudioShowActivity.this.A1 = Integer.valueOf(e2).intValue();
            }
        }
    }

    class j extends Handler {
        j() {
        }

        @Override
        public void handleMessage(Message message) {
            AudioShowActivity audioShowActivity = AudioShowActivity.this;
            if (audioShowActivity == null || audioShowActivity.Q1) {
                com.showself.utils.p.a("AudioShowActivity", "mGuideHandler->mShouldExitActivity=true");
                return;
            }
            try {
                int i2 = message.what;
                AudioShowActivity audioShowActivity2 = AudioShowActivity.this;
                int i3 = audioShowActivity2.J0;
                if (i2 == i3) {
                    if (audioShowActivity2.K0 > 0) {
                        sendEmptyMessageDelayed(i3, 1000L);
                    } else {
                        int i4 = audioShowActivity2.L0;
                        if (i4 == 1) {
                            audioShowActivity2.F0.setVisibility(8);
                            AudioShowActivity.this.G0.setVisibility(0);
                            AudioShowActivity audioShowActivity3 = AudioShowActivity.this;
                            audioShowActivity3.K0 = 3;
                            sendEmptyMessageDelayed(audioShowActivity3.J0, 1000L);
                            AudioShowActivity.this.L0 = 2;
                        } else if (i4 == 2) {
                            audioShowActivity2.G0.setVisibility(8);
                            AudioShowActivity.this.D0.setVisibility(0);
                            sendEmptyMessageDelayed(AudioShowActivity.this.J0, 1000L);
                            AudioShowActivity audioShowActivity4 = AudioShowActivity.this;
                            audioShowActivity4.K0 = 3;
                            audioShowActivity4.L0 = 3;
                        } else if (i4 == 3) {
                            audioShowActivity2.D0.setVisibility(8);
                            AudioShowActivity.this.E0.setVisibility(0);
                            sendEmptyMessageDelayed(AudioShowActivity.this.J0, 1000L);
                            AudioShowActivity audioShowActivity5 = AudioShowActivity.this;
                            audioShowActivity5.K0 = 3;
                            audioShowActivity5.L0 = 4;
                        } else if (i4 != 4) {
                            if (i4 == 5) {
                                removeMessages(i3);
                            }
                        } else if (com.blankj.utilcode.util.d.a().equals("2.6.0")) {
                            AudioShowActivity.this.E0.setVisibility(8);
                            AudioShowActivity.this.H0.setVisibility(0);
                            sendEmptyMessageDelayed(AudioShowActivity.this.J0, 1000L);
                            AudioShowActivity audioShowActivity6 = AudioShowActivity.this;
                            audioShowActivity6.K0 = 3;
                            audioShowActivity6.L0 = 5;
                        } else if (com.blankj.utilcode.util.d.a().equals("3.1.0")) {
                            AudioShowActivity.this.E0.setVisibility(8);
                            AudioShowActivity.this.I0.setVisibility(0);
                            sendEmptyMessageDelayed(AudioShowActivity.this.J0, 1000L);
                            AudioShowActivity audioShowActivity7 = AudioShowActivity.this;
                            audioShowActivity7.K0 = 3;
                            audioShowActivity7.L0 = 5;
                            com.showself.utils.r0.I0(false);
                        } else {
                            removeMessages(AudioShowActivity.this.J0);
                            AudioShowActivity.this.E0.setVisibility(8);
                            AudioShowActivity.this.B0.setVisibility(8);
                            AudioShowActivity.this.C0.setVisibility(8);
                        }
                    }
                    AudioShowActivity.this.K0--;
                }
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
    }

    class j0 implements DialogInterface.OnDismissListener {
        j0() {
        }

        @Override
        public void onDismiss(DialogInterface dialogInterface) {
            AudioShowActivity.this.Z3();
            AudioShowActivity.this.R3();
        }
    }

    static class j1 {
        static final int[] a;
        static final int[] b;
        static final int[] c;

        static {
            int[] iArr = new int[b.a.values().length];
            c = iArr;
            try {
                iArr[b.a.FINISH_ACTIVITY.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            int[] iArr2 = new int[e.a.values().length];
            b = iArr2;
            try {
                iArr2[e.a.RECALLED_MESSAGE.ordinal()] = 1;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                b[e.a.SHOW_TOP_CHAT.ordinal()] = 2;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                b[e.a.SHOW_CHAT.ordinal()] = 3;
            } catch (NoSuchFieldError unused4) {
            }
            try {
                b[e.a.SHOW_SERVICECENTER.ordinal()] = 4;
            } catch (NoSuchFieldError unused5) {
            }
            try {
                b[e.a.SHOW_CHAT_MSG.ordinal()] = 5;
            } catch (NoSuchFieldError unused6) {
            }
            try {
                b[e.a.RESUME_MINIMIZED_GAME.ordinal()] = 6;
            } catch (NoSuchFieldError unused7) {
            }
            try {
                b[e.a.FIGHTKING_START.ordinal()] = 7;
            } catch (NoSuchFieldError unused8) {
            }
            try {
                b[e.a.FIGHTKING_END.ordinal()] = 8;
            } catch (NoSuchFieldError unused9) {
            }
            try {
                b[e.a.AUDIO_SHOW_ITEM_BEAUTY_DIALOG_DISMISS.ordinal()] = 9;
            } catch (NoSuchFieldError unused10) {
            }
            try {
                b[e.a.CHANGE_ACCOUNT.ordinal()] = 10;
            } catch (NoSuchFieldError unused11) {
            }
            try {
                b[e.a.KICK_OUT.ordinal()] = 11;
            } catch (NoSuchFieldError unused12) {
            }
            try {
                b[e.a.SHOW_GIFT_DIALOG.ordinal()] = 12;
            } catch (NoSuchFieldError unused13) {
            }
            try {
                b[e.a.CANCEL_PK_INVITE.ordinal()] = 13;
            } catch (NoSuchFieldError unused14) {
            }
            int[] iArr3 = new int[NewsClickEvent.Type.values().length];
            a = iArr3;
            try {
                iArr3[NewsClickEvent.Type.PULL_UP_POSTER.ordinal()] = 1;
            } catch (NoSuchFieldError unused15) {
            }
            try {
                a[NewsClickEvent.Type.PULL_UP_GIFT.ordinal()] = 2;
            } catch (NoSuchFieldError unused16) {
            }
            try {
                a[NewsClickEvent.Type.PULL_UP_GIFT_NORMAL.ordinal()] = 3;
            } catch (NoSuchFieldError unused17) {
            }
            try {
                a[NewsClickEvent.Type.REFRESH_CONTRIBUTION.ordinal()] = 4;
            } catch (NoSuchFieldError unused18) {
            }
            try {
                a[NewsClickEvent.Type.REFRESH_CONTRIBUTION_DATA.ordinal()] = 5;
            } catch (NoSuchFieldError unused19) {
            }
            try {
                a[NewsClickEvent.Type.PULL_UP_GIFT_BY_TAB_ID.ordinal()] = 6;
            } catch (NoSuchFieldError unused20) {
            }
        }
    }

    class k implements Runnable {
        k() {
        }

        @Override
        public void run() {
            AudioShowActivity audioShowActivity = AudioShowActivity.this;
            if (audioShowActivity == null || audioShowActivity.Q1) {
                com.showself.utils.p.a("AudioShowActivity", "TASK_SHOW_ENTER->sub thread->mShouldExitActivity=true");
                return;
            }
            try {
                AudioShowActivity audioShowActivity2 = AudioShowActivity.this;
                audioShowActivity2.M1(audioShowActivity2.f3272h.getUserId());
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
    }

    class k0 implements DialogInterface.OnDismissListener {
        k0() {
        }

        @Override
        public void onDismiss(DialogInterface dialogInterface) {
            AudioShowActivity.this.Z3();
            AudioShowActivity.this.R3();
        }
    }

    class k1 implements Runnable {
        final RelativeLayout.LayoutParams a;

        k1(RelativeLayout.LayoutParams layoutParams) {
            this.a = layoutParams;
        }

        @Override
        public void run() {
            AudioShowActivity.this.T0.d();
            ?? r0 = AudioShowActivity.this;
            r0.addContentView(((AudioShowActivity) r0).c1, this.a);
        }
    }

    class l extends com.r.m.e.c {
        l(Object obj) {
            super(obj);
        }

        @Override
        public void a(JSONObject jSONObject) {
            if (jSONObject == null) {
                AudioShowActivity.this.j1();
                return;
            }
            boolean z = false;
            JSONObject optJSONObject = jSONObject.optJSONObject("status");
            if (optJSONObject != null && optJSONObject.optInt("statuscode") == 0) {
                z = true;
            }
            if (z) {
                AudioShowActivity.this.k1();
            } else {
                AudioShowActivity.this.j1();
            }
        }
    }

    class l0 implements Runnable {
        l0() {
        }

        @Override
        public void run() {
            AudioShowActivity audioShowActivity = AudioShowActivity.this;
            if (audioShowActivity == null || audioShowActivity.Q1) {
                com.showself.utils.p.a("AudioShowActivity", "onStart->sub thread->mShouldExitActivity=true");
                return;
            }
            AudioShowActivity audioShowActivity2 = AudioShowActivity.this;
            audioShowActivity2.initWithFrameContainer(audioShowActivity2.s);
            AudioShowActivity.this.setShouldHandleTouch(false);
            AudioShowActivity.this.H1 = true;
            Cocos2dxHelper.onResume();
            AudioShowActivity.this.mGLSurfaceView.onResume();
        }
    }

    class l1 implements com.showself.utils.l {
        l1(AudioShowActivity audioShowActivity) {
        }

        @Override
        public void a(boolean z) {
        }
    }

    class m implements Runnable {
        m() {
        }

        @Override
        public void run() {
            AudioShowActivity audioShowActivity = AudioShowActivity.this;
            if (audioShowActivity == null || audioShowActivity.Q1) {
                com.showself.utils.p.a("AudioShowActivity", "TASK_SHOW_ENTER->sub thread->mShouldExitActivity=true");
                return;
            }
            try {
                AudioShowActivity audioShowActivity2 = AudioShowActivity.this;
                audioShowActivity2.M1(audioShowActivity2.f3272h.getUserId());
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
    }

    class m0 implements DialogInterface.OnDismissListener {
        m0() {
        }

        @Override
        public void onDismiss(DialogInterface dialogInterface) {
            AudioShowActivity.this.X.T1();
        }
    }

    class m1 implements com.showself.utils.l {
        m1(AudioShowActivity audioShowActivity) {
        }

        @Override
        public void a(boolean z) {
        }
    }

    class n implements Runnable {
        n() {
        }

        @Override
        public void run() {
            AudioShowActivity.this.C1(R.string.dialog_text_can_not_connect_serv);
        }
    }

    class n0 implements d.e.e {
        n0() {
        }

        public void a(int i2) {
            BaseInfoInRoom baseInfoInRoom = AudioShowActivity.this.f3275k;
            if (baseInfoInRoom != null) {
                baseInfoInRoom.setRelation(i2);
            }
            YJLiveShowView yJLiveShowView = AudioShowActivity.this.X;
            if (yJLiveShowView != null) {
                yJLiveShowView.setRelation(i2);
            }
        }
    }

    private class n1 extends Handler {
        public n1(Looper looper) {
            super(looper);
        }

        @Override
        public void handleMessage(Message message) {
            AudioShowActivity audioShowActivity = AudioShowActivity.this;
            if (audioShowActivity == null || audioShowActivity.Q1) {
                com.showself.utils.p.a("AudioShowActivity", "IntervalHandler->mShouldExitActivity=true");
            } else {
                if (AudioShowActivity.this.C == null) {
                    return;
                }
                int i2 = message.what;
            }
        }
    }

    class o implements Runnable {
        o() {
        }

        @Override
        public void run() {
            AudioShowActivity.this.U1();
            AudioShowActivity.this.W3();
            AudioShowActivity audioShowActivity = AudioShowActivity.this;
            if (audioShowActivity.q1) {
                audioShowActivity.O4(true);
                AudioShowActivity.this.s4();
                AudioShowActivity audioShowActivity2 = AudioShowActivity.this;
                audioShowActivity2.w4(audioShowActivity2.w1, true);
            }
        }
    }

    class o0 implements SJChatMenuView.l {
        o0() {
        }

        public void a(MessageUserInfo messageUserInfo) {
            if (com.showself.provider.l.a.d(messageUserInfo.getFuid())) {
                com.showself.provider.l.a.c().f(AudioShowActivity.this, "");
            } else {
                AudioShowActivity.this.J3(messageUserInfo.getFuid(), messageUserInfo.getNickname(), messageUserInfo.getAvatar(), messageUserInfo.getIsOfficial());
            }
            d.c.a n = d.c.a.n();
            d.h.b c = d.h.b.c();
            c.e("Chat");
            c.f("PrivateChat");
            c.d("User");
            c.g(d.h.c.a);
            n.G(c.b());
            AudioShowActivity.this.l3("Room", messageUserInfo.getFuid());
        }
    }

    private class o1 implements Runnable {
        private Packet a;

        class a implements Runnable {
            final JSONObject a;

            a(JSONObject jSONObject) {
                this.a = jSONObject;
            }

            @Override
            public void run() {
                AudioShowActivity.this.appToCocoXmppMessage(this.a.toString());
            }
        }

        public o1(Packet packet) {
            this.a = packet;
        }

        @Override
        public void run() {
            int i2;
            StringBuilder sb;
            int i3;
            JSONObject optJSONObject;
            boolean z;
            String str = "";
            try {
                String body = ((org.jivesoftware.smack.packet.Message) this.a).getBody();
                if (TextUtils.isEmpty(body) || AudioShowActivity.this.f3275k == null) {
                    return;
                }
                String replaceAll = body.replaceAll("<!\\[CDATA\\[", "").replaceAll("\\]\\]>", "");
                JSONObject jSONObject = new JSONObject(replaceAll);
                int optInt = jSONObject.optInt("type");
                int optInt2 = jSONObject.optInt("roomid");
                if (optInt == 222 || optInt2 == AudioShowActivity.this.f3270f) {
                    AudioShowActivity.this.Z0(optInt2, jSONObject, replaceAll);
                    if (optInt == 104) {
                        AudioShowActivity.this.X.setPaoPaoCount(jSONObject.optInt("flowerCount"));
                        return;
                    }
                    if (optInt == 105) {
                        AudioShowActivity.this.X.setPaoPaoCount(jSONObject.optInt("flowerCount"));
                        int optInt3 = jSONObject.optInt("count");
                        int optInt4 = jSONObject.optInt("subtype");
                        String optString = jSONObject.optString("avatar");
                        boolean optBoolean = jSONObject.optBoolean("showAvatar");
                        if (AudioShowActivity.this.f3272h.getUserId() != jSONObject.optInt(Oauth2AccessToken.KEY_UID)) {
                            if (optBoolean) {
                                str = optString;
                            }
                            AudioShowActivity.this.X.x0(optInt3, optInt4 - 1, str);
                            return;
                        } else {
                            if (AudioShowActivity.this.f3272h.getUserId() == jSONObject.optInt(Oauth2AccessToken.KEY_UID) && optBoolean) {
                                AudioShowActivity.this.X.x0(1, optInt4 - 1, optString);
                                return;
                            }
                            return;
                        }
                    }
                    if (optInt != 208) {
                        if (optInt == 209) {
                            long optLong = jSONObject.optLong("gift_add_hostvalue");
                            String optString2 = jSONObject.optString("to_uid");
                            int optInt5 = jSONObject.optInt("coinAmount");
                            int optInt6 = jSONObject.optInt(Oauth2AccessToken.KEY_UID);
                            if (AudioShowActivity.this.l != null) {
                                if (optString2.equals(AudioShowActivity.this.l.getAnchor_uid() + "")) {
                                    AudioShowActivity.this.X.u0(optLong);
                                    if (optInt6 == AudioShowActivity.this.f3272h.getUserId()) {
                                        AudioShowActivity.this.A1 += optInt5;
                                        return;
                                    }
                                    return;
                                }
                                return;
                            }
                            return;
                        }
                        if (optInt == 234) {
                            i2 = 0;
                            if (AudioShowActivity.this.q1 && jSONObject.optInt("subtype") == 43 && jSONObject.optInt(Oauth2AccessToken.KEY_UID) == AudioShowActivity.this.f3272h.getUserId()) {
                                String optString3 = jSONObject.optString("text");
                                if (!TextUtils.isEmpty(optString3)) {
                                    new com.showself.show.view.h(AudioShowActivity.this, optString3).show();
                                }
                            }
                            AudioShowActivity.this.a3();
                            AudioShowActivity.this.X.M0(jSONObject);
                        } else {
                            if (optInt != 235) {
                                if (optInt == 273) {
                                    YJLiveShowView yJLiveShowView = AudioShowActivity.this.X;
                                    if (yJLiveShowView != null) {
                                        yJLiveShowView.J0(jSONObject);
                                        return;
                                    }
                                    return;
                                }
                                if (optInt == 274) {
                                    YJLiveShowView yJLiveShowView2 = AudioShowActivity.this.X;
                                    if (yJLiveShowView2 != null) {
                                        yJLiveShowView2.P0(jSONObject);
                                        return;
                                    }
                                    return;
                                }
                                if (optInt == 334) {
                                    YJLiveShowView yJLiveShowView3 = AudioShowActivity.this.X;
                                    if (yJLiveShowView3 != null) {
                                        yJLiveShowView3.J2(jSONObject);
                                        return;
                                    }
                                    return;
                                }
                                if (optInt == 335) {
                                    AudioShowActivity audioShowActivity = AudioShowActivity.this;
                                    YJLiveShowView yJLiveShowView4 = audioShowActivity.X;
                                    if (yJLiveShowView4 != null) {
                                        yJLiveShowView4.L0(jSONObject, audioShowActivity.l.getAnchor_uid());
                                        return;
                                    }
                                    return;
                                }
                                if (optInt != 3009) {
                                    if (optInt == 3010) {
                                        com.showself.utils.p.a("ArAnimation-取消脸萌消息", replaceAll);
                                        JSONArray jSONArray = jSONObject.getJSONArray("ar_ids");
                                        if (jSONArray == null || jSONArray.length() == 0 || AudioShowActivity.this.n1 == null) {
                                            return;
                                        }
                                        AudioShowActivity.this.n1.g(jSONArray);
                                        return;
                                    }
                                    switch (optInt) {
                                        case 107:
                                            break;
                                        case 114:
                                            JSONObject jSONObject2 = new JSONObject(jSONObject.optString("dataJson"));
                                            if (jSONObject2.optString("taskUrl") != null) {
                                                AudioShowActivity.this.C3(jSONObject2.optString("taskUrl"));
                                                break;
                                            }
                                            break;
                                        case 116:
                                            if (!AudioShowActivity.this.q1) {
                                                String optString4 = jSONObject.optString("popUrl");
                                                String optString5 = jSONObject.optString("data");
                                                if (!TextUtils.isEmpty(optString5)) {
                                                    optString5 = URLEncoder.encode(optString5);
                                                }
                                                String str2 = optString5;
                                                int optInt7 = jSONObject.optInt("width");
                                                int optInt8 = jSONObject.optInt("height");
                                                if (optString4.contains(LocationInfo.NA)) {
                                                    sb = new StringBuilder();
                                                    sb.append(optString4);
                                                    sb.append("&alertData=");
                                                    sb.append(str2);
                                                } else {
                                                    sb = new StringBuilder();
                                                    sb.append(optString4);
                                                    sb.append("?alertData=");
                                                    sb.append(str2);
                                                }
                                                String sb2 = sb.toString();
                                                com.r.m.d.u uVar = AudioShowActivity.this.X0;
                                                ?? r9 = AudioShowActivity.this;
                                                uVar.d(r9, sb2, str2, optInt7, optInt8, ((AudioShowActivity) r9).f3270f);
                                                break;
                                            }
                                            break;
                                        case 121:
                                            String optString6 = jSONObject.optString("subposterurl");
                                            if (!TextUtils.isEmpty(optString6)) {
                                                AudioShowActivity.this.X.G1(optString6, jSONObject.optString("data"));
                                                break;
                                            }
                                            break;
                                        case TbsListener.ErrorCode.COPY_SRCDIR_ERROR:
                                            if (AudioShowActivity.this.Q != null) {
                                                JSONObject jSONObject3 = new JSONObject();
                                                jSONObject3.put("type", TbsListener.ErrorCode.COPY_EXCEPTION);
                                                jSONObject3.put("subtype", TbsListener.ErrorCode.COPY_SRCDIR_ERROR);
                                                jSONObject3.put(Oauth2AccessToken.KEY_UID, AudioShowActivity.this.f3272h.getUserId());
                                                jSONObject3.put("responseid", jSONObject.optString("responseid"));
                                                jSONObject3.put("roomid", AudioShowActivity.this.f3270f);
                                                AudioShowActivity.this.Q.z(new com.r.m.e.c(jSONObject3.toString()));
                                            }
                                            if (AudioShowActivity.this.f3272h.getUserId() == jSONObject.optInt(Oauth2AccessToken.KEY_UID)) {
                                                AudioShowActivity.this.f3275k.setSilent(0);
                                                break;
                                            }
                                            break;
                                        case TbsListener.ErrorCode.INSTALL_SUCCESS_AND_RELEASE_LOCK:
                                            AudioShowActivity audioShowActivity2 = AudioShowActivity.this;
                                            if (!audioShowActivity2.q1) {
                                                audioShowActivity2.U.D(null);
                                                AudioShowActivity.this.K1.setVisibility(8);
                                                break;
                                            } else {
                                                audioShowActivity2.w4(null, false);
                                                break;
                                            }
                                        case TbsListener.ErrorCode.TPATCH_BACKUP_NOT_VALID:
                                            if (jSONObject.optInt("subtype") == 1) {
                                                AudioShowActivity.this.d.M0();
                                                AudioShowActivity.this.X.u0(jSONObject.optLong("gift_add_hostvalue"));
                                                break;
                                            }
                                            break;
                                        case 252:
                                            if (AudioShowActivity.this.X != null && (i3 = jSONObject.getInt("roomid")) != 0 && i3 == AudioShowActivity.this.f3270f) {
                                                AudioShowActivity.this.X.E1(jSONObject.getInt(Oauth2AccessToken.KEY_UID));
                                                break;
                                            }
                                            break;
                                        case WebView.NORMAL_MODE_ALPHA:
                                            AudioShowActivity audioShowActivity3 = AudioShowActivity.this;
                                            if (audioShowActivity3.q1) {
                                                audioShowActivity3.X.G0();
                                                com.showself.utils.k0.k().F(jSONObject.optInt("gameCode", -1));
                                                com.showself.utils.k0.k().G(Boolean.TRUE);
                                                if (AudioShowActivity.this.T1 != null && AudioShowActivity.this.T1.e() && AudioShowActivity.this.v != null) {
                                                    AudioShowActivity.this.v.t();
                                                    break;
                                                }
                                            }
                                            break;
                                        case 260:
                                            int optInt9 = jSONObject.optInt("subtype");
                                            if (AudioShowActivity.this.q1 && optInt9 == 11) {
                                                String optString7 = jSONObject.optString("dataJson");
                                                String replace = optString7.replace("'", "\"");
                                                if (!TextUtils.isEmpty(optString7)) {
                                                    optString7 = URLEncoder.encode(optString7);
                                                }
                                                String str3 = optString7;
                                                int optInt10 = jSONObject.optInt("width");
                                                int optInt11 = jSONObject.optInt("height");
                                                String optString8 = new JSONObject(replace).optString("dialogueUrl");
                                                if (!TextUtils.isEmpty(optString8)) {
                                                    com.r.m.d.u uVar2 = AudioShowActivity.this.X0;
                                                    ?? r92 = AudioShowActivity.this;
                                                    uVar2.e(r92, optString8, str3, optInt10, optInt11, ((AudioShowActivity) r92).f3270f);
                                                }
                                            }
                                            AudioShowActivity audioShowActivity4 = AudioShowActivity.this;
                                            if (audioShowActivity4.q1 && optInt9 == 13 && audioShowActivity4.f3270f == jSONObject.optInt("roomid") && (optJSONObject = jSONObject.optJSONObject("dataJson")) != null) {
                                                new com.showself.show.view.g((Context) AudioShowActivity.this, optJSONObject).show();
                                                break;
                                            }
                                            break;
                                        case 270:
                                            AudioShowActivity.this.X.K0(jSONObject);
                                            break;
                                        case 276:
                                            if (jSONObject.optInt("subtype") == 1) {
                                                AudioShowActivity.this.d.M0();
                                                break;
                                            }
                                            break;
                                        case 278:
                                            YJLiveShowView yJLiveShowView5 = AudioShowActivity.this.X;
                                            if (yJLiveShowView5 != null) {
                                                yJLiveShowView5.Q0(jSONObject);
                                                break;
                                            }
                                            break;
                                        case 299:
                                            if (ShowSelfApp.h().c) {
                                                AudioShowActivity.this.runOnGLThread(new a(jSONObject));
                                                break;
                                            }
                                            break;
                                        case 337:
                                            String optString9 = jSONObject.optString("dataJson");
                                            AudioShowActivity audioShowActivity5 = AudioShowActivity.this;
                                            audioShowActivity5.r1 = optString9;
                                            audioShowActivity5.c1();
                                            YJLiveShowView yJLiveShowView6 = AudioShowActivity.this.X;
                                            if (yJLiveShowView6 != null) {
                                                yJLiveShowView6.g1();
                                                break;
                                            }
                                            break;
                                        case 350:
                                            if (AudioShowActivity.this.Q != null) {
                                                AudioShowActivity.this.Q.n();
                                            }
                                            AudioShowActivity.this.finish();
                                            Utils.X0(R.string.text_already_push);
                                        case 400:
                                            com.showself.utils.p.a("BindPhoneMsg", jSONObject.toString());
                                            if (AudioShowActivity.this.f3272h.getUserId() == jSONObject.optInt(Oauth2AccessToken.KEY_UID)) {
                                                String optString10 = jSONObject.optString("phone_number");
                                                if (!TextUtils.isEmpty(optString10)) {
                                                    AudioShowActivity.this.f3272h.setMobile(optString10);
                                                    AudioShowActivity.this.f3272h.setMobilestatus(1);
                                                    ?? r2 = AudioShowActivity.this;
                                                    com.showself.utils.r0.b(r2, r2.f3272h);
                                                    break;
                                                }
                                            }
                                            break;
                                        default:
                                            switch (optInt) {
                                                case 201:
                                                    AudioShowActivity.this.G1.setLive_status(2);
                                                    AudioShowActivity.this.U.setLiveStatus(2);
                                                    AudioShowActivity.this.U.D(null);
                                                    jSONObject.put(Oauth2AccessToken.KEY_UID, "");
                                                    break;
                                                case 202:
                                                    JSONObject optJSONObject2 = jSONObject.optJSONObject("anchorPower");
                                                    if (optJSONObject2 != null) {
                                                        AudioShowActivity.this.X.A2(optJSONObject2);
                                                    }
                                                    AudioShowActivity.this.H4(jSONObject);
                                                    AudioShowActivity.this.G4(jSONObject);
                                                    break;
                                                case 203:
                                                    if (AudioShowActivity.this.f3272h.getUserId() == jSONObject.optInt(Oauth2AccessToken.KEY_UID)) {
                                                        if (AudioShowActivity.this.Q != null) {
                                                            JSONObject jSONObject4 = new JSONObject();
                                                            jSONObject4.put("type", TbsListener.ErrorCode.COPY_EXCEPTION);
                                                            jSONObject4.put("subtype", 203);
                                                            jSONObject4.put(Oauth2AccessToken.KEY_UID, AudioShowActivity.this.f3272h.getUserId());
                                                            jSONObject4.put("responseid", jSONObject.optString("responseid"));
                                                            jSONObject4.put("roomid", AudioShowActivity.this.f3270f);
                                                            AudioShowActivity.this.Q.z(new com.r.m.e.c(jSONObject4.toString()));
                                                        }
                                                        AudioShowActivity.this.f3275k.setSilent(1);
                                                    }
                                                    jSONObject.put(Oauth2AccessToken.KEY_UID, "");
                                                    break;
                                                case 204:
                                                    if (AudioShowActivity.this.f3272h.getUserId() == jSONObject.optInt(Oauth2AccessToken.KEY_UID) && AudioShowActivity.this.Q != null) {
                                                        Toast.makeText(AudioShowActivity.this.getApplicationContext(), R.string.dialog_text_get_kicked, 0).show();
                                                        AudioShowActivity.this.finish();
                                                        break;
                                                    }
                                                    break;
                                                case 205:
                                                    if (AudioShowActivity.this.Q != null) {
                                                        JSONObject jSONObject5 = new JSONObject();
                                                        jSONObject5.put("type", TbsListener.ErrorCode.COPY_EXCEPTION);
                                                        jSONObject5.put("subtype", 205);
                                                        jSONObject5.put(Oauth2AccessToken.KEY_UID, AudioShowActivity.this.f3272h.getUserId());
                                                        jSONObject5.put("responseid", jSONObject.optString("responseid"));
                                                        jSONObject5.put("roomid", AudioShowActivity.this.f3270f);
                                                        AudioShowActivity.this.Q.z(new com.r.m.e.c(jSONObject5.toString()));
                                                    }
                                                    if (AudioShowActivity.this.f3272h.getUserId() == jSONObject.optInt(Oauth2AccessToken.KEY_UID)) {
                                                        AudioShowActivity.this.f3275k.setRole(1);
                                                        Toast.makeText((Context) AudioShowActivity.this, (CharSequence) "主播把你设置为场控", 0).show();
                                                        break;
                                                    }
                                                    break;
                                                case 206:
                                                    if (AudioShowActivity.this.f3272h.getUserId() == jSONObject.optInt(Oauth2AccessToken.KEY_UID)) {
                                                        AudioShowActivity.this.f3275k.setRole(0);
                                                        Toast.makeText((Context) AudioShowActivity.this, (CharSequence) "您已被取消场控身份", 0).show();
                                                    }
                                                    if (AudioShowActivity.this.Q != null) {
                                                        JSONObject jSONObject6 = new JSONObject();
                                                        jSONObject6.put("type", TbsListener.ErrorCode.COPY_EXCEPTION);
                                                        jSONObject6.put("subtype", 206);
                                                        jSONObject6.put(Oauth2AccessToken.KEY_UID, AudioShowActivity.this.f3272h.getUserId());
                                                        jSONObject6.put("responseid", jSONObject.optString("responseid"));
                                                        jSONObject6.put("roomid", AudioShowActivity.this.f3270f);
                                                        AudioShowActivity.this.Q.z(new com.r.m.e.c(jSONObject6.toString()));
                                                        break;
                                                    }
                                                    break;
                                                default:
                                                    switch (optInt) {
                                                        case TbsListener.ErrorCode.COPY_INSTALL_SUCCESS:
                                                            String optString11 = jSONObject.optString("vnum_plus_guest");
                                                            String optString12 = jSONObject.optString("guest");
                                                            if (!TextUtils.isEmpty(optString11) && !TextUtils.isEmpty(optString12)) {
                                                                AudioShowActivity.this.f3275k.setMember_num(optString11);
                                                                break;
                                                            }
                                                            break;
                                                        case TbsListener.ErrorCode.INCRUPDATE_INSTALL_SUCCESS:
                                                            int optInt12 = jSONObject.optInt("liveStatus");
                                                            if (optInt12 == 3) {
                                                                ?? r22 = AudioShowActivity.this;
                                                                if (r22.q1) {
                                                                    r22.D1(r22.getString(R.string.dialog_text_get_kicked));
                                                                    AudioShowActivity.this.s3();
                                                                }
                                                                AudioShowActivity audioShowActivity6 = AudioShowActivity.this;
                                                                if (!audioShowActivity6.q1 && audioShowActivity6.v1 == 0) {
                                                                    AnchorBean anchorBean = AudioShowActivity.this.l;
                                                                    if (anchorBean == null || anchorBean.getAnchor_uid() != AudioShowActivity.this.f3272h.getUserId()) {
                                                                        int optInt13 = jSONObject.optInt("visitCount");
                                                                        int optInt14 = jSONObject.optInt("money");
                                                                        JSONArray optJSONArray = jSONObject.optJSONArray("roomlist");
                                                                        if (optJSONArray != null && optJSONArray.length() == 2) {
                                                                            JSONObject optJSONObject3 = optJSONArray.optJSONObject(0);
                                                                            JSONObject optJSONObject4 = optJSONArray.optJSONObject(1);
                                                                            int optInt15 = optJSONObject3.optInt("roomid");
                                                                            int optInt16 = optJSONObject4.optInt("roomid");
                                                                            int optInt17 = optJSONObject3.optInt("visitor");
                                                                            int optInt18 = optJSONObject4.optInt("visitor");
                                                                            String optString13 = optJSONObject3.optString("nickname");
                                                                            String optString14 = optJSONObject4.optString("nickname");
                                                                            String optString15 = optJSONObject3.optString("big_avatar");
                                                                            String optString16 = optJSONObject4.optString("big_avatar");
                                                                            String optString17 = optJSONObject3.optString("levelUrl");
                                                                            String optString18 = optJSONObject4.optString("levelUrl");
                                                                            if (AudioShowActivity.this.getRequestedOrientation() == 0) {
                                                                                z = true;
                                                                                AudioShowActivity.this.setRequestedOrientation(1);
                                                                            } else {
                                                                                z = true;
                                                                            }
                                                                            AudioShowActivity.this.w = z;
                                                                            AudioShowActivity.this.P3(optInt13, optInt15, optInt16, optString15, optString16, optInt17, optInt18, optString13, optString14, optInt14, optString17, optString18);
                                                                        }
                                                                        InputFragment inputFragment = AudioShowActivity.this.d;
                                                                        if (inputFragment != null) {
                                                                            inputFragment.A0();
                                                                            AudioShowActivity.this.d.p0();
                                                                            AudioShowActivity.this.d.q0();
                                                                        }
                                                                        if (AudioShowActivity.this.U1 != null && AudioShowActivity.this.U1.e()) {
                                                                            AudioShowActivity.this.U1.b();
                                                                        }
                                                                        com.showself.view.q qVar = AudioShowActivity.this.V1;
                                                                        if (qVar != null && qVar.e()) {
                                                                            AudioShowActivity.this.V1.b();
                                                                        }
                                                                        com.showself.view.e0 e0Var = AudioShowActivity.this.X1;
                                                                        if (e0Var != null) {
                                                                            e0Var.e();
                                                                        }
                                                                    } else if (!Utils.v0(LiveStopActivity.class.getCanonicalName())) {
                                                                        Intent intent = new Intent((Context) AudioShowActivity.this, (Class<?>) LiveStopActivity.class);
                                                                        intent.putExtra("isMaster", true);
                                                                        AudioShowActivity.this.startActivity(intent);
                                                                        AudioShowActivity.this.finish();
                                                                    }
                                                                }
                                                                AudioShowActivity audioShowActivity7 = AudioShowActivity.this;
                                                                if (!audioShowActivity7.q1 && audioShowActivity7.v1 != 0) {
                                                                    AudioShowActivity.this.X.T0();
                                                                }
                                                            }
                                                            AudioShowActivity.this.G1.setLive_status(optInt12);
                                                            AudioShowActivity.this.X.F1();
                                                            AudioShowActivity.this.U.setLiveStatus(optInt12);
                                                            AudioShowActivity.this.U.D(null);
                                                            if (optInt12 == 1 && AudioShowActivity.this.v1 != 0) {
                                                                AudioShowActivity.this.X.e2();
                                                                break;
                                                            }
                                                            break;
                                                        case TbsListener.ErrorCode.UNLZMA_FAIURE:
                                                            if (!TextUtils.isEmpty(jSONObject.optString("base64RichText"))) {
                                                                JSONObject jSONObject7 = new JSONObject(new String(Base64.decode(jSONObject.optString("base64RichText"), 0)));
                                                                AudioShowActivity.this.X.d2(jSONObject7.optString("text"), jSONObject7.optString("redirecturl"));
                                                                break;
                                                            } else {
                                                                AudioShowActivity.this.X.d2(jSONObject.optString("richtext"), null);
                                                                break;
                                                            }
                                                        case TbsListener.ErrorCode.EXCEED_LZMA_RETRY_NUM:
                                                            String optString19 = jSONObject.optString("base64RichText");
                                                            int optInt19 = jSONObject.optInt("subtype");
                                                            if (optInt19 == 6) {
                                                                AudioShowActivity.this.B(56);
                                                            }
                                                            if (optInt19 == 3) {
                                                                Utils.Z0(AudioShowActivity.this, jSONObject.toString());
                                                            }
                                                            if (optInt19 != 4 && optInt19 != 5) {
                                                                if (optInt19 == 41 || optInt19 == 42) {
                                                                    int optInt20 = jSONObject.optInt("newlevel");
                                                                    if (AudioShowActivity.this.f3272h.getUserId() == jSONObject.optInt(Oauth2AccessToken.KEY_UID)) {
                                                                        ?? r3 = AudioShowActivity.this;
                                                                        r3.b0 = optInt20;
                                                                        com.showself.utils.r0.c1(r3, r3.f3272h.getUserId(), AudioShowActivity.this.f3272h.getAvatar(), AudioShowActivity.this.f3272h.getUserName(), ResourceManager.getWealthUrl(AudioShowActivity.this.b0));
                                                                        AudioShowActivity audioShowActivity8 = AudioShowActivity.this;
                                                                        audioShowActivity8.f3272h.setCredit_level(audioShowActivity8.b0);
                                                                        ?? r23 = AudioShowActivity.this;
                                                                        com.showself.utils.r0.b(r23, r23.f3272h);
                                                                    }
                                                                    if (optInt19 == 41 && AudioShowActivity.this.X != null) {
                                                                        AudioShowActivity.this.X.y2(jSONObject.optString("normal_level_url"));
                                                                        break;
                                                                    }
                                                                }
                                                            }
                                                            if (!TextUtils.isEmpty(optString19)) {
                                                                JSONObject jSONObject8 = new JSONObject(new String(Base64.decode(optString19, 0)));
                                                                AudioShowActivity.this.X.n2(jSONObject8.optString("text"), jSONObject8.optString("redirecturl"));
                                                                break;
                                                            } else {
                                                                AudioShowActivity.this.X.n2(jSONObject.optString("richtext"), null);
                                                                break;
                                                            }
                                                            break;
                                                    }
                                            }
                                    }
                                }
                                com.showself.utils.p.a("ArAnimation-佩戴脸萌消息", replaceAll);
                                int optInt21 = jSONObject.optInt("ar_id");
                                if (optInt21 <= 0 || AudioShowActivity.this.n1 == null) {
                                    return;
                                }
                                AudioShowActivity.this.n1.l(jSONObject.optInt("duration", 1), optInt21, 1);
                                return;
                            }
                            i2 = 0;
                        }
                        long optLong2 = new JSONObject(jSONObject.optString("dataJson")).optLong("basetime");
                        if (jSONObject.optInt("productId") == 7612 && !com.showself.utils.k0.y()) {
                            int optInt22 = jSONObject.optInt("roomid");
                            JSONArray optJSONArray2 = jSONObject.optJSONArray("packetList");
                            if (optJSONArray2 != null) {
                                while (i2 < optJSONArray2.length()) {
                                    JSONObject optJSONObject5 = optJSONArray2.optJSONObject(i2);
                                    if (optJSONObject5 != null) {
                                        String optString20 = optJSONObject5.optString("avatar");
                                        String optString21 = optJSONObject5.optString("nickname");
                                        int optInt23 = optJSONObject5.optInt(Oauth2AccessToken.KEY_UID);
                                        int optInt24 = optJSONObject5.optInt("gameId");
                                        long optLong3 = optJSONObject5.optLong("dateline");
                                        GetRedPacketEnterBean getRedPacketEnterBean = new GetRedPacketEnterBean();
                                        getRedPacketEnterBean.setSendAvatar(optString20);
                                        getRedPacketEnterBean.setSendNickName(optString21);
                                        getRedPacketEnterBean.setGameId(optInt24);
                                        getRedPacketEnterBean.setRoomId(optInt22);
                                        getRedPacketEnterBean.setSendUid(optInt23);
                                        getRedPacketEnterBean.setDateline(optLong3);
                                        getRedPacketEnterBean.setBasetime(optLong2);
                                        if (optLong3 - optLong2 > 0) {
                                            AudioShowActivity.this.y4(getRedPacketEnterBean);
                                        } else {
                                            AudioShowActivity.this.f4(getRedPacketEnterBean);
                                        }
                                    }
                                    i2++;
                                }
                                return;
                            }
                            return;
                        }
                        return;
                    }
                    if (jSONObject.optInt("isAppShow") == 2) {
                        return;
                    }
                    String optString22 = jSONObject.optString("vnum_plus_guest");
                    String optString23 = jSONObject.optString("guest");
                    if (TextUtils.isEmpty(optString22) || TextUtils.isEmpty(optString23)) {
                        return;
                    }
                    AudioShowActivity.this.f3275k.setMember_num(optString22);
                }
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
    }

    class p extends com.sjnet.j.b {
        p() {
        }

        @Override
        public void e(int i2, String str, com.sjnet.j.a aVar) {
            if (i2 == 0) {
                StrBean strBean = (StrBean) aVar.a(StrBean.class);
                AudioShowActivity.this.z1 = strBean.getStr();
                AudioShowActivity.this.l1();
            }
        }
    }

    class p0 implements com.r.c.d {
        p0(AudioShowActivity audioShowActivity) {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
        }
    }

    static class p1 extends Handler {
        WeakReference<AudioShowActivity> a;

        p1(AudioShowActivity audioShowActivity) {
            this.a = new WeakReference<>(audioShowActivity);
        }

        @Override
        public void handleMessage(Message message) {
            AudioShowActivity audioShowActivity = this.a.get();
            int i2 = message.what;
            if (i2 == 1001) {
                audioShowActivity.Q2();
            } else {
                if (i2 != 1007) {
                    return;
                }
                audioShowActivity.k2();
            }
        }
    }

    class q implements com.r.c.d {
        q(AudioShowActivity audioShowActivity) {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
        }
    }

    class q0 extends TimerTask {
        q0() {
        }

        @Override
        public void run() {
            try {
                AudioShowActivity audioShowActivity = AudioShowActivity.this;
                if (audioShowActivity.M > 0) {
                    audioShowActivity.n3();
                }
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
    }

    private class q1 extends BroadcastReceiver {
        private q1() {
        }

        @Override
        public void onReceive(Context context, Intent intent) {
            if ((Utils.q0(context) && Utils.u0(context)) || AudioShowActivity.this.f3275k == null || Utils.o0()) {
                return;
            }
            AudioShowActivity.this.M2(R.string.dialog_text_net_wrong);
        }

        q1(AudioShowActivity audioShowActivity, j jVar) {
            this();
        }
    }

    class r implements com.showself.utils.l {
        r() {
        }

        @Override
        public void a(boolean z) {
            AudioShowActivity.this.finish();
        }
    }

    class r0 extends BroadcastReceiver {
        r0() {
        }

        @Override
        public void onReceive(Context context, Intent intent) {
            int intExtra;
            if (com.showself.utils.e0.b.equals(intent.getAction()) || "com.showself.receive_openfiremsg".equals(intent.getAction())) {
                YJLiveShowView yJLiveShowView = AudioShowActivity.this.X;
                if (yJLiveShowView != null) {
                    yJLiveShowView.E2();
                    return;
                }
                return;
            }
            if ("sjchat_recall".equals(intent.getAction())) {
                AudioShowActivity.this.W2(intent.getIntExtra("userId", 0));
                AudioShowActivity.this.V2();
            } else {
                if (!"sjchat_follow".equals(intent.getAction()) || (intExtra = intent.getIntExtra("relation", -1)) == -1) {
                    return;
                }
                BaseInfoInRoom baseInfoInRoom = AudioShowActivity.this.f3275k;
                if (baseInfoInRoom != null) {
                    baseInfoInRoom.setRelation(intExtra);
                }
                YJLiveShowView yJLiveShowView2 = AudioShowActivity.this.X;
                if (yJLiveShowView2 != null) {
                    yJLiveShowView2.setRelation(intExtra);
                }
                AudioShowActivity.this.Y2();
            }
        }
    }

    private class r1 implements PacketListener {
        private r1() {
        }

        @Override
        public void processPacket(Packet packet) {
            ?? r0 = AudioShowActivity.this;
            r0.runOnUiThread(new o1(packet));
        }

        r1(AudioShowActivity audioShowActivity, j jVar) {
            this();
        }
    }

    class s implements com.showself.utils.l {
        s() {
        }

        @Override
        public void a(boolean z) {
            if (!z) {
                AudioShowActivity.this.finish();
            } else if (Utils.w0()) {
                AudioShowActivity.this.k3();
            } else {
                AudioShowActivity.this.C();
                AudioShowActivity.this.finish();
            }
        }
    }

    class s0 implements Runnable {
        s0() {
        }

        @Override
        public void run() {
            if (AudioShowActivity.this.H1 && ShowSelfApp.h().c) {
                AudioShowActivity.this.removeGmLayer();
                AudioShowActivity.this.f3(0);
            }
        }
    }

    class t implements com.showself.utils.l {
        t() {
        }

        @Override
        public void a(boolean z) {
            if (!z) {
                AudioShowActivity.this.finish();
                return;
            }
            Intent intent = new Intent();
            intent.setAction("SHOWSELF_SESSION_EXPIRED_ACTION");
            intent.setPackage(Utils.P());
            intent.putExtra("skip_to_page", 1);
            AudioShowActivity.this.sendBroadcast(intent);
            AudioShowActivity.this.finish();
        }
    }

    class t0 implements SeekBar.OnSeekBarChangeListener {
        t0() {
        }

        @Override
        public void onProgressChanged(SeekBar seekBar, int i2, boolean z) {
            if (z) {
                AudioShowActivity.this.e2 = i2;
            }
        }

        @Override
        public void onStartTrackingTouch(SeekBar seekBar) {
        }

        @Override
        public void onStopTrackingTouch(SeekBar seekBar) {
            AudioShowActivity.this.U.A(AudioShowActivity.this.e2);
            AudioShowActivity.this.U.B(AudioShowActivity.this.e2);
        }
    }

    class t1 extends CountDownTimer {
        GetRedPacketEnterBean a;
        RedPacketCountdownView b;

        public t1(long j2, long j3, GetRedPacketEnterBean getRedPacketEnterBean, RedPacketCountdownView redPacketCountdownView) {
            super(j2, j3);
            this.a = getRedPacketEnterBean;
            this.b = redPacketCountdownView;
        }

        @Override
        public void onFinish() {
            AudioShowActivity.this.f4(this.a);
            AudioShowActivity.this.x0.remove(this.b);
            if (AudioShowActivity.this.q0.getChildAt(0) == null || AudioShowActivity.this.q0.getChildAt(0) != this.b) {
                return;
            }
            AudioShowActivity.this.q0.removeView(this.b);
            if (AudioShowActivity.this.x0.size() > 0) {
                AudioShowActivity.this.q0.addView((View) AudioShowActivity.this.x0.get(0));
            } else {
                AudioShowActivity.this.q0.setVisibility(8);
            }
        }

        @Override
        public void onTick(long j2) {
            int parseInt = Integer.parseInt(String.valueOf(j2)) / 1000;
            if (parseInt == 0) {
                return;
            }
            StringBuffer stringBuffer = new StringBuffer();
            int i2 = parseInt / 60;
            if (i2 >= 10) {
                stringBuffer.append(i2 + Constants.COLON_SEPARATOR);
            } else if (i2 >= 10 || i2 <= 0) {
                stringBuffer.append("00:");
            } else {
                stringBuffer.append("0" + i2 + Constants.COLON_SEPARATOR);
            }
            int i3 = parseInt % 60;
            if (i3 >= 10) {
                stringBuffer.append(i3);
            } else if (i3 >= 10 || i3 <= 0) {
                stringBuffer.append("00");
            } else {
                stringBuffer.append("0" + i3);
            }
            this.b.setTimeData(stringBuffer.toString());
            if (AudioShowActivity.this.q0.getVisibility() != 0) {
                AudioShowActivity.this.q0.setVisibility(0);
            }
        }
    }

    class u extends Handler {
        u() {
        }

        @Override
        public void handleMessage(Message message) {
            AudioShowActivity audioShowActivity = AudioShowActivity.this;
            if (audioShowActivity == null || audioShowActivity.Q1) {
                com.showself.utils.p.a("AudioShowActivity", "mVipHandler->mShouldExitActivity=true");
            } else {
                if (AudioShowActivity.this.X == null) {
                }
            }
        }
    }

    class u0 implements View.OnClickListener {
        u0() {
        }

        @Override
        public void onClick(View view) {
            AudioShowActivity.this.g2 = !r2.g2;
            if (AudioShowActivity.this.g2) {
                AudioShowActivity.this.g0.setBackgroundResource(R.drawable.qyvideo_pause_btn);
                AudioShowActivity.this.U.w();
            } else {
                AudioShowActivity.this.g0.setBackgroundResource(R.drawable.qyvideo_start_btn);
                AudioShowActivity.this.U.C();
            }
        }
    }

    class v implements com.showself.utils.l {
        v() {
        }

        @Override
        public void a(boolean z) {
            AudioShowActivity.this.finish();
        }
    }

    class v0 implements com.r.c.d {
        v0() {
        }

        @Override
        public void onRequestFinish(com.r.c.c cVar, Object obj) {
            JSONObject jSONObject = (JSONObject) obj;
            if (jSONObject != null) {
                if (jSONObject.optInt("statuscode") == 0) {
                    AudioShowActivity.this.A(jSONObject.optJSONObject("data").optInt("roomid"), jSONObject.optJSONObject("data").optString("param_quality"));
                    return;
                }
                if (jSONObject.optInt("statuscode") != -4108) {
                    Utils.Z0(AudioShowActivity.this, jSONObject.optString("message"));
                    return;
                }
                Intent intent = new Intent((Context) AudioShowActivity.this, (Class<?>) HtmlDisplayActivity.class);
                intent.putExtra("title", AudioShowActivity.this.getResources().getString(R.string.identification_usercard));
                intent.putExtra("url", com.showself.utils.r0.o(AudioShowActivity.this) + "/realName");
                AudioShowActivity.this.startActivity(intent);
            }
        }
    }

    class w implements View.OnClickListener {
        w() {
        }

        @Override
        public void onClick(View view) {
            String str;
            GiftSeatBean giftSeatBean;
            if (Utils.o0()) {
            }
            switch (view.getId()) {
                case R.id.ll_forbid_talk:
                    ViewerListInfo viewerListInfo = (ViewerListInfo) ((View) view.getParent().getParent()).getTag();
                    if (viewerListInfo != null) {
                        AudioShowActivity.this.e4(1, viewerListInfo);
                        break;
                    }
                    break;
                case R.id.ll_his_home:
                    int intValue = view.getTag() != null ? ((Integer) view.getTag()).intValue() : 0;
                    ViewerListInfo viewerListInfo2 = (ViewerListInfo) ((View) view.getParent().getParent()).getTag();
                    if (viewerListInfo2 != null) {
                        if (intValue == 1) {
                            Utils.Y0(AudioShowActivity.this, R.string.anonymous_can_not_check_profile_note);
                        } else {
                            Intent intent = new Intent(AudioShowActivity.this.getApplicationContext(), (Class<?>) CardActivity.class);
                            intent.putExtra("id", viewerListInfo2.uid);
                            AudioShowActivity.this.startActivityForResult(intent, 100);
                        }
                    }
                    if (AudioShowActivity.this.U1 != null && AudioShowActivity.this.U1.e()) {
                        AudioShowActivity.this.U1.b();
                        break;
                    }
                    break;
                case R.id.ll_kicking_user:
                    ViewerListInfo viewerListInfo3 = (ViewerListInfo) ((View) view.getParent().getParent()).getTag();
                    if (viewerListInfo3 != null) {
                        AudioShowActivity.this.e4(2, viewerListInfo3);
                        break;
                    }
                    break;
                case R.id.ll_promote_manager:
                    ViewerListInfo viewerListInfo4 = (ViewerListInfo) ((View) view.getParent().getParent()).getTag();
                    if (viewerListInfo4 != null) {
                        AudioShowActivity audioShowActivity = AudioShowActivity.this;
                        audioShowActivity.M1 = viewerListInfo4;
                        audioShowActivity.q = (TextView) view.findViewById(R.id.tv_promote_manager);
                        AudioShowActivity.this.r = (ImageView) view.findViewById(R.id.iv_promote_manager);
                        int i2 = viewerListInfo4.role;
                        if (i2 != 0) {
                            if (i2 != 1) {
                                if (i2 == 2) {
                                    Toast.makeText(AudioShowActivity.this.getApplicationContext(), "该用户为主播", 0).show();
                                    break;
                                }
                            } else {
                                AudioShowActivity.this.p3(8, viewerListInfo4.uid, "");
                                break;
                            }
                        } else {
                            AudioShowActivity.this.p3(7, viewerListInfo4.uid, "");
                            break;
                        }
                    }
                    break;
                case R.id.ll_talkto_other:
                    ViewerListInfo viewerListInfo5 = (ViewerListInfo) ((View) view.getParent().getParent()).getTag();
                    AudioShowActivity.this.I3(viewerListInfo5.uid, viewerListInfo5.nickname, viewerListInfo5.avatar);
                    AudioShowActivity.this.U1.b();
                    AudioShowActivity.this.u1();
                    AudioShowActivity.this.r1();
                    break;
                case R.id.ll_tip_off:
                    ViewerListInfo viewerListInfo6 = (ViewerListInfo) ((View) view.getParent().getParent()).getTag();
                    if (viewerListInfo6 != null) {
                        if (ResourceManager.getConstantsInt("h5.user.report.enabled") != 1) {
                            AudioShowActivity.this.d.X0(viewerListInfo6.uid);
                            break;
                        } else {
                            String constantsString = ResourceManager.getConstantsString("h5.user.report");
                            if (!TextUtils.isEmpty(constantsString)) {
                                if (constantsString.contains(LocationInfo.NA)) {
                                    str = constantsString + "&";
                                } else {
                                    str = constantsString + LocationInfo.NA;
                                }
                                StringBuilder sb = new StringBuilder();
                                sb.append(str);
                                sb.append("uid=");
                                sb.append(viewerListInfo6.uid);
                                sb.append("&roomId=");
                                sb.append(AudioShowActivity.this.Q1());
                                sb.append("&isAnchor=");
                                sb.append(viewerListInfo6.role == 2 ? 1 : 0);
                                String sb2 = sb.toString();
                                Intent intent2 = new Intent();
                                intent2.setClass(AudioShowActivity.this, HtmlDisplayActivity.class);
                                intent2.putExtra("type", 2);
                                intent2.putExtra("url", sb2);
                                intent2.putExtra("noTitleBar", true);
                                AudioShowActivity.this.startActivity(intent2);
                                break;
                            }
                        }
                    }
                    break;
                case R.id.rl_champion:
                case R.id.rl_secondplace:
                case R.id.rl_thirdplace:
                    if (view.getTag() != null && (giftSeatBean = (GiftSeatBean) view.getTag()) != null) {
                        AudioShowActivity.this.q4(giftSeatBean.getUid());
                        break;
                    }
                    break;
                case R.id.rl_fensi_zhouxing:
                    AudioShowActivity audioShowActivity2 = AudioShowActivity.this;
                    Handler handler = audioShowActivity2.D1;
                    if (handler != null) {
                        handler.removeMessages(audioShowActivity2.J0);
                    }
                    AudioShowActivity.this.H0.setVisibility(8);
                    AudioShowActivity.this.B0.setVisibility(8);
                    AudioShowActivity.this.C0.setVisibility(8);
                    break;
                case R.id.rl_gift_box:
                    AudioShowActivity audioShowActivity3 = AudioShowActivity.this;
                    Handler handler2 = audioShowActivity3.D1;
                    if (handler2 != null) {
                        handler2.removeMessages(audioShowActivity3.J0);
                    }
                    AudioShowActivity.this.I0.setVisibility(8);
                    AudioShowActivity.this.B0.setVisibility(8);
                    AudioShowActivity.this.C0.setVisibility(8);
                    break;
                case R.id.rl_room_play_help:
                    AudioShowActivity audioShowActivity4 = AudioShowActivity.this;
                    int i3 = audioShowActivity4.L0;
                    if (i3 == 1) {
                        Handler handler3 = audioShowActivity4.D1;
                        if (handler3 != null) {
                            handler3.removeMessages(audioShowActivity4.J0);
                        }
                        AudioShowActivity audioShowActivity5 = AudioShowActivity.this;
                        audioShowActivity5.K0 = 3;
                        audioShowActivity5.D1.sendEmptyMessage(audioShowActivity5.J0);
                        AudioShowActivity.this.D0.setVisibility(8);
                        AudioShowActivity.this.E0.setVisibility(8);
                        AudioShowActivity.this.G0.setVisibility(0);
                        AudioShowActivity.this.F0.setVisibility(8);
                    } else if (i3 == 2) {
                        Handler handler4 = audioShowActivity4.D1;
                        if (handler4 != null) {
                            handler4.removeMessages(audioShowActivity4.J0);
                        }
                        AudioShowActivity audioShowActivity6 = AudioShowActivity.this;
                        audioShowActivity6.K0 = 3;
                        audioShowActivity6.D1.sendEmptyMessage(audioShowActivity6.J0);
                        AudioShowActivity.this.D0.setVisibility(0);
                        AudioShowActivity.this.E0.setVisibility(8);
                        AudioShowActivity.this.F0.setVisibility(8);
                        AudioShowActivity.this.G0.setVisibility(8);
                    } else if (i3 == 3) {
                        Handler handler5 = audioShowActivity4.D1;
                        if (handler5 != null) {
                            handler5.removeMessages(audioShowActivity4.J0);
                        }
                        AudioShowActivity audioShowActivity7 = AudioShowActivity.this;
                        audioShowActivity7.K0 = 3;
                        audioShowActivity7.D1.sendEmptyMessage(audioShowActivity7.J0);
                        AudioShowActivity.this.D0.setVisibility(8);
                        AudioShowActivity.this.E0.setVisibility(0);
                        AudioShowActivity.this.F0.setVisibility(8);
                        AudioShowActivity.this.G0.setVisibility(8);
                    } else if (i3 == 4) {
                        if (com.blankj.utilcode.util.d.a().equals("2.6.0")) {
                            AudioShowActivity audioShowActivity8 = AudioShowActivity.this;
                            Handler handler6 = audioShowActivity8.D1;
                            if (handler6 != null) {
                                handler6.removeMessages(audioShowActivity8.J0);
                            }
                            AudioShowActivity audioShowActivity9 = AudioShowActivity.this;
                            audioShowActivity9.K0 = 3;
                            audioShowActivity9.D1.sendEmptyMessage(audioShowActivity9.J0);
                            AudioShowActivity.this.E0.setVisibility(8);
                            AudioShowActivity.this.H0.setVisibility(0);
                        } else if (com.blankj.utilcode.util.d.a().equals("3.1.0")) {
                            AudioShowActivity audioShowActivity10 = AudioShowActivity.this;
                            Handler handler7 = audioShowActivity10.D1;
                            if (handler7 != null) {
                                handler7.removeMessages(audioShowActivity10.J0);
                            }
                            AudioShowActivity audioShowActivity11 = AudioShowActivity.this;
                            audioShowActivity11.K0 = 3;
                            audioShowActivity11.D1.sendEmptyMessage(audioShowActivity11.J0);
                            AudioShowActivity.this.E0.setVisibility(8);
                            AudioShowActivity.this.I0.setVisibility(0);
                            com.showself.utils.r0.I0(false);
                        } else {
                            AudioShowActivity audioShowActivity12 = AudioShowActivity.this;
                            Handler handler8 = audioShowActivity12.D1;
                            if (handler8 != null) {
                                handler8.removeMessages(audioShowActivity12.J0);
                            }
                            AudioShowActivity.this.E0.setVisibility(8);
                            AudioShowActivity.this.B0.setVisibility(8);
                            AudioShowActivity.this.C0.setVisibility(8);
                        }
                    }
                    AudioShowActivity.this.L0++;
                    break;
            }
        }
    }

    class w0 implements ViewPager.OnPageChangeListener {
        w0() {
        }

        public void onPageScrollStateChanged(int i2) {
        }

        public void onPageScrolled(int i2, float f2, int i3) {
        }

        public void onPageSelected(int i2) {
            if (i2 == 0) {
                AudioShowActivity audioShowActivity = AudioShowActivity.this;
                audioShowActivity.f3269e = true;
                audioShowActivity.m.setVisibility(0);
                AudioShowActivity.this.f3(0);
            } else {
                AudioShowActivity audioShowActivity2 = AudioShowActivity.this;
                audioShowActivity2.f3269e = false;
                audioShowActivity2.m.setVisibility(8);
            }
            AudioShowActivity.this.V.w();
            if (i2 == 0) {
                AudioShowActivity.this.R.setVisibility(8);
            } else {
                AudioShowActivity.this.R.setVisibility(0);
            }
        }
    }

    class x implements d.c {
        x() {
        }

        @Override
        public void a(JSONObject jSONObject, int i2) {
            if (jSONObject == null || jSONObject.optInt("roomid") != AudioShowActivity.this.f3270f) {
                return;
            }
            for (int i3 = 0; i3 < i2; i3++) {
                AudioShowActivity.this.v4(jSONObject);
            }
        }
    }

    class x0 implements Runnable {
        final DefaultResourceProvider a;

        class a implements Runnable {
            final long a;

            a(long j2) {
                this.a = j2;
            }

            @Override
            public void run() {
                AudioShowActivity.this.c3(this.a);
            }
        }

        x0(DefaultResourceProvider defaultResourceProvider) {
            this.a = defaultResourceProvider;
        }

        @Override
        public void run() {
            this.a.refreshAndgetVersion();
            com.r.m.d.a0.f.d.a(new a(this.a.getResourceMap().getVersion()));
        }
    }

    class y implements Runnable {
        final int a;
        final int b;

        y(int i2, int i3) {
            this.a = i2;
            this.b = i3;
        }

        @Override
        public void run() {
            AudioShowActivity.this.appToCocoXMPPState(this.a, this.b);
        }
    }

    class y0 implements DefaultResourceProvider.GetVersionCallBack {
        final long a;

        class a implements DefaultResourceProvider.GetDataCallBack {
            a(y0 y0Var) {
            }

            @Override
            public void callBackData() {
            }
        }

        y0(AudioShowActivity audioShowActivity, long j2) {
            this.a = j2;
        }

        @Override
        public void callBackVersion(int i2) {
            if (i2 == -1) {
                return;
            }
            long j2 = i2;
            long j3 = this.a;
            if (j2 != j3) {
                if (j3 > j2) {
                    j3 = 0;
                }
                ResourceManager.getProvider().getRsData(i2, (int) j3, new a(this));
            }
        }
    }

    class z implements Runnable {
        final int a;

        z(int i2) {
            this.a = i2;
        }

        @Override
        public void run() {
            AudioShowActivity.this.removeAnimation(this.a);
            if (this.a < 10) {
                org.greenrobot.eventbus.c.c().k(new com.r.m.b.g(1, Integer.valueOf(this.a)));
                org.greenrobot.eventbus.c.c().k(new com.r.m.b.h(1, Integer.valueOf(this.a)));
            }
        }
    }

    class z0 implements Runnable {
        final DefaultResourceProvider a;

        class a implements Runnable {
            final long a;

            a(long j2) {
                this.a = j2;
            }

            @Override
            public void run() {
                AudioShowActivity.this.Z2(this.a);
            }
        }

        z0(DefaultResourceProvider defaultResourceProvider) {
            this.a = defaultResourceProvider;
        }

        @Override
        public void run() {
            this.a.getPcResourceMap().setVersion(Long.valueOf(this.a.refreshAndgetPCVersion() + "").longValue());
            com.r.m.d.a0.f.d.a(new a(this.a.getPcResourceMap().getVersion()));
        }
    }

    public AudioShowActivity() {
        new ArrayList();
        this.Z = false;
        this.a0 = new ArrayList();
        this.i0 = 0;
        this.p0 = NotificationNumber.getShareNotificationNum();
        this.w0 = new ArrayList();
        this.x0 = new ArrayList();
        this.y0 = new ArrayList();
        this.z0 = 1;
        this.A0 = 1;
        this.J0 = 1;
        this.K0 = 3;
        this.L0 = 1;
        this.M0 = new ArrayList();
        new ArrayList();
        this.R0 = true;
        this.V0 = new ArrayList<>();
        this.a1 = false;
        this.i1 = "textArrayLabel";
        this.j1 = "picArray";
        this.k1 = false;
        this.A1 = 0;
        this.D1 = new j();
        this.E1 = new u();
        this.F1 = new b0();
        new a(this);
        this.H1 = false;
        new g();
        this.L1 = new ArrayList<>();
        this.N1 = new w();
        this.P1 = "live_sotp_fragment";
        this.Q1 = false;
        this.S1 = false;
        this.W1 = "";
        this.Z1 = false;
        this.a2 = false;
        this.b2 = new r0();
        this.c2 = 1;
        this.e2 = 0;
        this.f2 = new t0();
        this.g2 = false;
        this.h2 = new u0();
    }

    public boolean C2(View view, MotionEvent motionEvent) {
        this.T.C(motionEvent);
        return false;
    }

    private void B3() {
        RelativeLayout relativeLayout = this.q0;
        if (relativeLayout != null) {
            relativeLayout.setLayoutParams(this.s0);
        }
    }

    public void C() {
        Intent intent = new Intent((Context) this, (Class<?>) StorActivity.class);
        intent.putExtra("enter_vip", true);
        startActivity(intent);
    }

    public void C1(int i2) {
        if (isFinishing()) {
            return;
        }
        Utils.Q0(this, getString(R.string.dialog_title_notice), getString(i2), null, 0, getString(R.string.positive), getResources().getColor(2131099758), new v(), false);
        com.r.m.e.b bVar = this.Q;
        if (bVar != null) {
            bVar.n();
        }
    }

    public void D1(String str) {
        if (isFinishing()) {
            return;
        }
        Utils.Q0(this, getResources().getString(R.string.prompt), str, null, 0, getResources().getString(R.string.positive), getResources().getColor(2131099758), new r(), false);
        com.r.m.e.b bVar = this.Q;
        if (bVar != null) {
            bVar.n();
        }
    }

    public void E2() {
        releaseRootLayer();
        ShowSelfApp.h().c = false;
    }

    public void G2(int i2, String str) {
        g2();
        this.b1.M(i2);
        this.T.T(str);
    }

    private void G1(Intent intent) {
        this.V0.clear();
        String stringExtra = intent.getStringExtra("playBoxCodes");
        String stringExtra2 = intent.getStringExtra(ResourceManager.TREASURE_BOXES);
        try {
            JSONArray jSONArray = new JSONArray(stringExtra);
            JSONArray jSONArray2 = new JSONArray(stringExtra2);
            if (jSONArray.length() > 0) {
                for (int i2 = 0; i2 < jSONArray.length(); i2++) {
                    this.V0.add(Integer.valueOf(jSONArray.optInt(i2)));
                }
            }
            if (jSONArray2.length() > 0) {
                for (int i3 = 0; i3 < jSONArray2.length(); i3++) {
                    this.V0.add(Integer.valueOf(jSONArray2.optInt(i3)));
                }
            }
        } catch (Exception e2) {
            e2.printStackTrace();
        }
    }

    public void I2() {
        this.T.X();
    }

    private void I4() {
        if (this.q1) {
            for (int i2 = 0; i2 < this.M0.size(); i2++) {
                int i3 = this.M0.get(i2).gameCode;
                if (this.M0.get(i2).enabled && i3 == com.showself.utils.k0.k().g()) {
                    return;
                }
            }
            com.showself.utils.k0.k().F(-1);
            com.showself.utils.k0.k().G(Boolean.FALSE);
        }
    }

    private void K1() {
        new d().start();
    }

    private void K2(String str) {
        Utils.Q0(this, null, str + "及以上玩家才能进入呦!", null, 0, "确定", getResources().getColor(2131099758), new m1(this), true);
    }

    public void K3(Bundle bundle) {
        ChatViewDialog chatViewDialog = this.m1;
        if (chatViewDialog == null || !chatViewDialog.f()) {
            if (this.Z) {
                m3("User", bundle.getInt("fuid"), true);
            }
            ChatViewDialog chatViewDialog2 = new ChatViewDialog(bundle, this.f3270f);
            this.m1 = chatViewDialog2;
            chatViewDialog2.j(new n0());
            this.m1.show(getSupportFragmentManager(), "");
        }
    }

    public void M1(int i2) {
        HashMap hashMap = new HashMap();
        hashMap.put("rebuild", Boolean.TRUE);
        com.sjnet.i.c.f(String.format("/v2/openfire/admin/token/%d", Integer.valueOf(i2)), hashMap).b(new p());
    }

    public void M2(int i2) {
        if (isFinishing()) {
            return;
        }
        Utils.Q0(this, getString(R.string.dialog_title_notice), getString(i2), null, 0, getString(R.string.positive), getResources().getColor(2131099758), null, false);
    }

    private void N2() {
        View view;
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView == null || (view = yJLiveShowView.k1) == null) {
            return;
        }
        view.setVisibility(8);
        this.X.k1.setBackground(null);
    }

    private void O2() {
        JinshanPushFragment jinshanPushFragment;
        if (this.H1) {
            runOnGLThread(new s0());
        }
        if (this.q1 && (jinshanPushFragment = this.T) != null) {
            jinshanPushFragment.P(this.a, this.b - Utils.Z(this));
        }
        new RelativeLayout.LayoutParams(-1, -2);
        RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.K1.getLayoutParams();
        if (this.c2 == 2) {
            z3();
            this.X.M1();
            layoutParams.setMargins(com.showself.utils.r.b(this, 75.0f), 0, 0, com.showself.utils.r.b(this, 7.0f));
            this.K1.setLayoutParams(layoutParams);
            k2();
            return;
        }
        B3();
        this.X.O1();
        layoutParams.setMargins(com.showself.utils.r.b(this, 8.0f), 0, 0, com.showself.utils.r.b(this, 44.0f));
        this.K1.setLayoutParams(layoutParams);
        p4();
    }

    public void O4(boolean z2) {
        if (this.q1) {
            new com.r.c.c(com.r.c.c.k("v2/rooms/" + this.f3270f + "/pushStatus?pushStatus=" + z2, 1), new com.r.c.a(), new com.r.c.b(2), this).y(new q(this));
        }
    }

    public void P2(JSONObject jSONObject) {
        if (jSONObject.optInt("roomid") == this.f3270f && this.H1 && this.mGLSurfaceView != null) {
            nativeStartAnimation(jSONObject.toString());
        }
    }

    public void P3(int i2, int i3, int i4, String str, String str2, int i5, int i6, String str3, String str4, int i7, String str5, String str6) {
        LiveStopAudienceFragment liveStopAudienceFragment = (LiveStopAudienceFragment) this.c.e(this.P1);
        if (liveStopAudienceFragment == null) {
            liveStopAudienceFragment = LiveStopAudienceFragment.x(i2, i3, i4, str, str2, i5, i6, str3, str4, i7, str5, str6);
        } else {
            liveStopAudienceFragment.z(i2, i3, i4, str, str2, i5, i6, str3, str4, i7, str5, str6);
        }
        if (liveStopAudienceFragment.isAdded()) {
            this.k0.setVisibility(0);
            return;
        }
        androidx.fragment.app.l a2 = this.c.a();
        a2.r(R.id.fl_stop_content2, liveStopAudienceFragment, this.P1);
        a2.i();
        com.showself.view.q qVar = this.T1;
        if (qVar != null && qVar.e()) {
            this.T1.b();
        }
        this.k0.setVisibility(0);
    }

    private void U2() {
        com.r.m.e.b bVar;
        if (this.f3275k == null || (bVar = this.Q) == null || TextUtils.isEmpty(bVar.s()) || this.Q.u() == 0) {
            return;
        }
        this.Q.o(com.showself.utils.r0.y(getApplicationContext()).getUserId());
        if (Utils.w0()) {
            return;
        }
        try {
            JSONObject jSONObject = new JSONObject();
            jSONObject.put("type", 104);
            jSONObject.put(Oauth2AccessToken.KEY_UID, com.showself.utils.k0.y() ? this.Y0 : this.f3272h.getUserId());
            jSONObject.put("roomid", this.f3270f);
            jSONObject.put("avatar", this.f3272h.getAvatar());
            jSONObject.put("nickname", this.f3272h.getUserName());
            this.Q.z(new com.r.m.e.c(jSONObject.toString()));
        } catch (JSONException e2) {
            e2.printStackTrace();
        }
    }

    private String V1(JSONObject jSONObject, String str, String str2) {
        String optString = jSONObject.optString(str);
        return !TextUtils.isEmpty(optString) ? optString : jSONObject.optString(str2);
    }

    private synchronized void V3() {
        if (com.showself.view.d0.k().i()) {
            return;
        }
        NewsNoticeInfo newsNoticeInfo = null;
        List<NewsNoticeInfo> e2 = com.r.g.d.e();
        if (e2 != null) {
            com.showself.utils.p.c("H5NoticeManager---AudioShow", e2.size() + "");
            for (NewsNoticeInfo newsNoticeInfo2 : e2) {
                if (newsNoticeInfo2 != null) {
                    String location = newsNoticeInfo2.getLocation();
                    if (!TextUtils.isEmpty(location) && (location.equals("room") || location.equals("all"))) {
                        com.showself.utils.p.c("H5NoticeManager-AudioShow", newsNoticeInfo2.toString());
                        newsNoticeInfo = newsNoticeInfo2;
                        break;
                    }
                }
            }
            boolean e3 = com.r.g.e.i().e();
            if (newsNoticeInfo != null) {
                String location2 = newsNoticeInfo.getLocation();
                if (TextUtils.isEmpty(location2)) {
                    com.r.g.d.i(e2, newsNoticeInfo);
                } else if (location2.equals("all")) {
                    if (e3) {
                        return;
                    }
                    if (Utils.v0("com.showself.ui.show.AudioShowActivity")) {
                        com.r.g.d.i(e2, newsNoticeInfo);
                        com.r.g.d.k(this, newsNoticeInfo);
                        com.r.g.d.l();
                    }
                } else if (location2.equals("room")) {
                    if (e3) {
                        return;
                    }
                    if (Utils.v0("com.showself.ui.show.AudioShowActivity")) {
                        boolean z2 = this.q1;
                        if (!z2) {
                            com.r.g.d.i(e2, newsNoticeInfo);
                            com.r.g.d.k(this, newsNoticeInfo);
                            com.r.g.d.l();
                        } else if (z2) {
                            com.r.g.d.i(e2, newsNoticeInfo);
                            com.r.g.d.k(this, newsNoticeInfo);
                            com.r.g.d.l();
                        }
                    }
                }
            }
        }
    }

    private void W1() {
        Timer timer = this.H;
        if (timer != null) {
            timer.cancel();
            this.H = null;
        }
    }

    public void W3() {
        if (this.q1) {
            return;
        }
        if (com.showself.ui.juvenile.a.c.h() && this.f3272h.getSpvswitch() == 1) {
            return;
        }
        if (!com.showself.utils.r0.R()) {
            if (com.showself.utils.r0.Q() && com.blankj.utilcode.util.d.a().equals("3.1.0")) {
                this.B0 = (RelativeLayout) findViewById(R.id.rl_room_play_help);
                this.C0 = (RelativeLayout) findViewById(R.id.rl_room_play_help_alpha);
                this.D0 = (RelativeLayout) findViewById(R.id.rl_follow_me_click);
                this.E0 = (RelativeLayout) findViewById(R.id.rl_like_me_share);
                this.F0 = (RelativeLayout) findViewById(R.id.rl_chest_box_click);
                this.G0 = (RelativeLayout) findViewById(R.id.rl_click_here_send_gift);
                this.H0 = (RelativeLayout) findViewById(R.id.rl_fensi_zhouxing);
                this.I0 = (RelativeLayout) findViewById(R.id.rl_gift_box);
                this.B0.setVisibility(0);
                this.C0.setVisibility(0);
                this.I0.setVisibility(0);
                com.showself.utils.r0.I0(false);
                this.B0.setOnClickListener(this.N1);
                this.I0.setOnClickListener(this.N1);
                return;
            }
            return;
        }
        RelativeLayout relativeLayout = (RelativeLayout) findViewById(R.id.rl_room_play_help);
        this.B0 = relativeLayout;
        RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) relativeLayout.getLayoutParams();
        layoutParams.topMargin = Utils.Y();
        this.B0.setLayoutParams(layoutParams);
        this.C0 = (RelativeLayout) findViewById(R.id.rl_room_play_help_alpha);
        this.D0 = (RelativeLayout) findViewById(R.id.rl_follow_me_click);
        this.E0 = (RelativeLayout) findViewById(R.id.rl_like_me_share);
        this.F0 = (RelativeLayout) findViewById(R.id.rl_chest_box_click);
        this.G0 = (RelativeLayout) findViewById(R.id.rl_click_here_send_gift);
        this.H0 = (RelativeLayout) findViewById(R.id.rl_fensi_zhouxing);
        this.I0 = (RelativeLayout) findViewById(R.id.rl_gift_box);
        this.B0.setVisibility(0);
        this.C0.setVisibility(0);
        this.F0.setVisibility(0);
        com.showself.utils.r0.J0(false);
        this.B0.setOnClickListener(this.N1);
        this.H0.setOnClickListener(this.N1);
        this.I0.setOnClickListener(this.N1);
        Handler handler = this.D1;
        if (handler != null) {
            handler.sendEmptyMessage(this.J0);
        }
    }

    private void X1() {
        Timer timer = this.H;
        j jVar = null;
        if (timer != null) {
            timer.cancel();
            this.H = null;
        }
        BaseInfoInRoom baseInfoInRoom = this.f3275k;
        if (baseInfoInRoom == null || baseInfoInRoom.getKick() == 1) {
            return;
        }
        Timer timer2 = new Timer();
        this.H = timer2;
        timer2.schedule(new s1(this, jVar), 1000L, 1000L);
    }

    public void Z0(int i2, JSONObject jSONObject, String str) {
        int i3;
        int i4 = i2;
        try {
            DefaultResourceProvider defaultResourceProvider = DefaultResourceProvider.getInstance();
            MessageResolver messageResolver = new MessageResolver();
            messageResolver.setResourceProvider(defaultResourceProvider);
            Map map = (Map) JsonUtil.fromJson(str, Map.class);
            int optInt = jSONObject.optInt("type");
            if (map.containsKey("templates")) {
                List resolve = messageResolver.resolve(map);
                int i5 = 0;
                while (i5 < resolve.size()) {
                    ResolvedMessage resolvedMessage = (ResolvedMessage) resolve.get(i5);
                    String name = resolvedMessage.getRegion().name();
                    List<ResolvedMessage.Fragment> fragments = resolvedMessage.getFragments();
                    if (fragments != null && fragments.size() != 0) {
                        if (RegionType.Animation.name().equals(name)) {
                            HashMap<String, Object> hashMap = new HashMap<>();
                            Iterator<ResolvedMessage.Fragment> it = fragments.iterator();
                            String str2 = "";
                            int i6 = 0;
                            while (it.hasNext()) {
                                ResolvedMessage.Fragment next = it.next();
                                String name2 = next.getType().name();
                                Iterator<ResolvedMessage.Fragment> it2 = it;
                                if (FragmentType.Animation.name().equals(name2)) {
                                    str2 = (String) next.getValue();
                                    if (next.containsKey("faceDetection")) {
                                        i6 = ((Integer) next.get("faceDetection")).intValue();
                                    }
                                    hashMap.putAll(next);
                                } else if (FragmentType.Param.name().equals(name2)) {
                                    String str3 = (String) next.getValue();
                                    if (!TextUtils.isEmpty(str3)) {
                                        hashMap.putAll((HashMap) JsonUtil.fromJson(str3, HashMap.class));
                                    }
                                }
                                it = it2;
                            }
                            if (!jSONObject.isNull(this.i1)) {
                                String str4 = this.i1;
                                hashMap.put(str4, jSONObject.optJSONArray(str4));
                            }
                            if (!jSONObject.isNull(this.j1)) {
                                String str5 = this.j1;
                                hashMap.put(str5, jSONObject.optJSONArray(str5));
                            }
                            if (!TextUtils.isEmpty(str2) && i6 == 0) {
                                int optInt2 = jSONObject.optInt("fromUid");
                                int optInt3 = jSONObject.optInt(Oauth2AccessToken.KEY_UID);
                                int optInt4 = jSONObject.optInt("triggeredUid");
                                int userId = this.f3272h.getUserId();
                                if (optInt2 == userId) {
                                    optInt4 = optInt2;
                                } else if (optInt3 == userId) {
                                    optInt4 = optInt3;
                                }
                                i3 = i5;
                                T2(i2, optInt4, str2, Math.max(1, jSONObject.optInt("animationTimes")), "gift", hashMap);
                            }
                        } else {
                            i3 = i5;
                            if (RegionType.ArAnimation.name().equals(name) && i4 == this.f3270f) {
                                if (optInt == 209) {
                                    com.showself.utils.p.a("ArAnimation-佩戴脸萌消息 模板消息", str);
                                    int optInt5 = jSONObject.optInt("new_ar");
                                    int optInt6 = jSONObject.optInt("arAnimId");
                                    com.r.m.d.k kVar = this.n1;
                                    if (kVar != null && optInt6 > 0) {
                                        kVar.l(jSONObject.optInt("duration", 1), optInt6, optInt5);
                                    }
                                }
                            } else if (RegionType.PublicMessage.name().equals(name) && i4 == this.f3270f) {
                                this.X.v0(fragments, jSONObject.optString("bg"), true, O1());
                            } else if (!RegionType.PrivateMessage.name().equals(name) || i4 != this.f3270f) {
                                if (RegionType.FlyingMessage.name().equals(name)) {
                                    if (this.A0 == 1) {
                                        this.S.b(jSONObject, fragments);
                                    }
                                } else if (RegionType.FlyingSuperMessage.name().equals(name)) {
                                    this.S.c(fragments, jSONObject.optString("flyStyle"), jSONObject.optString("refer"), jSONObject.optString("avatar"), map.get("templates"));
                                } else if (RegionType.FlipIn.name().equals(name)) {
                                    String str6 = null;
                                    String str7 = null;
                                    for (ResolvedMessage.Fragment fragment : fragments) {
                                        String name3 = fragment.getType().name();
                                        if (FragmentType.Text.name().equals(name3)) {
                                            str7 = (String) fragment.getValue();
                                        } else if (FragmentType.Image.name().equals(name3)) {
                                            str6 = (String) fragment.getValue();
                                        }
                                    }
                                    CatchData catchData = new CatchData();
                                    catchData.contentUrl = str6;
                                    catchData.textTag = str7;
                                    catchData.isLian = jSONObject.optInt("subcategory");
                                    catchData.to_nickname = jSONObject.optString("to_nickname");
                                    catchData.fromUid = jSONObject.optInt(Oauth2AccessToken.KEY_UID);
                                    catchData.giftId = jSONObject.optInt("giftid");
                                    catchData.giftCount = Math.max(jSONObject.optInt("num"), jSONObject.optInt("realnum"));
                                    catchData.headUrl = V1(jSONObject, "avatar", "from_avatar");
                                    catchData.nickName = V1(jSONObject, "nickname", "from_nickname");
                                    catchData.type = jSONObject.optInt("flipType");
                                    JSONArray optJSONArray = jSONObject.optJSONArray("reward_nums");
                                    JSONArray optJSONArray2 = jSONObject.optJSONArray("reward_times");
                                    if (optJSONArray == null || optJSONArray2 == null || TextUtils.isEmpty(str6)) {
                                        E3(catchData);
                                    } else {
                                        int min = Math.min(optJSONArray.length(), optJSONArray2.length());
                                        for (int i7 = 0; i7 < min; i7++) {
                                            int i8 = 0;
                                            while (i8 < optJSONArray.getInt(i7)) {
                                                catchData.contentUrl = String.format(str6, String.valueOf(optJSONArray2.optInt(i7)));
                                                E3(catchData);
                                                i8++;
                                                optJSONArray = optJSONArray;
                                            }
                                        }
                                    }
                                }
                            }
                        }
                        i5 = i3 + 1;
                        i4 = i2;
                    }
                    i3 = i5;
                    i5 = i3 + 1;
                    i4 = i2;
                }
            }
        } catch (Exception e2) {
            e2.printStackTrace();
        }
    }

    public void Z2(long j2) {
        ResourceManager.getProvider().getPCRsVersion(new a1(this, j2));
    }

    public void a2(HashMap<Object, Object> hashMap) {
        this.f3271g = false;
        if (hashMap != null && ((Integer) hashMap.get(com.showself.net.e.n1)).intValue() == 0 && hashMap.containsKey("take_turn_time") && hashMap.containsKey("posters")) {
            int intValue = ((Integer) hashMap.get("take_turn_time")).intValue();
            ArrayList arrayList = (ArrayList) hashMap.get("posters");
            ArrayList arrayList2 = new ArrayList();
            ArrayList arrayList3 = new ArrayList();
            YJLiveShowView yJLiveShowView = this.X;
            if (yJLiveShowView == null || arrayList == null) {
                return;
            }
            yJLiveShowView.setTime(intValue * 1000);
            for (int i2 = 0; i2 < arrayList.size(); i2++) {
                if (((ShowPosterInfo) arrayList.get(i2)).getHas_banner() == 1) {
                    arrayList3.add(arrayList.get(i2));
                } else {
                    arrayList2.add(arrayList.get(i2));
                }
            }
            arrayList2.size();
            v3(arrayList3);
        }
    }

    private void b1() {
        List<t1> list = this.y0;
        if (list != null && list.size() > 0) {
            for (t1 t1Var : this.y0) {
                if (t1Var != null) {
                    t1Var.cancel();
                }
            }
        }
        List<RedPacketCountdownView> list2 = this.x0;
        if (list2 != null) {
            list2.clear();
        }
        RelativeLayout relativeLayout = this.q0;
        if (relativeLayout != null) {
            relativeLayout.removeAllViews();
            this.q0.setVisibility(8);
        }
    }

    private void b2() {
        Utils.Q0(this, null, "当前有游戏正在进行中...", null, 0, "确定", getResources().getColor(2131099758), new l1(this), true);
    }

    private void b3() {
        AnchorBean anchorBean;
        if (this.q1 || (anchorBean = this.l) == null) {
            return;
        }
        int anchor_uid = anchorBean.getAnchor_uid();
        new HashMap().put("type", 0);
        com.sjnet.i.c.g(String.format("/v2/yrooms/%d/rvg/money", Integer.valueOf(anchor_uid)), new HashMap(), this).b(new i1());
    }

    public void c1() {
        if (this.q1) {
            return;
        }
        RoomPlayerView roomPlayerView = this.U;
        if (roomPlayerView != null) {
            roomPlayerView.m(this.r1);
        }
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.K1();
        }
    }

    public void c3(long j2) {
        ResourceManager.getProvider().getRsVersion(new y0(this, j2));
    }

    private void d3() {
        IntentFilter intentFilter = new IntentFilter();
        intentFilter.addAction(com.showself.utils.e0.b);
        intentFilter.addAction("com.showself.receive_openfiremsg");
        intentFilter.addAction("sjchat_recall");
        intentFilter.addAction("sjchat_follow");
        registerReceiver(this.b2, intentFilter);
    }

    private void e2() {
        ((InputMethodManager) getSystemService("input_method")).hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);
    }

    public void e4(int i2, ViewerListInfo viewerListInfo) {
        com.showself.view.q qVar = new com.showself.view.q();
        qVar.k(this, new com.showself.view.r(this, qVar, i2, viewerListInfo, Q1()).c(), 1.0f, 17, com.showself.utils.r.a(303.0f), com.showself.utils.r.a(283.0f), 0);
    }

    public void f4(GetRedPacketEnterBean getRedPacketEnterBean) {
        this.t0.add(getRedPacketEnterBean);
        Y0();
    }

    private void g1(BoxItemBean boxItemBean) {
        int i2 = boxItemBean.downloadState;
        if (i2 == 0) {
            boxItemBean.downloadState = 1;
            com.r.m.d.a0.b.j().i(boxItemBean, Q1());
        } else {
            if (i2 != 2) {
                return;
            }
            if (this.y == RoomGameType.NONE) {
                B(boxItemBean.gameCode);
            } else if (this.x == boxItemBean.gameCode) {
                org.greenrobot.eventbus.c.c().k(new com.r.m.b.e(e.a.RESUME_MINIMIZED_GAME));
            } else {
                Utils.P0(this, Utils.a0(R.string.prompt), "您还有游戏未结束!", "", Utils.a0(R.string.positive), getResources().getColor(R.color.custom_dialog_positive_btn), null, true);
            }
        }
    }

    private boolean i1(List<GiftSeatBean> list, List<GiftSeatBean> list2) {
        if (list2.size() == 0) {
            return true;
        }
        if (list.size() == 0 || list.size() != list2.size()) {
            return false;
        }
        for (int i2 = 0; i2 < list.size(); i2++) {
            if (!list.get(i2).isSameData(list2.get(i2))) {
                return false;
            }
        }
        return true;
    }

    private BoxItemBean i3(String str) {
        return J1(str);
    }

    public void j1() {
        n1 n1Var;
        int i2 = this.L + 1;
        this.L = i2;
        if (i2 < 3 && (n1Var = this.C) != null) {
            n1Var.postDelayed(new m(), 500L);
        } else {
            O4(false);
            runOnUiThread(new n());
        }
    }

    private void j3(String str) {
        if (isFinishing()) {
            return;
        }
        Utils.Q0(this, null, str, getString(R.string.dialog_button_leave), getResources().getColor(2131099757), getString(R.string.dialog_button_pay), getResources().getColor(2131099758), new s(), false);
        com.r.m.e.b bVar = this.Q;
        if (bVar != null) {
            bVar.n();
        }
    }

    public void k1() {
        this.L = 0;
        Timer timer = this.H;
        if (timer != null) {
            timer.cancel();
        }
        Timer timer2 = new Timer();
        this.H = timer2;
        timer2.schedule(new s1(this, null), 1000L, 1000L);
        runOnUiThread(new o());
    }

    public void k2() {
    }

    public void k3() {
        Utils.Q0(this, null, getString(R.string.immediately_login), getString(R.string.negative), getResources().getColor(2131099757), getString(R.string.positive), getResources().getColor(2131099758), new t(), true);
    }

    public void l1() {
        com.r.m.e.b bVar;
        if (isFinishing() || this.f3275k == null || (bVar = this.Q) == null) {
            return;
        }
        bVar.A(this.x1);
        this.Q.C(this.y1);
        this.Q.B(this.z1);
        try {
            this.Q.o(this.f3272h.getUserId());
            this.Q.l(this.f3273i);
            com.showself.utils.p.a("connectOpenfire", "after connect");
            if (Utils.w0()) {
                k1();
                return;
            }
            JSONObject jSONObject = new JSONObject();
            jSONObject.put("type", 104);
            jSONObject.put(Oauth2AccessToken.KEY_UID, com.showself.utils.k0.y() ? this.Y0 : this.f3272h.getUserId());
            jSONObject.put("roomid", this.f3270f);
            jSONObject.put("avatar", this.f3272h.getAvatar());
            jSONObject.put("nickname", this.f3272h.getUserName());
            l lVar = new l(jSONObject.toString());
            com.showself.utils.p.a("connectOpenfire", "sendIQ 104");
            this.Q.z(lVar);
        } catch (JSONException e2) {
            e2.printStackTrace();
        }
    }

    private void l2() {
        this.o1 = PropertyValuesHolder.ofFloat((Property<?, Float>) View.SCALE_X, 0.5f, 4.0f, 0.5f, 1.0f);
        this.p1 = PropertyValuesHolder.ofFloat((Property<?, Float>) View.SCALE_Y, 0.5f, 4.0f, 0.5f, 1.0f);
    }

    public void l3(String str, int i2) {
        if (i2 == 0) {
            com.r.n.g j2 = com.r.n.g.j();
            com.r.n.d c2 = com.r.n.d.c();
            c2.e("PrivateChat");
            c2.f("RoomHome");
            c2.d(str);
            c2.h(com.r.n.e.Click);
            c2.a("roomId", Integer.valueOf(Q1()));
            c2.a(Oauth2AccessToken.KEY_UID, Integer.valueOf(this.f3272h.getUserId()));
            j2.u(c2.b());
            return;
        }
        com.r.n.g j3 = com.r.n.g.j();
        com.r.n.d c3 = com.r.n.d.c();
        c3.e("PrivateChat");
        c3.f("RoomHome");
        c3.d(str);
        c3.h(com.r.n.e.Click);
        c3.a(Oauth2AccessToken.KEY_UID, Integer.valueOf(this.f3272h.getUserId()));
        c3.a("touid", Integer.valueOf(i2));
        c3.a("roomId", Integer.valueOf(Q1()));
        j3.u(c3.b());
    }

    private void m1() {
        h4();
        this.X.W0();
        com.showself.view.q qVar = this.T1;
        if (qVar == null || !qVar.e()) {
            return;
        }
        this.T1.b();
    }

    private void m2() {
        FullScreenRelativeLayout fullScreenRelativeLayout = (FullScreenRelativeLayout) findViewById(R.id.audio_show_root);
        this.z = fullScreenRelativeLayout;
        fullScreenRelativeLayout.setFitsSystemWindows(true);
    }

    private void m3(String str, int i2, boolean z2) {
        if (i2 == 0) {
            com.r.n.g j2 = com.r.n.g.j();
            com.r.n.d c2 = com.r.n.d.c();
            c2.e("Navigation");
            c2.f("PrivateChat");
            c2.d(str);
            c2.h(com.r.n.e.Click);
            c2.a(Oauth2AccessToken.KEY_UID, Integer.valueOf(this.f3272h.getUserId()));
            j2.u(c2.b());
            return;
        }
        com.r.n.g j3 = com.r.n.g.j();
        com.r.n.d c3 = com.r.n.d.c();
        c3.e("Navigation");
        c3.f("PrivateChat");
        c3.d(str);
        c3.h(com.r.n.e.Click);
        c3.a(Oauth2AccessToken.KEY_UID, Integer.valueOf(this.f3272h.getUserId()));
        c3.a("touid", Integer.valueOf(i2));
        c3.a("status", Boolean.valueOf(z2));
        j3.u(c3.b());
    }

    private void n2() {
        this.W.setAdapter(new com.r.m.a.f(this.Y, this.X));
        this.W.setTouchListener(this.X.getOnTouchListener());
        this.W.setFadingEdgeLength(0);
        this.W.addOnPageChangeListener(new w0());
        this.V.u();
    }

    private static native void nativeStartAnimation(String str);

    private void o2() {
        this.N0 = (RelativeLayout) findViewById(R.id.rl_show_pk_web_view);
        this.O0 = (RelativeLayout) findViewById(R.id.rl_show_pk_web_view_cover);
        this.Q0 = (SJWebView) findViewById(R.id.wv_show_pk);
        this.P0 = (ImageView) findViewById(R.id.iv_show_pk_web_view_close);
        this.O0.setOnClickListener(new e());
        this.P0.setOnClickListener(new f());
        RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.N0.getLayoutParams();
        layoutParams.height = this.l0;
        this.N0.setLayoutParams(layoutParams);
    }

    private void p2() {
        com.r.m.d.y yVar = this.V;
        if (yVar != null) {
            yVar.d();
        }
        this.X.setAnchorInfo(this.l);
        if (this.v1 == 0 || this.G1.getLive_status() != 1) {
            this.X.T0();
        } else {
            this.X.e2();
        }
        new Handler().postDelayed(new i(), 500L);
        if (getIntent().getBooleanExtra("myVideo", false)) {
            YJLiveShowView yJLiveShowView = this.X;
            if (yJLiveShowView != null) {
                yJLiveShowView.q1();
                this.X.s0.setVisibility(0);
            }
            O4(false);
        }
    }

    private void p4() {
    }

    private void q2() {
        BaseInfoInRoom baseInfoInRoom = this.f3275k;
        if (baseInfoInRoom != null) {
            if (baseInfoInRoom.getCategory() != 2) {
                C1(R.string.dialog_text_roomtype_wrong);
                return;
            }
            if (this.C != null) {
                this.C = null;
            }
            HandlerThread handlerThread = this.G;
            if (handlerThread != null) {
                handlerThread.quit();
                this.G = null;
            }
            HandlerThread handlerThread2 = new HandlerThread("ShowIntervalThread");
            this.G = handlerThread2;
            handlerThread2.start();
            this.C = new n1(this.G.getLooper());
        }
    }

    private void q3() {
        new com.r.c.c(String.format(com.r.c.c.k("v2/rooms/%s/pushStatus?pushStatus=true", 1), this.f3270f + ""), new com.r.c.a(), new com.r.c.b(1), this).y(new p0(this));
    }

    private boolean r2(String str) {
        if ("Gift".equals(str) && com.showself.utils.k0.k().j(this.f3272h.getUserId()) == 0) {
            return true;
        }
        return "Vehicle".equals(str) && com.showself.utils.k0.k().u(this.f3272h.getUserId()) == 0;
    }

    private void u4() {
        Timer timer = new Timer();
        this.P = timer;
        timer.scheduleAtFixedRate(new q0(), 0L, Constants.ASSEMBLE_PUSH_RETRY_INTERVAL);
    }

    private void v1() {
        if (this.f3271g) {
            return;
        }
        HashMap hashMap = new HashMap();
        hashMap.put("roomid", Integer.valueOf(this.f3270f));
        hashMap.put("greetings", this.W1);
        hashMap.put("replay_id", Integer.valueOf(this.v1));
        addTask(new com.showself.service.f(20001, hashMap), this);
    }

    public void v4(JSONObject jSONObject) {
        String optString = jSONObject.optString("playTemplate");
        if (this.f3269e || r2(optString)) {
            return;
        }
        if (this.mGLSurfaceView == null || !ShowSelfApp.h().c) {
            this.J.add(jSONObject);
        } else {
            runOnGLThread(new b(jSONObject));
        }
    }

    private void w1(int i2) {
        if (this.f3271g) {
            return;
        }
        HashMap hashMap = new HashMap();
        hashMap.put("roomid", Integer.valueOf(this.f3270f));
        hashMap.put("startshow", Integer.valueOf(i2));
        hashMap.put("greetings", this.W1);
        addTask(new com.showself.service.f(20001, hashMap), this);
    }

    public void w4(String str, boolean z2) {
        this.X.setVisibility(0);
        org.greenrobot.eventbus.c.c().k(new com.r.m.b.d(d.b.START_STREAM, Boolean.valueOf(z2), str));
    }

    public void A2(MessageInfo messageInfo, View view) {
        if (Utils.o0()) {
            return;
        }
        com.showself.utils.m0.a();
        if (com.showself.utils.r0.E(this.f3272h.getUserId()) || messageInfo.getIsOfficial().equals("1")) {
            int k2 = this.o0.k(this.f3272h.getUserId(), messageInfo.getFrom());
            NotificationNumber notificationNumber = this.p0;
            notificationNumber.setChatNum(notificationNumber.getChatNum() - k2);
            this.o0.B(1, messageInfo.getFrom(), this.f3272h.getUserId());
            sendBroadcast(new Intent(com.showself.utils.e0.b));
            J3(messageInfo.getFrom(), messageInfo.getNickname(), messageInfo.getAvatar(), messageInfo.getIsOfficial());
            l3("Room", messageInfo.getFrom());
            m3("NavigationUser", messageInfo.getFrom(), true);
            return;
        }
        if (Utils.v0(AudioShowActivity.class.getCanonicalName())) {
            YJLiveShowView yJLiveShowView = this.X;
            if (yJLiveShowView == null || this.l == null) {
                startActivity(new Intent((Context) this, (Class<?>) MessageActivity.class));
            } else {
                this.Z = true;
                yJLiveShowView.V1();
            }
        } else {
            startActivity(new Intent((Context) this, (Class<?>) MessageActivity.class));
        }
        m3("UserProfile", 0, true);
    }

    private void z3() {
        RelativeLayout relativeLayout = this.q0;
        if (relativeLayout != null) {
            relativeLayout.setLayoutParams(this.r0);
        }
    }

    protected void A(int i2, String str) {
        finish();
        com.showself.ui.show.g.o(this, i2, str);
    }

    public void A1(int i2, int i3) {
        if (this.f3271g) {
            return;
        }
        this.f3271g = true;
        HashMap hashMap = new HashMap();
        hashMap.put("fuid", Integer.valueOf(i3));
        hashMap.put("type", Integer.valueOf(i2));
        addTask(new com.showself.service.f(10052, hashMap), this);
    }

    public void A3(int i2) {
        JinshanPushFragment jinshanPushFragment;
        if (!this.q1 || (jinshanPushFragment = this.T) == null) {
            return;
        }
        jinshanPushFragment.R(i2);
    }

    public void A4() {
        if (this.q1) {
            this.T.Y();
        }
    }

    public void B(int i2) {
        if (i2 != 1 && !ShowSelfApp.h().c) {
            Utils.X0(R.string.init_cocos_tex);
            return;
        }
        if (this.t) {
            if (i2 == 42) {
                m1();
                return;
            } else {
                b2();
                return;
            }
        }
        JSONObject n2 = com.showself.utils.r0.n(i2);
        int optInt = n2.optInt("minLevel");
        String wealthName = ResourceManager.getWealthName(optInt);
        if (i2 != 1 && i2 != 61 && this.b0 < optInt) {
            K2(wealthName);
            return;
        }
        com.showself.view.q qVar = this.T1;
        if (qVar != null && qVar.e()) {
            this.T1.b();
        }
        try {
            n2.put("roomid", Q1());
            n2.put(Oauth2AccessToken.KEY_UID, this.f3272h.getUserId());
            n2.put(AuthActivity.ACTION_KEY, i2);
            n2.put("app_show", 0);
            n2.put("serviceType", 1);
            n2.put("httpType", com.tencent.connect.common.Constants.HTTP_POST);
            n2.put("device", "ANDROID");
            n2.put("appVersion", Utils.O(ShowSelfApp.h().getApplicationContext()).versionName);
            n2.put("appType", 4);
            String jSONObject = n2.toString();
            if (i2 != 1) {
                this.S1 = true;
                setShouldHandleTouch(true);
            }
            if (this.mGLSurfaceView == null) {
                this.R0 = false;
            } else {
                this.R0 = true;
                runOnGLThread(new a0(jSONObject));
            }
        } catch (JSONException e2) {
            e2.printStackTrace();
            Utils.X0(R.string.toast_text_game_exception);
        }
    }

    public void B1() {
        this.f3275k.setRelation(2);
        this.X.setRelation(2);
        com.showself.view.e0 e0Var = this.X1;
        if (e0Var != null) {
            e0Var.c(2);
        }
    }

    public void B4() {
        if (this.t) {
            this.X.W0();
            this.t = false;
            removeGmLayer();
        }
        this.X.p1();
        if (getRequestedOrientation() != 0) {
            setRequestedOrientation(0);
        } else {
            setRequestedOrientation(1);
        }
    }

    public void C3(String str) {
        if (TextUtils.isEmpty(str)) {
            return;
        }
        String trim = str.trim();
        if (TextUtils.isEmpty(trim)) {
            return;
        }
        if (!trim.startsWith("http:") && !trim.startsWith("https:")) {
            trim = Utils.f(trim);
            if (TextUtils.isEmpty(trim)) {
                return;
            }
        }
        Uri parse = Uri.parse(trim);
        if (parse == null || !"1".equals(parse.getQueryParameter("topLayerPoster"))) {
            this.B1 = false;
        } else {
            this.B1 = true;
            this.C1 = parse.getQueryParameter("playTemplate");
            f3(Math.max(10, this.f3272h.getUserId()));
        }
        com.r.m.d.q qVar = this.W0;
        YJLiveShowView yJLiveShowView = this.X;
        boolean r12 = yJLiveShowView != null ? yJLiveShowView.r1() : false;
        YJLiveShowView yJLiveShowView2 = this.X;
        qVar.p(trim, r12, yJLiveShowView2 != null ? yJLiveShowView2.s1() : false, this.B1);
    }

    public void C4() {
        this.K1.setVisibility(8);
        com.showself.ui.show.g.l(this, Q1(), E1());
    }

    public boolean D3() {
        return this.Q1;
    }

    public void D4(String str) {
        p4();
        this.d.d1(str);
        this.X.S0(false);
        this.X.Z0();
    }

    public String E1() {
        return this.U0;
    }

    public void E3(CatchData catchData) {
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.R1(catchData);
        }
    }

    public void E4() {
    }

    public void F1() {
        List resDataListNew = ResourceManager.getResDataListNew(BoxItemBean.class, ResourceManager.TREASURE_BOXES);
        this.M0.clear();
        ArrayList arrayList = new ArrayList();
        if (resDataListNew.size() > 0) {
            for (int i2 = 0; i2 < resDataListNew.size(); i2++) {
                BoxItemBean boxItemBean = (BoxItemBean) resDataListNew.get(i2);
                if (boxItemBean.enabled) {
                    int i3 = 0;
                    while (true) {
                        if (i3 >= this.V0.size()) {
                            break;
                        }
                        if (boxItemBean.id == this.V0.get(i3).intValue()) {
                            arrayList.add(boxItemBean);
                            break;
                        }
                        i3++;
                    }
                }
            }
            if (arrayList.size() > 0) {
                Collections.sort(arrayList, new h1(this));
            }
            this.M0.addAll(arrayList);
        }
        I4();
    }

    public void F3() {
        this.X.q2();
        this.J1.setVisibility(0);
    }

    public void F4() {
        this.X.w2();
    }

    public void G3() {
        com.m.a.b bVar = this.S0;
        if (bVar != null) {
            bVar.u();
        }
    }

    public void G4(JSONObject jSONObject) {
        JSONArray optJSONArray = jSONObject.optJSONArray("giftRank");
        ArrayList arrayList = new ArrayList();
        if (optJSONArray != null && optJSONArray.length() > 0) {
            int length = optJSONArray.length();
            for (int i2 = 0; i2 < length; i2++) {
                GiftSeatBean giftSeatBean = new GiftSeatBean();
                try {
                    JSONObject optJSONObject = optJSONArray.optJSONObject(i2);
                    giftSeatBean.setGift_url(optJSONObject.optString("giftUrl"));
                    giftSeatBean.setUid(optJSONObject.optInt(Oauth2AccessToken.KEY_UID));
                    giftSeatBean.setNickname(optJSONObject.optString("nickname"));
                    giftSeatBean.setRealnum(optJSONObject.optInt("giftNum"));
                    arrayList.add(giftSeatBean);
                } catch (Exception e2) {
                    e2.printStackTrace();
                }
            }
        }
        if (arrayList.size() > 0) {
            this.X.a(arrayList);
        }
        if (!i1(this.a0, arrayList)) {
            this.E1.removeMessages(1);
            this.E1.removeMessages(2);
            this.E1.sendEmptyMessage(2);
            this.E1.sendEmptyMessageDelayed(1, 5000L);
        }
        this.a0 = arrayList;
    }

    public com.r.m.e.b H1() {
        return this.Q;
    }

    public void H3() {
        ChatMenuViewDialog chatMenuViewDialog = this.l1;
        if (chatMenuViewDialog == null || !chatMenuViewDialog.e()) {
            l3("PrivateChat", 0);
            if (getRequestedOrientation() == 0) {
                setRequestedOrientation(1);
            }
            ChatMenuViewDialog chatMenuViewDialog2 = new ChatMenuViewDialog(this.l);
            this.l1 = chatMenuViewDialog2;
            chatMenuViewDialog2.g(new o0());
            this.l1.show(getSupportFragmentManager(), "");
        }
    }

    public void H4(JSONObject jSONObject) {
        JSONArray optJSONArray = jSONObject.optJSONArray("users");
        this.X.setAudiencesNum(jSONObject.optInt("totalCount"));
        if (optJSONArray != null) {
            ArrayList<RoomMemberInfo> arrayList = new ArrayList<>();
            for (int i2 = 0; i2 < optJSONArray.length(); i2++) {
                JSONObject optJSONObject = optJSONArray.optJSONObject(i2);
                RoomMemberInfo roomMemberInfo = new RoomMemberInfo();
                roomMemberInfo.uid = optJSONObject.optInt(Oauth2AccessToken.KEY_UID);
                roomMemberInfo.headUrl = optJSONObject.optString("avatar");
                roomMemberInfo.nickName = optJSONObject.optString("nickname");
                roomMemberInfo.showValue = optJSONObject.optString("userShowValue");
                roomMemberInfo.tagUrl = optJSONObject.optString("verifiedUrl");
                roomMemberInfo.guardian = optJSONObject.optInt("guardianState");
                arrayList.add(roomMemberInfo);
            }
            if (jSONObject.optInt("subtype") == 1) {
                this.X.setRoomMemberInfos(arrayList);
            } else {
                if (jSONObject.optInt("subtype") != 2 || arrayList.size() <= 0) {
                    return;
                }
                this.X.y0(arrayList.get(0));
            }
        }
    }

    public int I1() {
        return this.A1;
    }

    public void I3(int i2, String str, String str2) {
        J3(i2, str, str2, "0");
        l3("Room", i2);
    }

    public BoxItemBean J1(String str) {
        List<BoxItemBean> list = this.M0;
        if (list == null || list.size() <= 0) {
            return null;
        }
        for (int i2 = 0; i2 < this.M0.size(); i2++) {
            BoxItemBean boxItemBean = this.M0.get(i2);
            if ((boxItemBean.gameCode + "").equals(str)) {
                return boxItemBean;
            }
        }
        return null;
    }

    public void J2() {
        if (this.q1) {
            O3();
        } else {
            finish();
        }
    }

    public void J3(int i2, String str, String str2, String str3) {
        if (getRequestedOrientation() == 0) {
            setRequestedOrientation(1);
        }
        if (i2 == this.l.getAnchor_uid()) {
            com.showself.utils.r0.m0(i2, true);
        }
        Bundle bundle = new Bundle();
        bundle.putInt("fuid", i2);
        if (d.i.j.o(i2)) {
            str2 = d.c.a.n().i();
        }
        bundle.putString("favatar", str2);
        if (d.i.j.o(i2)) {
            str = d.c.a.n().j();
        }
        bundle.putString("fnickname", str);
        bundle.putInt("f_gender", 1);
        bundle.putString("isOfficial", str3);
        K3(bundle);
    }

    public void J4(boolean z2) {
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.F2(z2);
            this.X.h1(z2);
            this.X.H2(z2);
        }
    }

    public void K4() {
        YJLiveShowView yJLiveShowView;
        com.r.i.e eVar = this.g1;
        if (eVar != null) {
            eVar.k1();
            if (!this.g1.P0() || (yJLiveShowView = this.X) == null) {
                return;
            }
            yJLiveShowView.V0();
            this.X.i2(false);
        }
    }

    public boolean L1() {
        RoomPlayerView roomPlayerView = this.U;
        return roomPlayerView != null && roomPlayerView.s();
    }

    public void L2() {
        Utils.Z0(getApplicationContext(), this.A0 == 1 ? "打开飞屏" : "关闭飞屏");
        com.r.m.d.o oVar = this.S;
        if (oVar != null) {
            oVar.f();
        }
    }

    public void L3() {
        if (this.T1 == null) {
            this.T1 = new com.showself.view.q();
        }
        if (this.T1.e()) {
            return;
        }
        com.showself.view.j jVar = new com.showself.view.j(this);
        this.v = jVar;
        this.T1.l(this, jVar.q(), 1.0f, 80, -1, -2, 0, 2131755759);
        this.T1.h(new j0());
    }

    public void L4(int i2) {
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.G2(i2);
        }
        this.S.g(i2);
    }

    public void M3() {
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.W1();
        }
    }

    public void M4() {
        int userId = com.showself.utils.r0.y(Cocos2dxActivity.getContext()).getUserId();
        AnchorBean anchorBean = this.l;
        int anchor_uid = anchorBean == null ? userId : anchorBean.getAnchor_uid();
        long currentTimeMillis = System.currentTimeMillis() / 1000;
        com.r.c.a aVar = new com.r.c.a();
        String k2 = com.r.c.c.k("v2/share/shareResult", 1);
        aVar.b(Oauth2AccessToken.KEY_UID, userId);
        aVar.b("anchorUid", anchor_uid);
        aVar.b("type", this.d2);
        aVar.e("shareSource", "");
        aVar.e(PushConstants.CONTENT, "");
        aVar.e("dateline", currentTimeMillis + "");
        new com.r.c.c(k2, aVar, new com.r.c.b(1), this).y(null);
    }

    public void N1() {
        DefaultResourceProvider provider = ResourceManager.getProvider();
        if (provider.getPcResourceMap().getDataLists() == null) {
            new Thread(new z0(provider)).start();
        } else {
            Z2(provider.getPcResourceMap().getVersion());
        }
    }

    public void N3() {
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.Y1();
        }
    }

    public void N4() {
        int userId = com.showself.utils.r0.y(this).getUserId();
        long currentTimeMillis = System.currentTimeMillis() / 1000;
        com.r.c.a aVar = new com.r.c.a();
        String k2 = com.r.c.c.k("v2/rooms/switchToHorizontal", 1);
        aVar.b(Oauth2AccessToken.KEY_UID, userId);
        aVar.b("roomId", this.f3270f);
        aVar.b("mode", this.c2);
        aVar.e("dateline", currentTimeMillis + "");
        new com.r.c.c(k2, aVar, new SharedResultParse(), this).y(null);
    }

    public int O1() {
        LoginResultInfo loginResultInfo = this.f3272h;
        if (loginResultInfo != null) {
            return com.showself.utils.r0.P(loginResultInfo.getUserId());
        }
        return 0;
    }

    public void O3() {
        Utils.Q0(this, null, "确认要停播吗?", getString(R.string.negative), getResources().getColor(2131099757), getString(R.string.positive), getResources().getColor(2131099758), new d0(), true);
    }

    public int P1() {
        return this.v1;
    }

    public int Q1() {
        return this.f3270f;
    }

    public void Q2() {
        if (this.i0 >= 3) {
            this.K.setVisibility(8);
            return;
        }
        this.K.setVisibility(0);
        this.K.setBackgroundResource(this.A[this.i0]);
        ObjectAnimator.ofPropertyValuesHolder(this.K, this.o1, this.p1).setDuration(400L).start();
        this.i0++;
        this.j0.sendEmptyMessageDelayed(1001, 1000L);
    }

    public void Q3() {
        if (this.f3274j == null) {
            this.f3274j = new com.showself.view.q();
        }
        if (this.f3274j.e()) {
            return;
        }
        com.r.n.g j2 = com.r.n.g.j();
        com.r.n.d c2 = com.r.n.d.c();
        c2.e("TreasureBox");
        c2.f("RoomHome");
        c2.d("TreasureBox");
        c2.h(com.r.n.e.View);
        j2.u(c2.b());
        com.showself.view.j jVar = new com.showself.view.j(this);
        this.v = jVar;
        this.f3274j.l(this, jVar.p(), 1.0f, 80, -1, -2, 0, 2131755759);
        this.f3274j.h(new k0());
    }

    public void R1() {
        try {
            Camera.open().release();
            com.r.c.a aVar = new com.r.c.a();
            aVar.b(AuthActivity.ACTION_KEY, 20);
            aVar.b("fuid", com.showself.utils.r0.y(this).getUserId());
            new com.r.c.c(com.r.c.c.k("serv_interact_shall.php", 0), aVar, new com.r.c.b(1), this).y(new v0());
        } catch (Exception unused) {
            Toast.makeText((Context) this, (CharSequence) "您的相机不可用,请检查相机是否被禁用", 0).show();
        }
    }

    public void R2(String str, String str2, SearchSongView searchSongView) {
        F3();
    }

    public void R3() {
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.Z1();
        }
    }

    public void S1() {
        HashMap hashMap = new HashMap();
        hashMap.put("roomid", Integer.valueOf(this.f3270f));
        addTask(new com.showself.service.f(200036, hashMap), this);
    }

    public boolean S2(int i2) {
        for (int i3 = 0; i3 < this.M0.size(); i3++) {
            if (this.M0.get(i3).gameCode == i2) {
                g1(this.M0.get(i3));
                return true;
            }
        }
        return false;
    }

    public void S3() {
        if (this.n == null) {
            Utils.X0(R.string.gift_data_not_ready);
        } else {
            this.d.x0(0);
        }
    }

    public void T1() {
        DefaultResourceProvider provider = ResourceManager.getProvider();
        if (provider.getResourceMap().getDataLists() == null) {
            new Thread(new x0(provider)).start();
        } else {
            c3(provider.getResourceMap().getVersion());
        }
    }

    public void T2(int i2, int i3, String str, int i4, String str2, HashMap<String, Object> hashMap) {
        if (i2 != this.f3270f) {
            return;
        }
        String str3 = hashMap == null ? null : (String) hashMap.get("playTemplate");
        boolean z2 = this.B1;
        if (z2) {
            if (!z2) {
                return;
            }
            if (i3 != this.f3272h.getUserId()) {
                if (i3 != -9999) {
                    return;
                }
                if (!"system".equals(str3) && (TextUtils.isEmpty(this.C1) || !this.C1.equals(str3))) {
                    return;
                }
            }
        }
        if (this.f3269e || r2(str3) || TextUtils.isEmpty(str) || !str.startsWith("http") || this.I1 || TextUtils.isEmpty(str) || !str.startsWith("http") || this.I1) {
            return;
        }
        if (hashMap == null) {
            hashMap = new HashMap<>();
        }
        HashMap<String, Object> hashMap2 = hashMap;
        hashMap2.put("auid", Integer.valueOf(i3));
        new com.showself.utils.d(str, new x(), i4, str2, i2, hashMap2).e();
    }

    public void T3(int i2) {
        if (this.n == null) {
            Utils.X0(R.string.gift_data_not_ready);
        } else {
            this.d.x0(i2);
        }
    }

    public void U1() {
        String str;
        com.r.c.a aVar = new com.r.c.a();
        String k2 = com.r.c.c.k(com.showself.net.e.X, 1);
        if (k2.contains(LocationInfo.NA)) {
            str = k2 + "&withBanner=true";
        } else {
            str = k2 + "?withBanner=true";
        }
        new com.r.c.c(str + "&roomid=" + this.f3270f, aVar, new GetShowPosterParser(), this).y(new h());
    }

    public void U3() {
        this.X.c2();
    }

    public void V2() {
        ChatMenuViewDialog chatMenuViewDialog = this.l1;
        if (chatMenuViewDialog == null || !chatMenuViewDialog.e()) {
            return;
        }
        this.l1.f();
    }

    public void W2(int i2) {
        ChatViewDialog chatViewDialog = this.m1;
        if (chatViewDialog == null || !chatViewDialog.f()) {
            return;
        }
        this.m1.g(i2);
    }

    public void X2(ArrayList<Photo> arrayList) {
        ChatViewDialog chatViewDialog = this.m1;
        if (chatViewDialog == null || !chatViewDialog.f()) {
            return;
        }
        this.m1.h(arrayList);
    }

    public void X3(int i2, boolean z2) {
        this.z.setFitsSystemWindows(true);
        h3(i2);
        p4();
        this.d.b1(z2);
    }

    public void Y0() {
        int i2;
        List<com.showself.view.x> list = this.w0;
        if (list == null || list.size() <= 0) {
            i2 = 0;
        } else {
            i2 = this.w0.get(this.w0.size() - 1).B();
        }
        if (i2 != 0) {
            GetRedPacketEnterBean getRedPacketEnterBean = this.t0.get(this.t0.size() - 1);
            this.v0.add(getRedPacketEnterBean);
            this.t0.remove(getRedPacketEnterBean);
            return;
        }
        ArrayList<GetRedPacketEnterBean> arrayList = this.u0;
        if (arrayList == null || arrayList.size() <= 0) {
            d1();
        } else {
            GetRedPacketEnterBean getRedPacketEnterBean2 = this.t0.get(this.t0.size() - 1);
            if (this.u0.size() == 5) {
                this.t0.add(this.u0.get(0));
                this.u0.remove(0);
            }
            this.u0.add(getRedPacketEnterBean2);
            this.t0.remove(getRedPacketEnterBean2);
        }
        k4();
    }

    protected void Y1(JSONObject jSONObject) {
        Utils.o();
        this.f3271g = false;
        if (jSONObject == null) {
            return;
        }
        String optString = jSONObject.optString("message");
        if (jSONObject.optInt("statuscode") == -4050 || jSONObject.optInt("statuscode") == -300) {
            Utils.m(this, optString);
        } else if (jSONObject.optInt("statuscode") != 0) {
            Utils.Z0(this, optString);
        }
        com.showself.utils.p.g(null, jSONObject.toString(), "AgameLog");
        runOnGLThread(new g0(jSONObject));
    }

    public void Y2() {
        ChatViewDialog chatViewDialog = this.m1;
        if (chatViewDialog == null || !chatViewDialog.f()) {
            return;
        }
        this.m1.i();
    }

    public void Y3() {
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.g2();
            this.X.i2(true);
        }
    }

    public void Z1() {
        RoomInfo.RoomThemeBean roomTheme;
        RoomInfo roomInfo = this.G1;
        if (roomInfo == null || (roomTheme = roomInfo.getRoomTheme()) == null) {
            return;
        }
        String spineMap = roomTheme.getSpineMap();
        if (TextUtils.isEmpty(spineMap)) {
            return;
        }
        try {
            JSONObject jSONObject = new JSONObject(spineMap);
            int optInt = jSONObject.optInt("roomid");
            if (optInt != Q1()) {
                return;
            }
            Z0(optInt, jSONObject, spineMap);
        } catch (JSONException e2) {
            e2.printStackTrace();
        }
    }

    public void Z3() {
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.T1();
        }
    }

    public void a1(int i2, int i3) {
        runOnGLThread(new y(i2, i3));
    }

    public void a3() {
        SJWebView sJWebView = this.Q0;
        if (sJWebView == null || !sJWebView.isShown()) {
            return;
        }
        this.Q0.s("javascript:refresh()");
    }

    protected void a4() {
        if (this.t1 == null) {
            this.t1 = new com.showself.view.q();
        }
        this.t1.f(false);
        com.showself.view.f0 f0Var = new com.showself.view.f0(this);
        this.T0 = f0Var;
        this.c1 = f0Var.g();
        getWindow().getDecorView().post(new k1(new RelativeLayout.LayoutParams(-1, -1)));
    }

    public native void appToCocoMaximize();

    public native void appToCocoXMPPState(int i2, int i3);

    public native void appToCocoXmppMessage(String str);

    public void b4() {
        this.X.p2();
    }

    public void c2() {
        this.X.S0(false);
    }

    public void c4() {
        if (this.l.getAnchor_uid() == this.f3272h.getUserId()) {
            Utils.a1("开播中不允许切换账号");
            return;
        }
        com.r.n.g j2 = com.r.n.g.j();
        com.r.n.d c2 = com.r.n.d.c();
        c2.e("Room");
        c2.f("TreasureBox");
        c2.d("SwitchAccount");
        c2.h(com.r.n.e.View);
        j2.u(c2.b());
        Intent intent = new Intent((Context) this, (Class<?>) ChangeAccountActivity.class);
        intent.putExtra("showAddAccount", false);
        intent.putExtra("roomId", this.f3270f);
        startActivity(intent);
    }

    @Override
    protected void cocosAction() {
        nativeSetGiftGameAppType();
    }

    @Override
    protected void cocosDisplayButton() {
        setShouldHandleTouch(false);
        this.X.H0();
        this.t = true;
    }

    public void d1() {
        ArrayList<GetRedPacketEnterBean> arrayList = this.t0;
        if (arrayList == null || arrayList.size() <= 0) {
            return;
        }
        if (this.t0.size() <= 5) {
            this.u0 = this.t0;
            this.t0 = new ArrayList<>();
            return;
        }
        for (int i2 = 0; i2 < 5; i2++) {
            this.u0.add(this.t0.get(0));
            this.t0.remove(0);
        }
    }

    public void d2() {
        this.k0.setVisibility(8);
    }

    public void d4() {
        this.e0.setVisibility(0);
        this.f0.removeAllViews();
        MusicModeView musicModeView = new MusicModeView(this);
        this.Y1 = musicModeView;
        this.f0.addView(musicModeView);
        this.X.U0(false);
    }

    public void e1() {
        this.z0 = 1 - this.z0;
        this.X.I2();
        com.showself.utils.r0.a1(this, this.f3272h.getUserId(), this.z0);
    }

    public void e3() {
        if (ShowSelfApp.h().c) {
            runOnGLThread(new Runnable() {
                @Override
                public final void run() {
                    AudioShowActivity.this.E2();
                }
            });
        }
    }

    public void f1() {
        RoomPlayerView roomPlayerView = this.U;
        if (roomPlayerView != null) {
            roomPlayerView.n();
        }
    }

    public void f2() {
        this.e0.setVisibility(8);
        this.X.f2(true);
    }

    public void f3(int i2) {
        if (ShowSelfApp.h().c) {
            runOnGLThread(new z(i2));
        }
    }

    @Override
    public void finish() {
        com.showself.utils.p.c(getClass().getName(), "finish");
        this.Q1 = true;
        e3();
        if (!ResourceManager.getPreLoadEnterRoom()) {
            org.greenrobot.eventbus.c.c().k(new com.r.m.b.a(a.EnumC0052a.START_DOWNLOAD));
        }
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.u2();
        }
        super.finish();
    }

    public void g2() {
        RelativeLayout relativeLayout = this.N0;
        if (relativeLayout == null || !relativeLayout.isShown()) {
            return;
        }
        Animation loadAnimation = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.bottom_exit);
        this.N0.setAnimation(loadAnimation);
        this.N0.startAnimation(loadAnimation);
        this.N0.setVisibility(8);
        this.O0.setVisibility(8);
    }

    public void g3() {
    }

    public void g4() {
        if (this.g1 == null) {
            this.g1 = new com.r.i.e(this);
        }
        if (this.g1.P0()) {
            return;
        }
        this.g1.c1(Q1());
        this.g1.D0();
    }

    public void h1() {
        if (this.u0.size() > 0) {
            this.u0.remove(this.u0.get(this.u0.size() - 1));
            ArrayList<GetRedPacketEnterBean> arrayList = this.v0;
            if (arrayList == null || arrayList.size() <= 0) {
                ArrayList<GetRedPacketEnterBean> arrayList2 = this.t0;
                if (arrayList2 != null && arrayList2.size() > 0) {
                    GetRedPacketEnterBean getRedPacketEnterBean = this.t0.get(this.t0.size() - 1);
                    this.t0.remove(getRedPacketEnterBean);
                    this.u0.add(0, getRedPacketEnterBean);
                }
            } else {
                GetRedPacketEnterBean getRedPacketEnterBean2 = this.v0.get(this.v0.size() - 1);
                this.v0.remove(getRedPacketEnterBean2);
                this.u0.add(getRedPacketEnterBean2);
            }
        }
        k4();
    }

    public void h2() {
        this.K1.setVisibility(8);
    }

    public void h3(int i2) {
        if (this.R == null) {
        }
    }

    public void h4() {
        this.t = false;
        setShouldHandleTouch(true);
        this.S1 = true;
        runOnGLThread(new h0());
    }

    @org.greenrobot.eventbus.m(threadMode = ThreadMode.MAIN)
    public void handleClickEvent(NewsClickEvent newsClickEvent) {
        if (newsClickEvent == null || !com.showself.utils.y0.a(getClass().getCanonicalName())) {
            return;
        }
        switch (j1.a[newsClickEvent.getType().ordinal()]) {
            case 1:
                C3(newsClickEvent.getUrl());
                break;
            case 2:
                YJLiveShowView yJLiveShowView = this.X;
                if (yJLiveShowView != null) {
                    yJLiveShowView.a2("超链接送礼");
                    break;
                }
                break;
            case 3:
                YJLiveShowView yJLiveShowView2 = this.X;
                if (yJLiveShowView2 != null) {
                    yJLiveShowView2.E0();
                    this.X.a2("直播间送礼");
                    break;
                }
                break;
            case 4:
                if (this.X != null) {
                    ContributionData contributionData = (ContributionData) newsClickEvent.getObj();
                    this.X.C2(contributionData.getTotalContribute(), contributionData.getTotalGift(), contributionData.getShowTime());
                    break;
                }
                break;
            case 5:
                YJLiveShowView yJLiveShowView3 = this.X;
                if (yJLiveShowView3 != null) {
                    yJLiveShowView3.H1();
                    break;
                }
                break;
            case 6:
                int i2 = 0;
                try {
                    i2 = Integer.valueOf(newsClickEvent.getUrl()).intValue();
                } catch (NumberFormatException e2) {
                    e2.printStackTrace();
                }
                YJLiveShowView yJLiveShowView4 = this.X;
                if (yJLiveShowView4 != null) {
                    yJLiveShowView4.b2("超链接送礼", i2);
                    break;
                }
                break;
        }
    }

    @org.greenrobot.eventbus.m(threadMode = ThreadMode.MAIN)
    public void handleMessage(com.r.m.b.e eVar) {
        switch (j1.b[eVar.c().ordinal()]) {
            case 1:
                V2();
                break;
            case 2:
                InputFragment inputFragment = this.d;
                if (inputFragment == null || !inputFragment.G0()) {
                    ChatMenuViewDialog chatMenuViewDialog = this.l1;
                    if (chatMenuViewDialog == null || !chatMenuViewDialog.e()) {
                        String str = (String) eVar.d()[0];
                        final MessageInfo messageInfo = (MessageInfo) eVar.d()[1];
                        com.showself.utils.m0.d(messageInfo, str, this.f3272h.getUserId(), new View.OnClickListener() {
                            @Override
                            public final void onClick(View view) {
                                AudioShowActivity.this.A2(messageInfo, view);
                            }
                        });
                        break;
                    }
                }
                break;
            case 3:
                YJLiveShowView yJLiveShowView = this.X;
                if (yJLiveShowView != null && this.l != null) {
                    this.Z = false;
                    yJLiveShowView.V1();
                    break;
                }
                break;
            case 4:
                MessageInfo messageInfo2 = (MessageInfo) eVar.a();
                ChatViewDialog chatViewDialog = this.m1;
                if (chatViewDialog != null && chatViewDialog.f()) {
                    this.m1.dismiss();
                }
                if (messageInfo2 != null) {
                    new Handler().postDelayed(new b1(), 200L);
                    break;
                }
                break;
            case 5:
                MessageInfo messageInfo3 = (MessageInfo) eVar.a();
                J3(messageInfo3.getFrom(), messageInfo3.getNickname(), messageInfo3.getAvatar(), messageInfo3.getIsOfficial());
                break;
            case 6:
                YJLiveShowView yJLiveShowView2 = this.X;
                if (yJLiveShowView2 != null) {
                    yJLiveShowView2.J1();
                    break;
                }
                break;
            case 7:
                YJLiveShowView yJLiveShowView3 = this.X;
                if (yJLiveShowView3 != null) {
                    yJLiveShowView3.g1();
                    break;
                }
                break;
            case 8:
                YJLiveShowView yJLiveShowView4 = this.X;
                if (yJLiveShowView4 != null) {
                    yJLiveShowView4.g1();
                    break;
                }
                break;
            case 9:
                com.showself.view.f0 f0Var = this.T0;
                if (f0Var != null) {
                    f0Var.m();
                    break;
                }
                break;
            case 10:
                this.f3272h = com.showself.utils.r0.y(this);
                com.r.m.d.y yVar = this.V;
                if (yVar != null) {
                    yVar.b();
                    this.V.t();
                }
                ChatViewDialog chatViewDialog2 = this.m1;
                if (chatViewDialog2 != null && chatViewDialog2.f()) {
                    this.m1.e(this.f3272h.getUserId());
                }
                com.showself.ui.show.g.l(this, this.f3270f, this.U0);
                break;
            case 11:
                finish();
                Utils.a1("您的另一个设备已进入该直播间");
                break;
            case 12:
                L4(eVar.b());
                break;
            case 13:
                com.r.i.e eVar2 = this.g1;
                if (eVar2 != null) {
                    eVar2.k1();
                    break;
                }
                break;
        }
    }

    @org.greenrobot.eventbus.m(threadMode = ThreadMode.MAIN)
    public void handleNews(NewsHandleEvent newsHandleEvent) {
        if (newsHandleEvent == null) {
            return;
        }
        V3();
    }

    public native void hideRootWebView();

    public void i2() {
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.Y0();
        }
    }

    public void i4() {
        if (this.K1.isShown() || this.v1 == 0) {
            return;
        }
        this.K1.setVisibility(0);
    }

    @Override
    @SuppressLint({"NewApi"})
    public void init() {
        this.d0 = new Timer();
        this.t0 = new ArrayList<>();
        this.u0 = new ArrayList<>();
        this.v0 = new ArrayList<>();
        this.g0 = (ImageView) findViewById(R.id.player_start);
        this.h0 = (SeekBar) findViewById(R.id.player_seekbar);
        this.K1 = (LinearLayout) findViewById(R.id.player_panel);
        this.g0.setOnClickListener(this.h2);
        this.h0.setOnSeekBarChangeListener(this.f2);
        this.h0.setEnabled(true);
        FrameLayout frameLayout = (FrameLayout) findViewById(R.id.fl_stop_content2);
        this.k0 = frameLayout;
        frameLayout.setVisibility(8);
        DisplayMetrics displayMetrics = new DisplayMetrics();
        Display defaultDisplay = getWindowManager().getDefaultDisplay();
        if (Build.VERSION.SDK_INT < 17) {
            defaultDisplay.getMetrics(displayMetrics);
        } else {
            defaultDisplay.getRealMetrics(displayMetrics);
        }
        this.a = displayMetrics.widthPixels;
        this.b = displayMetrics.heightPixels;
        this.K = (ImageView) findViewById(R.id.start_live_count);
        l2();
        this.d = new InputFragment();
        androidx.fragment.app.g supportFragmentManager = getSupportFragmentManager();
        this.c = supportFragmentManager;
        androidx.fragment.app.l a2 = supportFragmentManager.a();
        a2.r(R.id.show_input_container, this.d, "input");
        a2.i();
        this.m = (TextView) findViewById(R.id.tv_anchor_id);
        RelativeLayout relativeLayout = (RelativeLayout) findViewById(R.id.fl_flying_screen_view_container);
        this.R = relativeLayout;
        this.S = new com.r.m.d.o(this, relativeLayout);
        this.s = (FrameLayout) findViewById(R.id.fl_anim_container);
        if (this.Q == null) {
            this.Q = new com.r.m.e.b();
        }
        u4();
        o2();
        K1();
        this.X0 = new com.r.m.d.u();
    }

    public native void initSmallHostGm(String str);

    public boolean j2() {
        InputFragment inputFragment = this.d;
        if (inputFragment != null) {
            return inputFragment.w0();
        }
        return false;
    }

    public void j4() {
        if (this.f3272h == null) {
            return;
        }
        if (this.f1 == null) {
            this.f1 = new com.showself.view.q();
        }
        if (this.f1.e()) {
            return;
        }
        this.h1 = com.showself.utils.r0.P(this.f3272h.getUserId());
        View inflate = View.inflate(this, R.layout.layout_public_msg_size_item, null);
        TextView textView = (TextView) inflate.findViewById(R.id.tv_show_how_text);
        TextView textView2 = (TextView) inflate.findViewById(R.id.tv_public_msg_correct);
        int i2 = this.h1;
        if (i2 == 0) {
            textView.setTextSize(14.0f);
        } else if (i2 == 1) {
            textView.setTextSize(16.0f);
        } else {
            textView.setTextSize(18.0f);
        }
        DragChooseView dragChooseView = (DragChooseView) inflate.findViewById(R.id.dragChooseView);
        dragChooseView.setTextData("标准", "大", "超大");
        dragChooseView.setdefaultSelectedItem(this.h1);
        dragChooseView.a(new e1(textView));
        textView2.setOnClickListener(new f1());
        this.f1.l(this, inflate, 1.0f, 80, -1, com.showself.utils.r.a(295.0f), 0, 2131755759);
        this.f1.h(new g1());
    }

    public void k4() {
        List<com.showself.view.x> list = this.w0;
        if (list != null && list.size() > 0) {
            for (int size = this.w0.size() - 1; size > -1; size--) {
                com.showself.view.x xVar = this.w0.get(size);
                xVar.A();
                this.w0.remove(xVar);
            }
        }
        ArrayList<GetRedPacketEnterBean> arrayList = this.u0;
        if (arrayList == null || arrayList.size() <= 0) {
            return;
        }
        for (int i2 = 0; i2 < this.u0.size(); i2++) {
            GetRedPacketEnterBean getRedPacketEnterBean = this.u0.get(i2);
            this.w0.add(new com.showself.view.x(this, com.showself.utils.r0.y(this).getUserId(), getRedPacketEnterBean.getSendNickName(), getRedPacketEnterBean.getSendAvatar(), this.f3270f, getRedPacketEnterBean.getGameId(), getRedPacketEnterBean.getSendUid(), this.u0.size(), i2, ((this.f3275k.getRelation() == 0 || this.f3275k.getRelation() == 1) && this.l.getAnchor_uid() != this.f3272h.getUserId()) ? 0 : 1));
        }
    }

    public void l4(int i2) {
        if (this.U1 == null) {
            this.U1 = new com.showself.view.q();
        }
        if (this.U1.e()) {
            return;
        }
        this.U1.l(this, new com.showself.view.h(this, i2, this.f3275k.getRole()).n(), 1.0f, 80, -1, -2, 0, 2131755759);
    }

    public void m4() {
        if (this.V1 == null) {
            this.V1 = new com.showself.view.q();
        }
        if (this.V1.e()) {
            return;
        }
        com.showself.view.y yVar = new com.showself.view.y(this, this.l);
        if (this.c2 == 1) {
            this.V1.l(this, yVar.k(), 1.0f, 80, -1, -2, 0, 2131755759);
        } else {
            this.V1.l(this, yVar.k(), 1.0f, 5, com.showself.utils.r.b(this, 219.0f), -1, 0, R.style.dialog_transparent_land);
        }
        this.V1.h(new m0());
    }

    public void n1(Context context) {
        try {
            ProgressDialog progressDialog = this.R1;
            if (progressDialog != null && progressDialog.isShowing()) {
                this.R1.dismiss();
            }
            this.R1 = null;
        } catch (Exception e2) {
            e2.printStackTrace();
        }
    }

    public void n3() {
        if (!this.Z1) {
            this.Z1 = true;
            JSONObject jSONObject = new JSONObject();
            try {
                jSONObject.put("type", 115);
                jSONObject.put(Oauth2AccessToken.KEY_UID, this.f3272h.getUserId());
                jSONObject.put("roomid", this.f3270f);
                jSONObject.put("subtype", this.N + 1);
                jSONObject.put("nickname", this.f3272h.getUserName());
                this.Q.z(new com.r.m.e.c(jSONObject.toString()));
            } catch (JSONException e2) {
                e2.printStackTrace();
            }
        }
        if (this.M > 5) {
            this.M = 5;
        }
        try {
            JSONObject jSONObject2 = new JSONObject();
            jSONObject2.put("type", 105);
            jSONObject2.put(Oauth2AccessToken.KEY_UID, this.f3272h.getUserId());
            jSONObject2.put("roomid", this.f3270f);
            jSONObject2.put("subtype", this.N + 1);
            jSONObject2.put("count", this.M);
            jSONObject2.put("avatar", this.f3272h.getAvatar());
            this.Q.z(new com.r.m.e.c(jSONObject2.toString()));
            this.M = 0;
        } catch (JSONException e3) {
            e3.printStackTrace();
        }
    }

    public void n4() {
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.m2();
        }
    }

    public native void nativeSetGiftGameAppType();

    public void o1() {
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.D0();
        }
    }

    public void o3(JSONObject jSONObject) {
        if (ShowSelfApp.h().c) {
            runOnGLThread(new c1(jSONObject.toString()));
        }
    }

    public void o4() {
        this.J1.setVisibility(8);
        this.u1.v();
        this.X.R0();
    }

    @Override
    public void onActivityResult(int i2, int i3, Intent intent) {
        Uri fromFile;
        BaseInfoInRoom baseInfoInRoom;
        com.showself.ui.h.d.c.d(i2, i3, intent);
        if ((i2 == 15 || i2 == 111 || i2 == 22) && i2 == 111) {
            HashMap hashMap = new HashMap();
            File a2 = com.showself.utils.v.a(this, Utils.C() + "/myPhoto/croptemp", -1);
            this.n0 = a2;
            hashMap.put("imagePath", a2.getPath());
            addTask(new com.showself.service.f(GameControllerDelegate.BUTTON_DPAD_CENTER, hashMap), this);
            return;
        }
        if (i3 == -1 && i2 == 101 && intent != null) {
            ArrayList parcelableArrayListExtra = intent.getParcelableArrayListExtra("keyOfEasyPhotosResult");
            if (parcelableArrayListExtra == null || parcelableArrayListExtra.size() == 0) {
                return;
            } else {
                X2(parcelableArrayListExtra);
            }
        }
        if (i3 == -1 && i2 == 500) {
            String stringExtra = intent.getStringExtra("notice");
            if (!this.f3275k.getNotice().equals(stringExtra)) {
                this.f3275k.setNotice(stringExtra);
            }
            this.l.setGreetings(intent.getStringExtra("greetings"));
        }
        if (i3 == -1 && i2 == 100) {
            int intExtra = intent.getIntExtra("followType", 0);
            int intExtra2 = intent.getIntExtra("id", 0);
            if (intExtra == 0 || intExtra2 == 0) {
                return;
            }
            AnchorBean anchorBean = this.l;
            if (anchorBean != null && anchorBean.getAnchor_uid() == intExtra2 && (baseInfoInRoom = this.f3275k) != null) {
                if (intExtra == 1) {
                    baseInfoInRoom.setRelation(2);
                    this.X.setRelation(2);
                    Y2();
                } else if (intExtra == 2) {
                    baseInfoInRoom.setRelation(0);
                    this.X.setRelation(0);
                    Y2();
                }
            }
        }
        if (i3 != -1 || i2 != 2) {
            if (i3 != -1 || i2 != 202) {
                super.onActivityResult(i2, i3, intent);
                return;
            }
            Uri I0 = Utils.I0(intent.getData());
            if (I0 == null) {
                Utils.Y0(this, R.string.network_get_photo_fail);
                return;
            } else {
                int i4 = this.l0;
                Utils.c1(this, I0, 1, 1, i4 / 4, i4 / 4);
                return;
            }
        }
        File a3 = com.showself.utils.v.a(this, Utils.C() + "/myPhotos/temp", -1);
        if (Build.VERSION.SDK_INT >= 24) {
            fromFile = androidx.core.a.b.e(this, ShowSelfApp.h().getPackageName() + ".fileprovider", a3);
        } else {
            fromFile = Uri.fromFile(a3);
        }
        Uri uri = fromFile;
        int i5 = this.l0;
        Utils.c1(this, uri, 1, 1, i5 / 4, i5 / 4);
    }

    @Override
    public void onCocoEngineReady() {
        ShowSelfApp.h().b = true;
        B(1);
    }

    @Override
    protected void onCocosInitDone() {
    }

    @Override
    public void onCocosToAppMinimize(int i2, String str) {
        this.x = i2;
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.D2(true, str);
        }
    }

    @Override
    public void onCocosToAppPlayBubbleMsg(String str) {
        try {
            JSONObject jSONObject = new JSONObject(str);
            CatchData catchData = new CatchData();
            catchData.giftCount = Math.max(jSONObject.optInt("num"), jSONObject.optInt("realnum"));
            catchData.headUrl = jSONObject.optString("avatar");
            catchData.type = jSONObject.optInt("flipInType");
            catchData.textTag = jSONObject.optString("flipinText");
            catchData.contentUrl = jSONObject.optString("flipinUrl");
            catchData.nickName = jSONObject.optString("nickname");
            E3(catchData);
        } catch (JSONException e2) {
            e2.printStackTrace();
        }
    }

    public void onConfigurationChanged(Configuration configuration) {
        WindowManager windowManager = (WindowManager) getSystemService("window");
        DisplayMetrics displayMetrics = new DisplayMetrics();
        windowManager.getDefaultDisplay().getMetrics(displayMetrics);
        this.a = displayMetrics.widthPixels;
        this.b = displayMetrics.heightPixels;
        int i2 = configuration.orientation;
        this.c2 = i2;
        if (i2 == 1) {
            FrameLayout frameLayout = this.J1;
            if (frameLayout != null) {
                frameLayout.getLayoutParams().height = this.b - Utils.Z(this);
            }
        } else {
            FrameLayout frameLayout2 = this.J1;
            if (frameLayout2 != null) {
                frameLayout2.getLayoutParams().height = this.b;
            }
        }
        N4();
        O2();
        super.onConfigurationChanged(configuration);
    }

    @Override
    protected void onCreate(Bundle bundle) {
        com.showself.utils.p.c(getClass().getName(), "onCreate Start");
        super.onCreate(bundle);
        getWindow().setFormat(-3);
        setContentView(R.layout.audio_show);
        j jVar = null;
        com.showself.utils.u0.q(this, null);
        m2();
        T1();
        N1();
        org.greenrobot.eventbus.c.c().o(this);
        if (!ResourceManager.getPreLoadEnterRoom()) {
            org.greenrobot.eventbus.c.c().k(new com.r.m.b.a(a.EnumC0052a.STOP_DOWNLOAD));
        }
        this.o0 = new d.d.c();
        this.N = (int) (Math.random() * 5.0d);
        this.j0 = new p1(this);
        this.W0 = new com.r.m.d.q(this, (RelativeLayout) findViewById(R.id.rl_show_poster_show), (RelativeLayout) findViewById(R.id.rl_show_poster_cover));
        SearchSongView searchSongView = (SearchSongView) findViewById(R.id.view_search_song);
        this.u1 = searchSongView;
        searchSongView.setActiviy(this);
        this.l0 = getWindowManager().getDefaultDisplay().getWidth();
        RelativeLayout relativeLayout = (RelativeLayout) findViewById(R.id.rl_home_red_packet);
        this.q0 = relativeLayout;
        relativeLayout.setVisibility(8);
        RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(com.showself.utils.r.b(this, 40.0f), -2);
        this.r0 = layoutParams;
        layoutParams.addRule(12);
        this.r0.addRule(11);
        this.r0.setMargins(0, 0, com.showself.utils.r.b(this, 56.0f), com.showself.utils.r.b(this, 200.0f));
        this.e0 = (RelativeLayout) findViewById(R.id.rl_music_mode_parent);
        this.f0 = (RelativeLayout) findViewById(R.id.rl_music_mode);
        d3();
        this.B = new q1(this, jVar);
        IntentFilter intentFilter = new IntentFilter();
        intentFilter.addAction("android.net.conn.CONNECTIVITY_CHANGE");
        registerReceiver(this.B, intentFilter);
        this.f3273i = new r1(this, jVar);
        this.f3272h = com.showself.utils.r0.y(this);
        Intent intent = getIntent();
        this.G1 = (RoomInfo) intent.getSerializableExtra("roomInfo");
        this.f3270f = intent.getIntExtra("roomid", 0);
        this.U0 = intent.getStringExtra("bigAvatar");
        this.v1 = intent.getIntExtra("replay_id", 0);
        this.Z0 = intent.getStringExtra("l_avatar");
        this.e1 = intent.getStringExtra("protocol");
        if (this.v1 != 0) {
            this.d2 = 4;
        }
        this.I = intent.getStringExtra("quality");
        this.q1 = intent.getBooleanExtra("pushOrpull", false);
        this.r1 = intent.getStringExtra("halfOrFull");
        this.s1 = intent.getBooleanExtra("landscapeEnabled", false);
        init();
        RelativeLayout.LayoutParams layoutParams2 = new RelativeLayout.LayoutParams(com.showself.utils.r.b(this, 40.0f), -2);
        this.s0 = layoutParams2;
        layoutParams2.addRule(12);
        this.s0.addRule(9);
        this.s0.setMargins(com.showself.utils.r.b(this, 12.0f), 0, 0, (((this.b - Utils.Z(this)) * 376) / 960) + com.showself.utils.r.b(this, 90.0f));
        RelativeLayout relativeLayout2 = this.q0;
        if (relativeLayout2 != null) {
            relativeLayout2.setLayoutParams(this.s0);
        }
        if (this.s != null) {
            getWindow().getDecorView().postDelayed(new l0(), 1000L);
        }
        this.w1 = intent.getStringExtra("media_url");
        this.x1 = intent.getStringExtra("shall_serv_ip");
        this.y1 = intent.getIntExtra("shall_serv_port", 5222);
        this.b1 = new com.r.m.d.l(this);
        if (this.q1) {
            ((ViewStub) findViewById(R.id.push_stream_view_stub)).inflate();
            FrameLayout frameLayout = (FrameLayout) findViewById(R.id.jinshan_push_container);
            this.J1 = frameLayout;
            frameLayout.getLayoutParams().height = this.b - Utils.Z(this);
            this.J1.setOnTouchListener(new View.OnTouchListener() {
                @Override
                public final boolean onTouch(View view, MotionEvent motionEvent) {
                    return AudioShowActivity.this.C2(view, motionEvent);
                }
            });
            com.showself.utils.u0.g(this, (ImmersiveStatusBar) findViewById(2131298726), 2131099648, true);
            this.g1 = new com.r.i.e(this);
            this.S0 = new com.m.a.b(this);
            this.n1 = new com.r.m.d.k(this);
            a4();
            u3(this.Z0);
            this.T = JinshanPushFragment.z(this.I, this.r1, this.s1);
            this.d2 = 1;
            androidx.fragment.app.l a2 = this.c.a();
            a2.r(R.id.jinshan_push_container, this.T, "jinshan");
            a2.i();
            com.showself.utils.r0.G0(null);
            YJLiveShowView yJLiveShowView = (YJLiveShowView) findViewById(R.id.room_main_ui_view);
            this.X = yJLiveShowView;
            yJLiveShowView.setVisibility(8);
        } else {
            ((ViewStub) findViewById(R.id.pull_stream_view_stub)).inflate();
            this.V = new com.r.m.d.y(this);
            int intExtra = intent.getIntExtra("live_status", 0);
            RoomPlayerView e2 = this.V.e();
            this.U = e2;
            e2.p(this.w1, intExtra, this.r1);
            this.Y = new YJLiveShowLeftView(this);
            this.X = new YJLiveShowView(this);
            this.W = this.V.c();
            n2();
            this.d2 = 3;
            if (!Utils.z0(this)) {
                Utils.Y0(this, R.string.show_not_found_wifi);
            }
            v1();
        }
        G1(intent);
        F1();
        com.showself.utils.p.c(getClass().getName(), "onCreate end");
        com.r.n.g j2 = com.r.n.g.j();
        com.r.n.d c2 = com.r.n.d.c();
        c2.e("Room");
        c2.f("RoomHome");
        c2.d("Room");
        c2.h(com.r.n.e.View);
        j2.u(c2.b());
    }

    @Override
    protected void onDestroy() {
        View view = this.c1;
        if (view != null) {
            ((ViewGroup) view.getParent()).removeView(this.c1);
        }
        com.showself.utils.p.c(getClass().getName(), "onDestroy start");
        this.z.setFitsSystemWindows(false);
        super.onDestroy();
        org.greenrobot.eventbus.c.c().q(this);
        com.showself.utils.p.c(getClass().getName(), "onDestroy 0");
        Timer timer = this.P;
        if (timer != null) {
            timer.cancel();
        }
        b1();
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.B1();
        }
        this.X = null;
        BroadcastReceiver broadcastReceiver = this.b2;
        if (broadcastReceiver != null) {
            unregisterReceiver(broadcastReceiver);
        }
        com.showself.utils.p.c(getClass().getName(), "onDestroy 1");
        com.showself.utils.p.c(getClass().getName(), "onDestroy 2");
        com.showself.service.g.i(this);
        if (this.C != null) {
            this.C = null;
        }
        HandlerThread handlerThread = this.G;
        if (handlerThread != null) {
            handlerThread.quit();
            this.G = null;
        }
        Handler handler = this.D1;
        if (handler != null) {
            handler.removeMessages(this.J0);
            this.D1 = null;
        }
        com.showself.utils.p.c(getClass().getName(), "onDestroy 3");
        W1();
        com.r.m.d.y yVar = this.V;
        if (yVar != null) {
            yVar.o();
        }
        com.r.m.d.l lVar = this.b1;
        if (lVar != null) {
            lVar.E();
        }
        q1 q1Var = this.B;
        if (q1Var != null) {
            unregisterReceiver(q1Var);
        }
        com.r.m.d.o oVar = this.S;
        if (oVar != null) {
            oVar.e();
        }
        this.W0.m();
        this.X0.c();
        com.showself.utils.p.c(getClass().getName(), "onDestroy 4");
        com.r.m.e.b bVar = this.Q;
        if (bVar != null) {
            try {
                bVar.x(this.f3273i);
                this.Q.n();
                com.showself.utils.p.a("ShowTimerTask", "called cleanup onDestroy");
                this.Q.m();
            } catch (Exception e2) {
                e2.printStackTrace();
            }
            this.Q = null;
            this.f3273i = null;
        }
        com.showself.utils.p.c(getClass().getName(), "onDestroy end");
        com.r.n.g j2 = com.r.n.g.j();
        com.r.n.d c2 = com.r.n.d.c();
        c2.e("Room");
        c2.f("RoomHome");
        c2.d("ExitRoom");
        c2.h(com.r.n.e.Click);
        j2.u(c2.b());
    }

    @org.greenrobot.eventbus.m(threadMode = ThreadMode.MAIN)
    public void onEvent(com.showself.ui.juvenile.a.b bVar) {
        if (j1.c[bVar.a().ordinal()] != 1) {
            return;
        }
        finish();
    }

    @Override
    protected void onGLSurfaceViewCreate() {
        if (ShowSelfApp.h().b && !ShowSelfApp.h().c) {
            B(1);
        }
    }

    @Override
    protected void onGameClose() {
        this.S1 = false;
        this.t = false;
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.W0();
        }
        this.x = -1;
        N2();
    }

    @Override
    public void onGameReady(int i2) {
        if (i2 != 1) {
            ShowSelfApp.h().c = false;
            Utils.X0(R.string.toast_text_game_data_exception);
            return;
        }
        ShowSelfApp.h().c = true;
        com.r.m.d.l lVar = this.b1;
        if (lVar != null) {
            lVar.o();
        }
        runOnUiThread(new Runnable() {
            @Override
            public final void run() {
                AudioShowActivity.this.Z1();
            }
        });
    }

    @Override
    protected void onGotoRoomLiveShow(int i2, int i3) {
        com.showself.ui.show.g.l(this, i2, "");
    }

    public boolean onKeyDown(int i2, KeyEvent keyEvent) {
        RelativeLayout relativeLayout;
        if (i2 == 4 && keyEvent.getRepeatCount() == 0) {
            if (this.S1) {
                runOnGLThread(new c0());
                this.S1 = false;
                return true;
            }
            InputFragment inputFragment = this.d;
            if (inputFragment != null && (relativeLayout = inputFragment.f2382e) != null && relativeLayout.isShown()) {
                this.d.z0();
                return true;
            }
            if (keyEvent.getRepeatCount() == 0 && this.W0.j()) {
                this.W0.g();
                return true;
            }
            SearchSongView searchSongView = this.u1;
            if (searchSongView != null && searchSongView.q()) {
                F3();
                return true;
            }
            if (this.q1) {
                O3();
                return true;
            }
        }
        return super/*android.app.Activity*/.onKeyDown(i2, keyEvent);
    }

    protected void onNewIntent(Intent intent) {
        if (intent.getIntExtra("roomid", 0) == 0) {
            com.showself.ui.h.d.c.e(intent);
            return;
        }
        if (this.q1) {
            return;
        }
        this.k1 = false;
        this.d1 = null;
        ChatMenuViewDialog chatMenuViewDialog = this.l1;
        if (chatMenuViewDialog != null && chatMenuViewDialog.e()) {
            this.l1.dismissAllowingStateLoss();
        }
        ChatViewDialog chatViewDialog = this.m1;
        if (chatViewDialog != null && chatViewDialog.f()) {
            this.m1.dismissAllowingStateLoss();
        }
        T1();
        N1();
        K1();
        com.r.m.d.o oVar = this.S;
        if (oVar != null) {
            oVar.d();
        }
        this.w1 = intent.getStringExtra("media_url");
        int intExtra = intent.getIntExtra("live_status", 0);
        this.f3270f = intent.getIntExtra("roomid", 0);
        String stringExtra = intent.getStringExtra("bigAvatar");
        this.U0 = stringExtra;
        this.V.q(this.f3270f, stringExtra, intExtra, this.w1);
        this.v1 = intent.getIntExtra("replay_id", 0);
        this.r1 = intent.getStringExtra("halfOrFull");
        this.s1 = intent.getBooleanExtra("landscapeEnabled", false);
        this.G1 = (RoomInfo) intent.getSerializableExtra("roomInfo");
        this.x1 = intent.getStringExtra("shall_serv_ip");
        this.y1 = intent.getIntExtra("shall_serv_port", 5222);
        c1();
        G1(intent);
        F1();
        this.W0.n();
        this.X0.f();
        com.showself.ui.h.d.c.e(intent);
        b1();
        FrameLayout frameLayout = this.k0;
        if (frameLayout != null && frameLayout.isShown()) {
            this.k0.setVisibility(8);
        }
        this.f3272h = com.showself.utils.r0.y(this);
        InputFragment inputFragment = this.d;
        if (inputFragment != null) {
            inputFragment.I0();
            this.d.p0();
        }
        com.r.m.e.b bVar = this.Q;
        if (bVar != null) {
            try {
                bVar.x(this.f3273i);
                this.Q.n();
                com.showself.utils.p.a("ShowTimerTask", "called cleanup onNewintent");
                this.Q.m();
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
        this.f3275k = null;
        if (ShowSelfApp.h().c) {
            Z1();
        }
        List<JSONObject> list = this.J;
        if (list != null && !list.isEmpty()) {
            this.J.clear();
        }
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.C1();
        }
        this.e1 = "";
        this.A1 = 0;
        v1();
        super.onNewIntent(intent);
    }

    @Override
    protected void onPause() {
        com.showself.utils.p.a(getClass().getName(), "onPause start");
        super.onPause();
        W1();
        InputFragment inputFragment = this.d;
        if (inputFragment != null) {
            inputFragment.z0();
        }
        com.r.m.d.l lVar = this.b1;
        if (lVar != null) {
            lVar.F();
        }
        if (this.H1) {
            runOnGLThread(new c());
        }
        com.showself.utils.p.a(getClass().getName(), "onPause end");
    }

    @org.greenrobot.eventbus.m(threadMode = ThreadMode.MAIN)
    public void onReceiveEventBusMsg(com.r.m.b.b bVar) {
        BoxItemBean i3 = i3((String) bVar.a[0]);
        if (i3 != null) {
            i3.progress = ((Integer) bVar.a[1]).intValue();
        }
    }

    @Override
    public void onRequestPermissionsResult(int i2, String[] strArr, int[] iArr) {
        super.onRequestPermissionsResult(i2, strArr, iArr);
    }

    @Override
    protected void onResume() {
        com.showself.utils.p.a(getClass().getName(), "onResume start");
        LoginResultInfo loginResultInfo = this.f3272h;
        if (loginResultInfo != null) {
            if (loginResultInfo.getTaskDef() == 0) {
                ShowSelfApp.q(false);
            } else if (this.f3272h.getTaskDef() == 1) {
                ShowSelfApp.q(true);
            }
        }
        X1();
        com.r.m.d.l lVar = this.b1;
        if (lVar != null) {
            lVar.G();
        }
        com.r.m.d.y yVar = this.V;
        if (yVar != null) {
            yVar.r();
        }
        super.onResume();
        com.showself.utils.p.a(getClass().getName(), "onResume end");
        V3();
    }

    @Override
    protected void onStart() {
        com.showself.utils.p.a(getClass().getName(), "onStart start");
        super.onStart();
        X1();
        this.I1 = false;
        com.showself.utils.p.a(getClass().getName(), "onStart end");
    }

    @Override
    protected void onStop() {
        com.showself.utils.p.a(getClass().getName(), "onStop start");
        this.I1 = true;
        W1();
        super.onStop();
        com.showself.utils.p.a(getClass().getName(), "onStop end");
    }

    @Override
    public void onToAppPlayPlatFormAnimation(JSONObject jSONObject) {
        if (this.k1) {
            return;
        }
        if (!TextUtils.isEmpty(jSONObject.optString("svga"))) {
            org.greenrobot.eventbus.c.c().k(new com.r.m.b.g(0, jSONObject));
        } else {
            if (TextUtils.isEmpty(jSONObject.optString("vap"))) {
                return;
            }
            org.greenrobot.eventbus.c.c().k(new com.r.m.b.h(0, jSONObject));
        }
    }

    @Override
    public void onWindowFocusChanged(boolean z2) {
        if (this.c2 == 2) {
            this.j0.sendEmptyMessageDelayed(GameControllerDelegate.BUTTON_X, 200L);
        }
        super.onWindowFocusChanged(z2);
    }

    public void p1() {
        com.showself.view.q qVar = this.T1;
        if (qVar != null && qVar.e()) {
            this.T1.b();
        }
        this.X.F0();
    }

    public void p3(int i2, int i3, String str) {
        HashMap hashMap = new HashMap();
        hashMap.put("roomid", Integer.valueOf(this.f3270f));
        hashMap.put("fuid", Integer.valueOf(i3));
        hashMap.put(AuthActivity.ACTION_KEY, Integer.valueOf(i2));
        hashMap.put("note", str);
        addTask(new com.showself.service.f(20004, hashMap), this);
    }

    public native void playPlatFormAnimationFinish(String str);

    public void q1() {
        com.showself.view.q qVar = this.T1;
        if (qVar != null && qVar.e()) {
            this.T1.h(null);
            this.T1.b();
        }
        this.X.F0();
    }

    public void q4(int i2) {
        r4(i2, true);
    }

    public void r1() {
        com.showself.view.q qVar = this.f3274j;
        if (qVar != null && qVar.e()) {
            this.f3274j.b();
        }
        this.X.F0();
    }

    public void r3() {
        try {
            JSONObject jSONObject = new JSONObject();
            jSONObject.put("type", TbsListener.ErrorCode.INCRUPDATE_INSTALL_SUCCESS);
            jSONObject.put(Oauth2AccessToken.KEY_UID, this.f3272h.getUserId());
            jSONObject.put("roomid", this.f3270f);
            jSONObject.put("status", 3);
            jSONObject.put("live_status", 1);
            this.Q.z(new com.r.m.e.c(jSONObject.toString()));
        } catch (JSONException e2) {
            e2.printStackTrace();
        }
        q3();
    }

    public void r4(int i2, boolean z2) {
        if (this.f3275k == null) {
            return;
        }
        if (this.X1 == null) {
            this.X1 = new com.showself.view.e0(this, this);
        }
        this.X1.n(this.f3275k.getRole());
        this.X1.p(i2, z2);
    }

    @Override
    public void refresh(Object... objArr) {
        this.f3271g = false;
        Intent intent = null;
        n1(null);
        int intValue = ((Integer) objArr[0]).intValue();
        if (this.Q1) {
            com.showself.utils.p.c("AudioShowActivity", "refresh->mShouldExitActivity=true taskid is " + intValue);
            return;
        }
        int i2 = 1;
        HashMap hashMap = (HashMap) objArr[1];
        if (hashMap != null) {
            int intValue2 = ((Integer) hashMap.get(com.showself.net.e.n1)).intValue();
            String str = (String) hashMap.get(com.showself.net.e.o1);
            if (intValue == 1014) {
                if (com.showself.net.e.m1 != intValue2) {
                    Utils.Z0(this, str);
                    return;
                }
                File file = this.n0;
                if (file != null) {
                    t3(file);
                    return;
                }
                return;
            }
            if (intValue == 10052) {
                if (intValue2 != com.showself.net.e.m1 && intValue2 != -770) {
                    Utils.Z0(getApplicationContext(), str);
                    return;
                }
                Integer num = (Integer) hashMap.get("type");
                int intValue3 = ((Integer) hashMap.get("fuid")).intValue();
                int intValue4 = ((Integer) hashMap.get("relation")).intValue();
                if (num.intValue() == 1) {
                    if (intValue3 == this.l.getAnchor_uid()) {
                        BaseInfoInRoom baseInfoInRoom = this.f3275k;
                        if (baseInfoInRoom != null) {
                            baseInfoInRoom.setRelation(intValue4);
                        }
                        this.X.setRelation(intValue4);
                    }
                    com.showself.view.e0 e0Var = this.X1;
                    if (e0Var != null) {
                        e0Var.c(intValue4);
                    }
                } else if (num.intValue() == 2) {
                    if (intValue3 == this.l.getAnchor_uid()) {
                        BaseInfoInRoom baseInfoInRoom2 = this.f3275k;
                        if (baseInfoInRoom2 != null) {
                            baseInfoInRoom2.setRelation(intValue4);
                        }
                        this.X.setRelation(intValue4);
                    }
                    com.showself.view.e0 e0Var2 = this.X1;
                    if (e0Var2 != null) {
                        e0Var2.c(intValue4);
                    }
                }
                Utils.Z0(getApplicationContext(), str);
                return;
            }
            if (intValue == 10133) {
                if (((Integer) hashMap.get(com.showself.net.e.n1)).intValue() == 0) {
                    String str2 = (String) hashMap.get("big_avatar");
                    if (TextUtils.isEmpty(str2)) {
                        return;
                    }
                    u3(str2);
                    return;
                }
                return;
            }
            if (intValue != 20001) {
                if (intValue != 20004) {
                    if (intValue == 200036 && intValue2 == 0) {
                        ArrayList<RoomMemberInfo> arrayList = (ArrayList) hashMap.get("memberList");
                        int intValue5 = ((Integer) hashMap.get("count")).intValue();
                        if (this.X != null) {
                            com.r.n.g j2 = com.r.n.g.j();
                            com.r.n.d c2 = com.r.n.d.c();
                            c2.e("RoomMember");
                            c2.f("RoomHome");
                            c2.d("UserList");
                            c2.h(com.r.n.e.View);
                            j2.u(c2.b());
                            this.X.setRoomMemberInfos(arrayList);
                            this.X.setAudiencesNum(intValue5);
                            return;
                        }
                        return;
                    }
                    return;
                }
                int intValue6 = ((Integer) hashMap.get(AuthActivity.ACTION_KEY)).intValue();
                if (intValue6 == 5) {
                    Toast.makeText(getApplicationContext(), str, 0).show();
                    return;
                }
                if (intValue6 == 6) {
                    Toast.makeText(getApplicationContext(), str, 0).show();
                    return;
                }
                if (intValue6 == 7) {
                    if (intValue2 == 0) {
                        this.q.setText("取消管理员");
                        this.r.setImageDrawable(getResources().getDrawable(R.drawable.promote_manager));
                        this.M1.role = 1;
                    }
                    Toast.makeText(getApplicationContext(), str, 0).show();
                    return;
                }
                if (intValue6 == 8) {
                    if (intValue2 == 0) {
                        this.q.setText("升为管理员");
                        this.r.setImageDrawable(getResources().getDrawable(R.drawable.cancel_promote_manager));
                        this.M1.role = 0;
                    }
                    Toast.makeText(getApplicationContext(), str, 0).show();
                    return;
                }
                if (intValue6 != 22) {
                    if (intValue6 != 32) {
                        Toast.makeText(getApplicationContext(), str, 0).show();
                        return;
                    }
                    return;
                } else if (intValue2 != 0) {
                    U2();
                    return;
                } else {
                    if (((Integer) hashMap.get(BuildConfig.FLAVOR_env)).intValue() != 2) {
                        U2();
                        return;
                    }
                    return;
                }
            }
            if (com.showself.net.e.m1 != intValue2) {
                if (intValue2 == -4004) {
                    ShowSelfApp.t(true);
                    j3(str);
                    return;
                } else {
                    if (intValue2 == com.showself.net.e.p1 || intValue2 == com.showself.net.e.q1) {
                        finish();
                        return;
                    }
                    if (intValue2 == -4007) {
                        com.p.a.b.n(intValue2, str, String.format("serv_enterroom_shall.php", this.f3270f + ""), "ROOM_PAGE");
                    }
                    C1(R.string.dialog_text_can_not_connect_serv);
                    return;
                }
            }
            if (com.showself.utils.k0.k().m() == -1) {
                com.p.a.b.n(intValue2, "get login type failed", String.format("serv_enterroom_shall.php", this.f3270f + ""), "ROOM_PAGE");
                Intent intent2 = new Intent();
                intent2.setAction("SHOWSELF_SESSION_EXPIRED_ACTION");
                intent2.setPackage(Utils.P());
                intent2.putExtra("message", "请重新登录");
                intent2.putExtra("skip_to_page", 1);
                sendBroadcast(intent2);
                finish();
                return;
            }
            this.Z1 = false;
            ((Integer) hashMap.get("wand")).intValue();
            this.c0 = ((Integer) hashMap.get("vip")).intValue();
            this.b0 = ((Integer) hashMap.get("grade")).intValue();
            BaseInfoInRoom baseInfoInRoom3 = (BaseInfoInRoom) hashMap.get("roominfo");
            this.f3275k = baseInfoInRoom3;
            if (baseInfoInRoom3 == null) {
                C1(R.string.dialog_text_get_baseinfo_failed);
                return;
            }
            if (baseInfoInRoom3.getKick() == 1) {
                D1(this.f3275k.getMsg());
                return;
            }
            q2();
            this.O = ((Integer) hashMap.get("has_subscribed")).intValue();
            this.l = this.f3275k.getAnchors() == null ? null : this.f3275k.getAnchors().get(0);
            this.m.setText("房间号:" + this.f3270f);
            if (this.q1) {
                this.K1.setVisibility(8);
            } else {
                if (this.v1 == 0) {
                    this.K1.setVisibility(8);
                } else {
                    com.showself.utils.p.c("getMedia_url", "getMedia_url=" + this.l.getMedia_url());
                    this.K1.setVisibility(0);
                    this.U.E(this.l.getMedia_url());
                }
                this.V.w();
                i2 = 2;
            }
            String str3 = com.r.m.e.b.f2033j + "_" + this.f3270f + "_" + i2;
            if (com.showself.utils.k0.y()) {
                this.Y0 = ((Integer) hashMap.get("visitor_uid")).intValue();
                String str4 = (String) hashMap.get("resource_id");
                String str5 = (String) hashMap.get("visitor_pass");
                com.showself.utils.k0.k().K(4, this.Y0 + "", str5);
                str3 = str3 + "_" + str4;
            }
            com.r.m.e.b bVar = this.Q;
            if (bVar != null) {
                bVar.D(str3);
            }
            p2();
            this.d.C0();
            this.O1 = this.f3275k.getLevelUrl();
            n1 n1Var = this.C;
            if (n1Var != null) {
                n1Var.postDelayed(new k(), 500L);
            }
            com.r.m.d.l lVar = this.b1;
            if (lVar != null) {
                lVar.m();
            }
            if (this.l != null && !TextUtils.isEmpty(this.e1)) {
                try {
                    intent = com.showself.utils.o.e(this.e1, this);
                } catch (Exception e2) {
                    e2.printStackTrace();
                }
                if (intent != null) {
                    String stringExtra = intent.getStringExtra("halfwebview");
                    if (!TextUtils.isEmpty(stringExtra)) {
                        C3(stringExtra);
                    }
                }
            }
            b3();
        }
    }

    public native void releaseRootLayer();

    public native void removeAnimation(int i2);

    public native void removeGmLayer();

    public void s1() {
        InputFragment inputFragment = this.d;
        if (inputFragment != null) {
            inputFragment.r0();
        }
    }

    public boolean s2() {
        ChatMenuViewDialog chatMenuViewDialog = this.l1;
        if (chatMenuViewDialog != null) {
            return chatMenuViewDialog.e();
        }
        return false;
    }

    public void s3() {
        try {
            JSONObject jSONObject = new JSONObject();
            jSONObject.put("type", TbsListener.ErrorCode.INCRUPDATE_INSTALL_SUCCESS);
            jSONObject.put(Oauth2AccessToken.KEY_UID, this.f3272h.getUserId());
            jSONObject.put("roomid", this.f3270f);
            jSONObject.put("status", 4);
            this.Q.z(new com.r.m.e.c(jSONObject.toString()));
        } catch (JSONException e2) {
            e2.printStackTrace();
        }
    }

    public void s4() {
        this.j0.sendEmptyMessage(1001);
    }

    @Override
    protected void sendCocosXmppMsg(String str) {
        com.r.m.d.l lVar = this.b1;
        if (lVar != null) {
            lVar.K(str);
        }
    }

    @Override
    public void sendGameRequest(String str, String str2) {
        if (this.f3271g) {
            return;
        }
        this.f3271g = true;
        com.r.c.a aVar = new com.r.c.a();
        try {
            JSONObject jSONObject = new JSONObject(str);
            jSONObject.put("roomid", Q1());
            if (jSONObject.optInt("isHUD") != 2) {
                Utils.O0(this, false, false);
            }
            int optInt = jSONObject.optInt("serviceType");
            String optString = jSONObject.optString("httpType");
            aVar.i(jSONObject.toString());
            com.r.c.c cVar = new com.r.c.c(optInt == 2 ? com.r.c.c.k(str2, 1) : com.r.c.c.k(str2, 0), aVar, new com.r.c.b(1), this);
            if (optString.equals(com.tencent.connect.common.Constants.HTTP_GET)) {
                cVar.v(new e0());
            } else {
                cVar.y(new f0());
            }
        } catch (JSONException e2) {
            e2.printStackTrace();
        }
    }

    @org.greenrobot.eventbus.m(threadMode = ThreadMode.MAIN)
    public void showHalfBindPhonePage(com.r.m.b.e eVar) {
        if (eVar.c() == e.a.SHOW_BIND_PHONE_H5_HALF_PAGE) {
            e2();
            y2();
        }
    }

    public native void showPlaneGmMaximize();

    @Override
    public void startPublishGame(String str) {
        if (this.T != null) {
            try {
                JSONObject jSONObject = new JSONObject(str);
                final String optString = jSONObject.optString(LogBuilder.KEY_CHANNEL);
                final int optInt = jSONObject.optInt("duration");
                if (jSONObject.optBoolean("isChangeGameType", true)) {
                    this.y = RoomGameType.ANCHOR_GAME;
                }
                this.a1 = true;
                runOnUiThread(new Runnable() {
                    @Override
                    public final void run() {
                        AudioShowActivity.this.G2(optInt, optString);
                    }
                });
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
    }

    @Override
    public void stopPublishGame() {
        this.b1.O();
        this.y = RoomGameType.NONE;
        if (this.a1) {
            this.a1 = false;
            if (this.T != null) {
                runOnUiThread(new Runnable() {
                    @Override
                    public final void run() {
                        AudioShowActivity.this.I2();
                    }
                });
            }
        }
    }

    public void t1() {
        com.showself.view.q qVar = this.f1;
        if (qVar == null || !qVar.e()) {
            return;
        }
        this.f1.b();
    }

    public boolean t2() {
        com.showself.view.q qVar = this.f3274j;
        return qVar != null && qVar.e();
    }

    public void t3(File file) {
        if (this.t1 != null) {
            this.m0.b(file);
        }
    }

    public void t4(int i2) {
        BaseInfoInRoom baseInfoInRoom = this.f3275k;
        if (baseInfoInRoom == null) {
            return;
        }
        if (baseInfoInRoom.getRelation() == 2 || this.f3275k.getRelation() == 3) {
            this.d0.schedule(new i0(), 0L, 200L);
        }
    }

    public native void toSendRequestCallback(String str);

    public void u1() {
        com.showself.view.e0 e0Var = this.X1;
        if (e0Var != null) {
            e0Var.e();
        }
    }

    public boolean u2() {
        com.showself.view.q qVar = this.T1;
        return qVar != null && qVar.e();
    }

    public void u3(String str) {
        if (this.t1 != null) {
            this.m0.a(str);
        }
    }

    public boolean v2() {
        InputFragment inputFragment = this.d;
        if (inputFragment != null) {
            return inputFragment.F0();
        }
        return false;
    }

    public void v3(ArrayList<ShowPosterInfo> arrayList) {
        this.L1.clear();
        this.L1.addAll(arrayList);
        YJLiveShowView yJLiveShowView = this.X;
        if (yJLiveShowView != null) {
            yJLiveShowView.setPosterAdapterBanner(this.L1);
        }
    }

    public boolean w2() {
        return getRequestedOrientation() == 0;
    }

    public void w3(f0.c cVar) {
        this.m0 = cVar;
    }

    public void x1(String str) {
        this.W1 = str;
        w1(1);
        V3();
    }

    public boolean x2() {
        RelativeLayout relativeLayout = this.N0;
        if (relativeLayout != null) {
            return relativeLayout.isShown();
        }
        return false;
    }

    public void x3() {
    }

    public void x4(String str, String str2, int i2) {
        if (this.q1) {
            this.T.V(str, str2, i2);
        }
    }

    public void y1(String str) {
        if (isFinishing()) {
            return;
        }
        Utils.Q0(this, getResources().getString(R.string.prompt), str, null, 0, getResources().getString(R.string.positive), getResources().getColor(2131099758), new d1(this), false);
        com.r.m.e.b bVar = this.Q;
        if (bVar != null) {
            bVar.n();
        }
    }

    public void y2() {
        C3(ResourceManager.getBindPhoneUrl());
    }

    public void y3() {
        if (this.R == null) {
        }
    }

    public void y4(GetRedPacketEnterBean getRedPacketEnterBean) {
        if (getRedPacketEnterBean != null) {
            this.q0.setVisibility(0);
            RedPacketCountdownView redPacketCountdownView = new RedPacketCountdownView(this);
            t1 t1Var = new t1(1000 * (getRedPacketEnterBean.getDateline() - getRedPacketEnterBean.getBasetime()), 1000L, getRedPacketEnterBean, redPacketCountdownView);
            this.x0.add(redPacketCountdownView);
            this.y0.add(t1Var);
            if (this.q0.getChildAt(0) == null) {
                this.q0.addView(this.x0.get(0));
            }
            t1Var.start();
        }
    }

    public void z1(int i2) {
        if (this.f3271g) {
            return;
        }
        this.f3271g = true;
        HashMap hashMap = new HashMap();
        hashMap.put("fuid", Integer.valueOf(this.l.getAnchor_uid()));
        hashMap.put("type", Integer.valueOf(i2));
        addTask(new com.showself.service.f(10052, hashMap), this);
    }

    public void z4() {
        finish();
    }

    private class s1 extends TimerTask {
        int a;
        String b;

        class a extends com.r.m.e.c {
            a(Object obj) {
                super(obj);
            }

            @Override
            public void a(JSONObject jSONObject) {
                com.showself.utils.p.c("ShowTimerTask", "+++++++++++++++++++++++++++++++.");
                if (jSONObject == null) {
                    ?? r3 = AudioShowActivity.this;
                    if (r3.f3272h == null || r3.isFinishing()) {
                        return;
                    }
                    com.showself.utils.p.a("ShowTimerTask", "empty response. Try to recover connection.");
                    if (AudioShowActivity.this.Q != null) {
                        AudioShowActivity.this.Q.n();
                        AudioShowActivity.this.Q.o(AudioShowActivity.this.f3272h.getUserId());
                        if (!AudioShowActivity.this.Q.q(AudioShowActivity.this.f3273i)) {
                            AudioShowActivity.this.Q.l(AudioShowActivity.this.f3273i);
                        }
                    }
                    com.showself.utils.p.a("ShowTimerTask", "7777777777777777777777777777");
                }
            }
        }

        private s1() {
            this.a = -1;
            this.b = "";
        }

        @Override
        public void run() {
            try {
                this.a++;
                if (AudioShowActivity.this.isFinishing()) {
                    if (AudioShowActivity.this.H != null) {
                        AudioShowActivity.this.H.cancel();
                        return;
                    }
                    return;
                }
                if (!AudioShowActivity.this.R0) {
                    AudioShowActivity.this.B(1);
                }
                if (AudioShowActivity.this.J != null && !AudioShowActivity.this.J.isEmpty()) {
                    AudioShowActivity audioShowActivity = AudioShowActivity.this;
                    if (audioShowActivity.f3269e) {
                        audioShowActivity.J.clear();
                    } else if (audioShowActivity.H1 && AudioShowActivity.this.mGLSurfaceView != null && ShowSelfApp.h().c) {
                        AudioShowActivity.this.v4((JSONObject) AudioShowActivity.this.J.remove(0));
                    }
                }
                if (this.a % 15 == 0 && Utils.q0(AudioShowActivity.this.getApplicationContext())) {
                    ?? r0 = AudioShowActivity.this;
                    if (r0.f3272h == null) {
                        r0.f3272h = com.showself.utils.r0.y(r0.getApplicationContext());
                    }
                    if (AudioShowActivity.this.Q != null && !AudioShowActivity.this.Q.q(AudioShowActivity.this.f3273i)) {
                        AudioShowActivity.this.Q.l(AudioShowActivity.this.f3273i);
                    }
                    this.a = 0;
                    if (TextUtils.isEmpty(this.b)) {
                        this.b = new JSONObject().put("type", 109).put(Oauth2AccessToken.KEY_UID, AudioShowActivity.this.f3272h.getUserId()).put("roomid", AudioShowActivity.this.f3270f).toString();
                    }
                    a aVar = new a(this.b);
                    if (AudioShowActivity.this.Q != null) {
                        com.showself.utils.p.c("ShowTimerTask", "----------------------------------");
                        AudioShowActivity.this.Q.z(aVar);
                    }
                }
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }

        s1(AudioShowActivity audioShowActivity, j jVar) {
            this();
        }
    }

    @org.greenrobot.eventbus.m(threadMode = ThreadMode.MAIN)
    public void onEvent(com.showself.utils.c1.a aVar) {
        if (aVar.a() == a.EnumC0091a.SHOW_DIALOG) {
            C3(aVar.b());
            return;
        }
        com.r.m.d.q qVar = this.W0;
        if (qVar != null) {
            qVar.o();
        }
    }

    @org.greenrobot.eventbus.m(threadMode = ThreadMode.MAIN)
    public void onReceiveEventBusMsg(com.r.m.b.c cVar) {
        String str = (String) cVar.a[0];
        BoxItemBean i3 = i3(str);
        if (i3 != null) {
            boolean booleanValue = ((Boolean) cVar.a[2]).booleanValue();
            if (booleanValue && !this.S1 && this.f3270f == ((Integer) cVar.a[3]).intValue()) {
                try {
                    B(Integer.parseInt(str));
                } catch (NumberFormatException e2) {
                    e2.printStackTrace();
                }
            }
            i3.downloadState = booleanValue ? 2 : 0;
            i3.progress = booleanValue ? 100 : 0;
        }
    }
}