酷狗概念版 v2.5.5版本的 MD5 值为:782d327088fca4e58310f35a56f41319
以下内容为反编译后的 ac.java 源代码,内容仅作参考
package com.kugou.android.app.home.channel.protocol;
import android.text.TextUtils;
import c.a.a.i;
import c.t;
import com.kugou.common.config.ConfigKey;
import com.kugou.common.network.w;
import com.kugou.common.q.b;
import com.kugou.common.utils.as;
import com.tencent.connect.common.Constants;
import d.ab;
import d.u;
import d.z;
import org.apache.commons.codec.net.StringEncodings;
import org.apache.http.HttpEntity;
import org.apache.http.entity.StringEntity;
import org.json.JSONException;
import org.json.JSONObject;
import rx.e;
public class ac {
public static e<String> a(String str, String str2, String str3, String str4, String str5, String str6, int i) {
a aVar = new a(str, str2, str3, str4, str5, str6, i);
t b2 = new t.a().b(aVar.getRequestModuleName()).a(w.a(com.kugou.android.app.a.a.dQ, "https://gateway.kugou.com/youth/v1/channel_modify")).a(c.b.a.a.a()).a(i.a()).a().b();
aVar.getGetRequestParams();
return ((bi) b2.a(bi.class)).b(aVar.d(), z.a(u.a("application/json"), aVar.f11426e)).c(new rx.b.e<ab, e<String>>() {
@Override
public e<String> call(ab abVar) {
try {
return e.a(abVar.f());
} catch (Exception unused) {
return e.a((Throwable) new RuntimeException("return string is null or empty"));
}
}
});
}
public static class a extends ah {
private String f11411a;
@Override
public String getRequestModuleName() {
return "ChannelVersionRequestPackage";
}
@Override
public String getRequestType() {
return Constants.HTTP_POST;
}
a(String str, String str2, String str3, String str4, String str5, String str6, int i) {
this.f11411a = str;
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("nickname", b.a().l());
if (!TextUtils.isEmpty(str2)) {
jSONObject.put("name", str2);
}
if (!TextUtils.isEmpty(str6)) {
jSONObject.put("pic", str6);
}
if (!TextUtils.isEmpty(str3)) {
jSONObject.put("channel_avatar", str3);
}
if (!TextUtils.isEmpty(str4)) {
jSONObject.put("tags", str4);
}
if (!TextUtils.isEmpty(str5)) {
jSONObject.put("intro", str5);
}
jSONObject.put("channel_type", i);
} catch (JSONException e2) {
as.e(e2);
}
this.f11426e = jSONObject.toString();
}
@Override
public ConfigKey b() {
return com.kugou.android.app.a.a.dQ;
}
@Override
public void ab_() {
this.l.put("global_collection_id", this.f11411a);
}
@Override
public HttpEntity getPostRequestEntity() {
try {
return new StringEntity(com.kugou.common.useraccount.utils.b.a(com.kugou.framework.mymusic.a.a.a.a.a(this.f11426e, StringEncodings.UTF8, this.f59646b, this.f59647c)), "utf-8");
} catch (Exception e2) {
as.e(e2);
return null;
}
}
}
}