4399游戏盒 v7.2.1.31版本的 MD5 值为:951717f45e3fda95c8a358caf4ca93e1

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


package cn.m4399.login.union.e;

import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.VolleyLog;
import com.android.volley.toolbox.HttpHeaderParser;
import com.igexin.push.f.p;
import com.loopj.android.http.AsyncHttpClient;
import com.loopj.android.http.RequestParams;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class e extends Request<String> {

    JSONObject f438a;

    class a implements Response.ErrorListener {
        a() {
        }

        @Override
        public void onErrorResponse(VolleyError volleyError) {
            volleyError.printStackTrace();
        }
    }

    public e(JSONObject jSONObject) {
        super(1, "https://stat.yxhimg.com/trace/com.4399.4399quicklogin/v1.0/android/", new a());
        this.f438a = jSONObject;
    }

    public static void a(JSONObject... jSONObjectArr) {
        try {
            JSONArray jSONArray = new JSONArray();
            for (int i = 0; i < jSONObjectArr.length; i++) {
                jSONArray.put(i, jSONObjectArr[i]);
            }
            cn.m4399.login.union.support.network.b.a(new e(new JSONObject().put("Msgs", new JSONObject().put(cn.m4399.login.union.main.d.d().j(), new JSONObject().put("onekey_report_error", jSONArray)))));
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }

    @Override
    public byte[] getBody() {
        try {
            JSONObject jSONObject = this.f438a;
            if (jSONObject == null) {
                return null;
            }
            return jSONObject.toString().getBytes(p.b);
        } catch (UnsupportedEncodingException unused) {
            VolleyLog.wtf("Unsupported Encoding while trying to get the bytes of %s using %s", this.f438a, p.b);
            return null;
        }
    }

    @Override
    public Map<String, String> getHeaders() throws AuthFailureError {
        HashMap hashMap = new HashMap();
        hashMap.put(AsyncHttpClient.HEADER_CONTENT_TYPE, RequestParams.APPLICATION_JSON);
        hashMap.put("User-Agent", cn.m4399.login.union.support.network.a.c());
        return hashMap;
    }

    @Override
    public Response<String> parseNetworkResponse(NetworkResponse networkResponse) {
        String str;
        try {
            str = new String(networkResponse.data, HttpHeaderParser.parseCharset(networkResponse.headers));
        } catch (UnsupportedEncodingException unused) {
            str = new String(networkResponse.data);
        }
        return Response.success(str, HttpHeaderParser.parseCacheHeaders(networkResponse));
    }

    @Override
    public void deliverResponse(String str) {
        cn.m4399.login.union.support.d.e("****** [report exception] %s", String.valueOf(this.f438a));
        cn.m4399.login.union.support.d.e("****** [report exception] %s", str);
    }
}