萝莉来了 v1.2.1版本的 MD5 值为:6055c21e001561c5b114d0da5b392fcb
以下内容为反编译后的 ErrorMsgHttpRequest.java 源代码,内容仅作参考
package com.unicom.errormsg;
import android.content.Context;
import android.content.SharedPreferences;
import com.infinit.MultimodeBilling.tools.MyApplication;
import java.util.ArrayList;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.params.BasicHttpParams;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.util.EntityUtils;
import org.json.JSONArray;
import org.json.JSONObject;
public class ErrorMsgHttpRequest {
private static final String _$3 = "1.0.0";
private static final int _$4 = 10000;
private static final String _$5 = "http://uniview.wostore.cn/log-app/updateErrorMsg";
private Context _$1;
private JSONObject _$2 = null;
public ErrorMsgHttpRequest(Context context) {
this._$1 = context;
}
public String _$1() {
return this._$1.getSharedPreferences("errormsgClinetVersion", 0).getString("clinetVersion", _$3);
}
public void _$1(String str) {
SharedPreferences.Editor edit = this._$1.getSharedPreferences("errormsgClinetVersion", 0).edit();
edit.putString("clinetVersion", str);
edit.commit();
}
public String _$2(String str) {
try {
HttpGet httpGet = new HttpGet(str);
BasicHttpParams basicHttpParams = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(basicHttpParams, 10000);
HttpConnectionParams.setSoTimeout(basicHttpParams, 10000);
httpGet.setParams(basicHttpParams);
HttpResponse execute = new DefaultHttpClient().execute(httpGet);
if (execute.getStatusLine().getStatusCode() == 200) {
return EntityUtils.toString(execute.getEntity());
}
} catch (Exception e) {
e.printStackTrace();
}
return "";
}
public ArrayList<ErrorMsgBean> _$3(String str) {
ArrayList<ErrorMsgBean> arrayList = new ArrayList<>();
try {
JSONArray jSONArray = new JSONArray(str);
for (int i = 0; i < jSONArray.length(); i++) {
JSONObject jSONObject = jSONArray.getJSONObject(i);
arrayList.add(new ErrorMsgBean(Integer.valueOf(jSONObject.getString("errorCode")).intValue(), jSONObject.getString(MyApplication.REQUEST_ERRORMSG), jSONObject.getString("errorNotice"), jSONObject.getString("errorAdv")));
}
} catch (Exception e) {
e.printStackTrace();
}
return arrayList;
}
public String _$4(String str) {
try {
return this._$2.getString(str);
} catch (Exception e) {
e.printStackTrace();
return "";
}
}
public void requestUpdateMsg() {
try {
new llIlIllIIlllIlll(this).start();
} catch (Exception e) {
e.printStackTrace();
}
}
}