酷狗概念版 v2.5.5版本的 MD5 值为:782d327088fca4e58310f35a56f41319
以下内容为反编译后的 a.java 源代码,内容仅作参考
package com.kugou.android.channelfm;
import android.support.annotation.NonNull;
import android.text.TextUtils;
import c.a.a.i;
import c.c.j;
import c.c.o;
import c.c.u;
import c.f;
import c.t;
import com.kugou.android.app.KGApplication;
import com.kugou.android.common.entity.ExtraInfo;
import com.kugou.android.common.entity.KGMusic;
import com.kugou.android.common.entity.KGMusicForUI;
import com.kugou.android.common.entity.KGSong;
import com.kugou.android.mymusic.personalfm.e;
import com.kugou.android.mymusic.personalfm.model.RecSongInfo;
import com.kugou.common.app.KGCommonApplication;
import com.kugou.common.musicfees.mediastore.entity.CExtraInfo;
import com.kugou.common.network.v;
import com.kugou.common.network.w;
import com.kugou.common.utils.as;
import com.kugou.common.utils.br;
import com.kugou.common.utils.cx;
import com.kugou.common.utils.cz;
import com.tencent.stat.DeviceInfo;
import com.tencent.tauth.AuthActivity;
import d.ab;
import d.z;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import javax.annotation.Nullable;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class a extends com.kugou.android.netmusic.bills.special.superior.f.a {
public static class C0386a {
public int f22443a;
public boolean f22444b;
public int f22445c;
public ArrayList<KGMusic> f22446d;
}
public interface d {
@o
c.b<C0386a> a(@j Map<String, String> map, @c.c.a z zVar, @u Map<String, String> map2);
}
public void a(C0386a c0386a, String str, String str2, String str3) {
if (c0386a.f22443a == 1 && cz.a(c0386a.f22446d)) {
Iterator<KGMusic> it = c0386a.f22446d.iterator();
while (it.hasNext()) {
KGMusic next = it.next();
next.aG = 1031;
next.r(str);
next.u(str2);
ExtraInfo extraInfo = new ExtraInfo();
extraInfo.f22895d = str2;
next.a(extraInfo);
next.a(CExtraInfo.b(str3));
}
}
}
public C0386a a(c cVar) {
t b2 = new t.a().b("recommend").a(b.a()).a(i.a()).a(w.a(com.kugou.android.app.a.a.aQ, "http://persnfm.service.kugou.com/youth/v1/radio_rs")).a().b();
HashMap hashMap = new HashMap();
hashMap.put("Content-Encoding", "gzip");
try {
String jSONObject = cVar.f22449a.toString();
Map<String, String> b3 = w.b(null);
cx.b(b3, jSONObject.getBytes());
C0386a d2 = ((d) b2.a(d.class)).a(hashMap, com.kugou.android.netmusic.bills.special.superior.f.a.a(jSONObject), b3).a().d();
if (d2 != null && d2.f22443a == 1 && cVar.f22450b) {
e.a().b("KEY_SCENE_DETAIL_UPLOAD", System.currentTimeMillis());
}
return d2;
} catch (Exception e2) {
as.e(e2);
return null;
}
}
public static class c {
JSONObject f22449a;
boolean f22450b;
com.kugou.common.base.g.d f22451c;
private String f22452d;
private int f22453e;
private int f;
public void a(String str, int i, int i2) {
this.f22452d = str;
this.f22453e = i;
this.f = i2;
}
public void a(String str, String str2, com.kugou.common.base.g.d dVar) {
JSONArray g;
this.f22451c = dVar;
Hashtable hashtable = new Hashtable();
String b2 = com.kugou.common.config.c.a().b(com.kugou.android.app.a.a.lo);
int F = br.F(KGApplication.getContext());
long currentTimeMillis = System.currentTimeMillis() / 1000;
hashtable.put("appid", b2);
hashtable.put("clientver", Integer.valueOf(F));
hashtable.put("platform", "android");
hashtable.put("userid", Long.valueOf(com.kugou.common.environment.a.Y()));
hashtable.put(DeviceInfo.TAG_MID, br.j(KGCommonApplication.getContext()));
hashtable.put("uuid", com.kugou.common.q.b.a().ak());
hashtable.put("dfid", com.kugou.common.q.b.a().cQ());
hashtable.put("clienttime", Long.valueOf(currentTimeMillis));
hashtable.put(AuthActivity.ACTION_KEY, str2);
hashtable.put("channel_id", str);
v.a((Hashtable<String, Object>) hashtable, dVar);
if ("login".equals(str2) && (g = com.kugou.android.app.personalfm.a.g()) != null && g.length() > 0) {
hashtable.put("black_singerid", g);
}
if ("play".equals(str2) && !TextUtils.isEmpty(this.f22452d)) {
hashtable.put("hash", this.f22452d);
hashtable.put("playtime", Integer.valueOf(this.f22453e));
hashtable.put("remain_songcnt", Integer.valueOf(this.f));
}
hashtable.put("playlist_ver", 2);
hashtable.put("area_code", com.kugou.common.environment.a.ay());
hashtable.putAll(com.kugou.android.mymusic.d.x());
boolean z = System.currentTimeMillis() - e.a().a("KEY_SCENE_DETAIL_UPLOAD", 0L) > 14400000;
this.f22450b = false;
if (z) {
com.kugou.android.channelfm.d dVar2 = new com.kugou.android.channelfm.d(0L);
dVar2.a(100);
hashtable.put("client_playlist", dVar2.a(true, true));
this.f22450b = true;
}
this.f22449a = com.kugou.common.i.a.b((Hashtable<?, ?>) hashtable);
}
}
public static class b extends f.a {
public static b a() {
return new b();
}
@Override
@Nullable
public f<ab, C0386a> a(Type type, Annotation[] annotationArr, t tVar) {
return new f<ab, C0386a>() {
@Override
public C0386a a(@NonNull ab abVar) throws IOException {
String f = abVar.f();
C0386a c0386a = new C0386a();
b.a(f, c0386a);
return c0386a;
}
};
}
public static boolean a(String str, C0386a c0386a) {
JSONObject jSONObject;
JSONObject optJSONObject;
if (TextUtils.isEmpty(str)) {
return false;
}
try {
jSONObject = new JSONObject(str);
c0386a.f22443a = jSONObject.optInt("status");
} catch (JSONException unused) {
}
if (c0386a.f22443a != 1 || (optJSONObject = jSONObject.optJSONObject("data")) == null) {
return false;
}
c0386a.f22444b = optJSONObject.optInt("is_clean") == 1;
c0386a.f22445c = optJSONObject.optInt("channel_flag");
ArrayList<KGMusic> arrayList = new ArrayList<>();
JSONArray optJSONArray = optJSONObject.optJSONArray("song_list");
if (optJSONArray != null && optJSONArray.length() != 0) {
for (int i = 0; i < optJSONArray.length(); i++) {
arrayList.add(a(optJSONArray.getJSONObject(i)).bN_());
}
c0386a.f22446d = arrayList;
return true;
}
return false;
}
public static KGSong a(JSONObject jSONObject) {
KGMusicForUI kGMusicForUI = new KGMusicForUI();
String optString = jSONObject.optString("album_audio_id");
String optString2 = jSONObject.optString("audio_id");
String optString3 = jSONObject.optString("author_name");
String optString4 = jSONObject.optString("songname");
if (!TextUtils.isEmpty(optString)) {
kGMusicForUI.r(Long.parseLong(optString));
}
if (!TextUtils.isEmpty(optString2)) {
kGMusicForUI.s(Long.parseLong(optString2));
}
kGMusicForUI.h(optString3);
kGMusicForUI.d(optString4);
kGMusicForUI.b(optString3 + " - " + optString4);
String optString5 = jSONObject.optString("sd_hash");
kGMusicForUI.p(TextUtils.isEmpty(optString5) ? jSONObject.optString("qhd_hash") : optString5);
kGMusicForUI.m(TextUtils.isEmpty(optString5) ? 0 : 2);
JSONObject optJSONObject = jSONObject.optJSONObject("audio_info");
if (optJSONObject != null) {
String optString6 = optJSONObject.optString("hash");
String optString7 = optJSONObject.optString("filesize");
String optString8 = optJSONObject.optString("timelength");
if (TextUtils.isEmpty(optString6)) {
optString6 = optJSONObject.optString("hash_128");
optString7 = optJSONObject.optString("filesize_128");
optString8 = optJSONObject.optString("timelength_128");
}
kGMusicForUI.j(optString6);
kGMusicForUI.h(Long.parseLong(optString7));
kGMusicForUI.i((long) Double.parseDouble(optString8));
kGMusicForUI.y(optJSONObject.optInt("fail_process"));
kGMusicForUI.z(optJSONObject.optInt("pay_type"));
kGMusicForUI.A(optJSONObject.optInt("old_cpy"));
String optString9 = optJSONObject.optString("hash_320");
String optString10 = optJSONObject.optString("filesize_320");
kGMusicForUI.n(optString9);
kGMusicForUI.k(Long.parseLong(optString10));
String optString11 = optJSONObject.optString("hash_flac");
String optString12 = optJSONObject.optString("filesize_flac");
kGMusicForUI.o(optString11);
kGMusicForUI.l(Long.parseLong(optString12));
kGMusicForUI.H(optJSONObject.optString("extname"));
JSONObject optJSONObject2 = jSONObject.optJSONObject("album_info");
if (optJSONObject2 != null) {
String optString13 = optJSONObject2.optString("album_name");
long optInt = optJSONObject2.optInt("album_id");
kGMusicForUI.e(optString13);
kGMusicForUI.d(optInt);
kGMusicForUI.f(String.valueOf(optInt));
String optString14 = optJSONObject2.optString("sizable_cover");
if (optString14.contains("{size}")) {
kGMusicForUI.t(optString14.replace("{size}", "400"));
}
} else {
String optString15 = jSONObject.optString("album_name");
long optInt2 = jSONObject.optInt("album_id");
kGMusicForUI.e(optString15);
if (optInt2 > 0) {
kGMusicForUI.d(optInt2);
kGMusicForUI.f(String.valueOf(optInt2));
}
}
}
KGSong aC = kGMusicForUI.aC();
aC.a(com.kugou.framework.musicfees.a.i.b(optJSONObject));
aC.a(optJSONObject.optInt("privilege"), optJSONObject.optInt("privilege_320"), optJSONObject.optInt("privilege_flac"));
aC.b(1);
aC.H(300);
aC.C("18");
JSONObject optJSONObject3 = jSONObject.optJSONObject("rec_song_info");
if (optJSONObject3 != null) {
aC.a(RecSongInfo.a(optJSONObject3));
}
return aC;
}
}
}