新浪彩票 v0.96.37版本的 MD5 值为:0c7ddce345383506e2959f5d75bdceab
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.netease.nrtc.utility.b;
import android.net.Uri;
import com.netease.nrtc.c;
import com.netease.nrtc.engine.impl.f;
import com.netease.yunxin.base.http.HttpStack;
import com.netease.yunxin.base.trace.Trace;
import com.netease.yunxin.nos.sdk.NosFacade;
import com.netease.yunxin.nos.sdk.UploadCallback;
import java.io.File;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
public class a {
private RunnableC3321a a;
private final ExecutorService c = new ThreadPoolExecutor(0, 1, 30, TimeUnit.SECONDS, new LinkedBlockingQueue());
private final b b = new b();
public static class RunnableC3321a implements Runnable {
private final b a;
private final f b;
public RunnableC3321a(b bVar, f fVar) {
this.a = bVar;
this.b = fVar;
}
@Override
public void run() {
String str;
try {
str = this.a.a(String.format("tmp_%d.zip", Long.valueOf(this.b.c())));
} catch (Exception e) {
e.printStackTrace();
str = null;
}
if (str == null) {
Trace.e("LogUploadService", "path not found:" + this.a.a());
return;
}
final File file = new File(str);
c.a(str, str, this.b.b(), new UploadCallback() {
@Override
public void onCanceled(Object obj) {
}
@Override
public void onFailure(Object obj, int i, String str2) {
Trace.e("LogUploadService", String.format("onFailure: %s %d %s", obj, Integer.valueOf(i), str2));
}
@Override
public void onProgress(Object obj, long j, long j2) {
Trace.d("LogUploadService", String.format("onProgress: %s %d/%d", obj, Long.valueOf(j), Long.valueOf(j2)));
}
@Override
public void onSuccess(Object obj, String str2) {
Trace.i("LogUploadService", String.format("file upload onSuccess: %s", obj));
HttpStack.HttpStackResponse doPost = HttpStack.doPost(Uri.parse("https://nrtc.netease.im/nrtc/uploadSdkLog.action").buildUpon().appendQueryParameter("cid", String.valueOf(RunnableC3321a.this.b.c())).appendQueryParameter("uid", String.valueOf(RunnableC3321a.this.b.d())).appendQueryParameter("appkey", com.netease.nrtc.engine.impl.a.d).appendQueryParameter("sdkLogUrl", NosFacade.buildFormatUrl(RunnableC3321a.this.b.b())).appendQueryParameter("deviceid", RunnableC3321a.this.b.e()).build().toString());
if (doPost == null || doPost.code != 200) {
Object[] objArr = new Object[1];
objArr[0] = doPost == null ? "null" : doPost.result;
Trace.e("LogUploadService", String.format("call http failed: %s", objArr));
} else {
Trace.i("LogUploadService", String.format("call http onSuccess: %s %s", obj, doPost.result));
}
file.delete();
}
});
}
public long a() {
return this.b.c();
}
}
private a() {
}
public static a a(String str) {
a aVar = new a();
aVar.b(str);
return aVar;
}
private void b(String str) {
this.b.b(str);
}
public void a(f fVar) {
RunnableC3321a runnableC3321a = this.a;
if (runnableC3321a != null && runnableC3321a.a() == fVar.c()) {
Trace.i("LogUploadService", "upload task is running");
} else {
this.a = new RunnableC3321a(this.b, fVar);
}
}
public void a() {
RunnableC3321a runnableC3321a = this.a;
if (runnableC3321a == null) {
return;
}
this.c.execute(runnableC3321a);
this.a = null;
}
}