新浪彩票 v0.96.37版本的 MD5 值为:0c7ddce345383506e2959f5d75bdceab
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.netease.nrtc;
import com.netease.nrtc.a;
import com.netease.nrtc.engine.impl.i;
import com.netease.nrtc.engine.rawapi.RtcConfig;
import com.netease.nrtc.utility.j;
import com.netease.yunxin.base.http.HttpStack;
import com.netease.yunxin.base.http.URIUtils;
import com.netease.yunxin.base.thread.ThreadUtils;
import com.netease.yunxin.base.trace.Trace;
import com.tencent.smtt.sdk.TbsReaderView;
public class a {
private static String a = "https://nrtc.netease.im/nrtc/rejoin.action";
public interface InterfaceC3313a {
void config(int i, RtcConfig rtcConfig);
}
public static class b {
public static final a a = new a();
}
public static a a() {
return b.a;
}
public void c(String str, RtcConfig rtcConfig, InterfaceC3313a interfaceC3313a) {
i iVar;
Exception e;
Trace.i("NRtcEngineNewLoginConfigFetcher", "start request");
String str2 = "appkey=" + str + "&uid=" + rtcConfig.userId + "&channelId=" + rtcConfig.channel;
try {
str2 = URIUtils.encodeQuery(str2, "UTF-8");
} catch (Exception e2) {
Trace.e("NRtcEngineNewLoginConfigFetcher", e2.getMessage());
}
HttpStack.HttpStackResponse doPost = HttpStack.doPost(a + "?" + str2, TbsReaderView.ReaderCallback.GET_BAR_ANIMATING);
int i = doPost.code;
if (i != 200) {
a(i, "request http err , code : " + i, interfaceC3313a, rtcConfig);
return;
}
String str3 = null;
try {
iVar = new i();
} catch (Exception e3) {
iVar = null;
e = e3;
}
try {
iVar.a(doPost.result);
} catch (Exception e4) {
e = e4;
str3 = e.getMessage();
if (iVar != null) {
}
}
if (iVar != null) {
a(1, "code : 1, exception : " + str3 + " , desc : " + ("parse config exception " + str3), interfaceC3313a, rtcConfig);
return;
}
int c = iVar.c();
if (c != 200) {
a(c, "code : " + c + " , desc : " + ("check config err : " + iVar.c() + " # " + iVar.d()), interfaceC3313a, rtcConfig);
return;
}
RtcConfig b2 = iVar.b();
if (com.netease.nrtc.utility.a.a(b2.turn) && com.netease.nrtc.utility.a.a(b2.proxy) && com.netease.nrtc.utility.a.a(b2.reproxy)) {
a(1, "code : 1 , desc : parser request config success , but all empty", interfaceC3313a, rtcConfig);
return;
}
Trace.d("NRtcEngineNewLoginConfigFetcher", "re login new config ret : " + doPost.result);
if (!com.netease.nrtc.utility.a.a(b2.turn)) {
rtcConfig.turn = b2.turn;
}
if (!com.netease.nrtc.utility.a.a(b2.proxy)) {
rtcConfig.proxy = b2.proxy;
}
if (!com.netease.nrtc.utility.a.a(b2.reproxy)) {
rtcConfig.reproxy = b2.reproxy;
}
a(c, "parse config success ", interfaceC3313a, rtcConfig);
}
private a() {
}
public static void a(String str) {
if (com.netease.nrtc.utility.a.a(str)) {
a = str;
}
}
public void a(final String str, final RtcConfig rtcConfig, final InterfaceC3313a interfaceC3313a) {
ThreadUtils.runOnThread(j.b().f(), new Runnable() {
@Override
public final void run() {
a.this.c(str, rtcConfig, interfaceC3313a);
}
});
}
private void a(final int i, String str, final InterfaceC3313a interfaceC3313a, final RtcConfig rtcConfig) {
if (i == 200) {
Trace.i("NRtcEngineNewLoginConfigFetcher", str);
} else {
Trace.e("NRtcEngineNewLoginConfigFetcher", str);
}
if (interfaceC3313a != null) {
ThreadUtils.runOnUiThread(new Runnable() {
@Override
public final void run() {
a.InterfaceC3313a.this.config(i, rtcConfig);
}
});
}
}
}