鳯华 v4.0.0版本的 MD5 值为:e66eea5d0a772ef117f7e252dfbb1dfc
以下内容为反编译后的 j.java 源代码,内容仅作参考
package u4;
import android.content.Context;
import android.os.Handler;
import android.text.TextUtils;
import android.util.Log;
import com.tencent.connect.share.QzonePublish;
import java.io.File;
import java.net.InetAddress;
import java.util.concurrent.TimeUnit;
import okhttp3.a0;
import okhttp3.b0;
import okhttp3.v;
import okhttp3.w;
import okhttp3.x;
import org.json.JSONException;
import org.json.JSONObject;
import u4.a;
public class j {
public static String f19256f = "https://vod2.qcloud.com/v3/index.php?Action=";
private Context f19257a;
private String f19258b;
private x f19259c;
private Handler f19260d;
private String f19261e = "";
class a implements Runnable {
final String f19262a;
a(String str) {
this.f19262a = str;
}
@Override
public void run() {
try {
InetAddress byName = InetAddress.getByName(this.f19262a);
j.this.f19261e = byName.getHostAddress();
} catch (Exception e9) {
j.this.f19261e = this.f19262a;
e9.printStackTrace();
}
}
}
class b implements Runnable {
final String f19264a;
b(String str) {
this.f19264a = str;
}
@Override
public void run() {
try {
InetAddress byName = InetAddress.getByName(this.f19264a);
j.this.f19261e = byName.getHostAddress();
} catch (Exception e9) {
j.this.f19261e = this.f19264a;
e9.printStackTrace();
}
}
}
public j(Context context, String str, int i9) {
this.f19257a = context;
this.f19258b = str;
x.b s9 = new x().s();
long j9 = i9;
TimeUnit timeUnit = TimeUnit.SECONDS;
this.f19259c = s9.e(j9, timeUnit).o(j9, timeUnit).p(j9, timeUnit).c();
this.f19260d = new Handler(context.getMainLooper());
}
public void f(String str) {
try {
this.f19261e = InetAddress.getByName(str).getHostAddress();
} catch (Exception e9) {
e9.printStackTrace();
}
}
public int c(String str, String str2, String str3, okhttp3.e eVar) {
String str4 = "https://" + str + "/v3/index.php?Action=CommitUploadUGC";
Log.d("TVC-UGCClient", "finishUploadUGC->request url:" + str4);
String str5 = "";
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("signature", this.f19258b);
jSONObject.put("clientReportId", str2);
jSONObject.put("clientVersion", "1.0.8.2");
jSONObject.put("vodSessionKey", str3);
str5 = jSONObject.toString();
Log.d("TVC-UGCClient", str5);
} catch (JSONException e9) {
e9.printStackTrace();
}
a0 b10 = new a0.a().o(str4).k(b0.create(v.c("application/json"), str5)).b();
new Thread(new a(b10.i().m())).start();
this.f19259c.t(b10).o(eVar);
return 0;
}
public String d() {
return this.f19261e;
}
public int e(f fVar, String str, String str2, okhttp3.e eVar) {
String str3 = f19256f + "ApplyUploadUGC";
Log.d("TVC-UGCClient", "initUploadUGC->request url:" + str3);
String str4 = "";
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("signature", this.f19258b);
jSONObject.put("videoName", fVar.f());
jSONObject.put("videoType", fVar.i());
if (fVar.k()) {
jSONObject.put("coverName", fVar.c());
jSONObject.put("coverType", fVar.b());
}
jSONObject.put("clientReportId", str);
jSONObject.put("clientVersion", "1.0.8.2");
if (!TextUtils.isEmpty(str2)) {
jSONObject.put("vodSessionKey", str2);
}
str4 = jSONObject.toString();
Log.d("TVC-UGCClient", str4);
} catch (JSONException e9) {
e9.printStackTrace();
}
a0 b10 = new a0.a().o(str3).k(b0.create(v.c("application/json"), str4)).b();
final String m9 = b10.i().m();
new Thread(new Runnable() {
@Override
public final void run() {
j.this.f(m9);
}
}).start();
this.f19259c.t(b10).o(eVar);
return 0;
}
public void g(f fVar, String str, a.c cVar, okhttp3.e eVar) {
File file = new File(fVar.g());
w.a aVar = new w.a();
aVar.f(w.f17699j);
String str2 = "";
try {
JSONObject jSONObject = new JSONObject();
jSONObject.put("signature", this.f19258b);
jSONObject.put("videoName", fVar.f());
jSONObject.put("videoType", fVar.i());
jSONObject.put(QzonePublish.PUBLISH_TO_QZONE_VIDEO_SIZE, fVar.h());
if (fVar.k()) {
jSONObject.put("coverName", fVar.c());
jSONObject.put("coverType", fVar.b());
jSONObject.put("coverSize", fVar.a());
}
jSONObject.put("clientReportId", str);
jSONObject.put("clientVersion", "1.0.8.2");
str2 = jSONObject.toString();
Log.d("TVC-UGCClient", str2);
} catch (JSONException e9) {
e9.printStackTrace();
}
aVar.b("para", null, b0.create(v.c("application/json"), str2));
aVar.b("video_content", file.getName(), b0.create(v.c("application/octet-stream"), file));
if (fVar.k()) {
aVar.b("cover_content", fVar.c(), b0.create(v.c("application/octet-stream"), new File(fVar.d())));
}
w e10 = aVar.e();
a0.a aVar2 = new a0.a();
a0 b10 = aVar2.o(f19256f + "UploadFile").k(new u4.a(e10, cVar)).b();
new Thread(new b(b10.i().m())).start();
this.f19259c.t(b10).o(eVar);
}
public void h(String str) {
this.f19258b = str;
}
}