酷狗概念版 v2.5.5版本的 MD5 值为:782d327088fca4e58310f35a56f41319

以下内容为反编译后的 b.java 源代码,内容仅作参考


package com.kugou.fanxing.tingtab;

import android.text.TextUtils;
import com.google.gson.reflect.TypeToken;
import com.kugou.common.apm.sdk.n;
import com.kugou.common.app.KGCommonApplication;
import com.kugou.common.config.ConfigKey;
import com.kugou.common.network.d.e;
import com.kugou.common.network.f;
import com.kugou.common.utils.as;
import com.kugou.common.utils.cj;
import com.kugou.fanxing.base.global.GlobalUser;
import com.kugou.fanxing.pro.a.d;
import com.kugou.fanxing.util.ag;
import com.kugou.fanxing.util.p;
import com.sina.weibo.sdk.web.WebPicUploadResult;
import com.tencent.connect.common.Constants;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.ArrayList;
import java.util.List;
import org.apache.http.HttpEntity;
import org.json.JSONException;
import org.json.JSONObject;

public class b extends com.kugou.android.app.fanxing.live.d.b.a {
    @Override
    protected String c() {
        return p.l + "_ting_kan_video_v2.data";
    }

    public c a(long j, int i, int i2, boolean z) {
        if (j > 0) {
            this.f8493a.put("kugouId", Long.valueOf(j));
        }
        this.f8493a.put("livePage", Integer.valueOf(i));
        this.f8493a.put("videoPage", Integer.valueOf(i2));
        this.f8493a.put("device", cj.u(KGCommonApplication.getContext()));
        double c2 = ag.c();
        double b2 = ag.b();
        if (Double.isNaN(c2)) {
            c2 = 0.0d;
        }
        if (Double.isNaN(b2)) {
            b2 = 0.0d;
        }
        try {
            DecimalFormat decimalFormat = new DecimalFormat("#.00");
            DecimalFormatSymbols decimalFormatSymbols = new DecimalFormatSymbols();
            decimalFormatSymbols.setDecimalSeparator('.');
            decimalFormat.setDecimalFormatSymbols(decimalFormatSymbols);
            c2 = Double.valueOf(decimalFormat.format(c2)).doubleValue();
            b2 = Double.valueOf(decimalFormat.format(b2)).doubleValue();
        } catch (Exception unused) {
        }
        this.f8493a.put("longitude", Double.valueOf(c2));
        this.f8493a.put("latitude", Double.valueOf(b2));
        this.f8493a.put("kugouId", Long.valueOf(GlobalUser.a() > 0 ? GlobalUser.a() : 0L));
        this.f8493a.put("gaodeCode", ag.d());
        a aVar = new a(j <= 0);
        a(aVar.getUrl(), true);
        aVar.b(b());
        C1003b c1003b = new C1003b();
        c cVar = new c();
        try {
            f.d().a(aVar, c1003b);
            c1003b.getResponseData(cVar);
            if (z && cVar.e() != null && !cVar.e().isEmpty()) {
                a(c1003b.getJsonStr());
            }
        } catch (Exception unused2) {
            if (z) {
                cVar.a(d());
                cVar.a(true);
            }
        }
        return cVar;
    }

    public static class a extends e {

        private boolean f56711a;

        @Override
        public HttpEntity getPostRequestEntity() {
            return null;
        }

        @Override
        public String getRequestModuleName() {
            return "Ting-KanVideo";
        }

        @Override
        public String getRequestType() {
            return Constants.HTTP_GET;
        }

        public a(boolean z) {
            this.f56711a = z;
        }

        @Override
        public String getUrl() {
            StringBuilder sb = new StringBuilder();
            sb.append("http://bjacshow.kugou.com");
            sb.append(!this.f56711a ? "/mfx-listenindex/mo/liveAndVideo" : "/mfx-listenindex/cdn/mo/liveAndVideo");
            return sb.toString();
        }

        @Override
        public ConfigKey a() {
            return this.f56711a ? com.kugou.android.app.a.a.wr : com.kugou.android.app.a.a.ws;
        }
    }

    public static class c {

        private boolean f56712a;

        private boolean f56713b;

        private int f56714c = -1;

        private String f56715d;

        private boolean f56716e;
        private List<KanVideoEntity> f;

        public void a(String str) {
            try {
                JSONObject jSONObject = new JSONObject(str);
                int optInt = jSONObject.optInt(WebPicUploadResult.RESP_UPLOAD_PIC_PARAM_CODE);
                if (optInt != 0) {
                    this.f56714c = optInt;
                    this.f56715d = jSONObject.optString("msg");
                    return;
                }
                JSONObject optJSONObject = jSONObject.optJSONObject("data");
                boolean z = true;
                this.f56712a = optJSONObject.optInt("hasNextLivePage", 0) == 1;
                if (optJSONObject.optInt("hasNextVideoPage", 0) != 1) {
                    z = false;
                }
                this.f56713b = z;
                this.f = d.a(optJSONObject.optString("list"), new TypeToken<ArrayList<KanVideoEntity>>() {
                }.getType());
                this.f56714c = 0;
            } catch (JSONException e2) {
                as.e(e2);
            }
        }

        public boolean a() {
            return this.f56712a;
        }

        public boolean b() {
            return this.f56713b;
        }

        public void a(boolean z) {
            this.f56716e = z;
        }

        public int c() {
            return this.f56714c;
        }

        public String d() {
            return this.f56715d;
        }

        public List<KanVideoEntity> e() {
            return this.f;
        }
    }

    public static class C1003b<Object> extends n<c> {
        @Override
        public void getResponseData(c cVar) {
            if (cVar == null) {
                return;
            }
            String jsonStr = getJsonStr();
            if (TextUtils.isEmpty(jsonStr)) {
                return;
            }
            cVar.a(jsonStr);
        }
    }
}