360手机助手 v5.2.50版本的 MD5 值为:087c008db9e518cd556c792742e6830c
以下内容为反编译后的 ap.java 源代码,内容仅作参考
package com.qihoo.appstore.LifeHelper;
import android.os.AsyncTask;
import android.text.TextUtils;
import com.tencent.connect.common.Constants;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import org.json.JSONException;
import org.json.JSONObject;
public class ap extends AsyncTask {
final String a;
final ba b;
final h c;
public ap(h hVar, String str, ba baVar) {
this.c = hVar;
this.a = str;
this.b = baVar;
}
@Override
public Void doInBackground(Boolean... boolArr) {
String str;
int i;
JSONObject a;
HttpURLConnection httpURLConnection;
int i2;
JSONObject a2;
String format = String.format("https://openapi.360.cn/user/me.json?access_token=%1$s&fields=%2$s", this.a, "id,name,avatar,sex,area,nick");
int i3 = -1;
int i4 = 0;
String str2 = null;
while (true) {
if (i4 > 2) {
int i5 = i3;
str = str2;
i = i5;
break;
}
try {
HttpURLConnection httpURLConnection2 = (HttpURLConnection) new URL(format).openConnection();
try {
httpURLConnection2.setRequestMethod(Constants.HTTP_GET);
int responseCode = httpURLConnection2.getResponseCode();
String a3 = 400 <= responseCode ? com.qihoo.utils.ay.a(httpURLConnection2.getErrorStream(), "UTF-8", true) : com.qihoo.utils.ay.a(httpURLConnection2.getInputStream(), "UTF-8", true);
if (httpURLConnection2 != null) {
httpURLConnection2.disconnect();
i = responseCode;
str = a3;
} else {
i = responseCode;
str = a3;
}
} catch (IOException e) {
i2 = i3;
httpURLConnection = httpURLConnection2;
e = e;
try {
if (com.qihoo.appstore.h.a.a) {
e.printStackTrace();
}
a2 = this.c.a(e);
String jSONObject = a2.toString();
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
i4++;
i3 = i2;
str2 = jSONObject;
} catch (Throwable th) {
th = th;
if (httpURLConnection != null) {
httpURLConnection.disconnect();
}
throw th;
}
} catch (Throwable th2) {
httpURLConnection = httpURLConnection2;
th = th2;
if (httpURLConnection != null) {
}
throw th;
}
} catch (IOException e2) {
e = e2;
i2 = i3;
httpURLConnection = null;
} catch (Throwable th3) {
th = th3;
httpURLConnection = null;
}
i4++;
i3 = i2;
str2 = jSONObject;
}
if (TextUtils.isEmpty(str)) {
a = null;
} else {
try {
JSONObject jSONObject2 = new JSONObject(str);
jSONObject2.put("isExistPhone", boolArr[0]);
a = jSONObject2;
} catch (JSONException e3) {
if (com.qihoo.appstore.h.a.a) {
e3.printStackTrace();
}
a = this.c.a(e3);
}
}
if (200 == i) {
this.b.a(0, "OK", a);
} else {
this.b.a(i, a.toString(), new JSONObject());
}
return null;
}
}