和通讯录 v3.9.6版本的 MD5 值为:669178e2ee1b2311daf378bd20c6bbe1
以下内容为反编译后的 GainVirtualNumberController.java 源代码,内容仅作参考
package com.chinamobile.contacts.im.mobilecard.controller;
import android.text.TextUtils;
import android.util.Log;
import com.chinamobile.contacts.im.App;
import com.chinamobile.contacts.im.config.LoginInfoSP;
import com.chinamobile.contacts.im.config.m;
import com.chinamobile.contacts.im.mobilecard.HttpsClientManager;
import com.chinamobile.contacts.im.mobilecard.OneCardLoginController;
import com.chinamobile.contacts.im.mobilecard.OtherNumBean;
import com.chinamobile.contacts.im.mobilecard.SignatureUtil;
import com.chinamobile.contacts.im.utils.ApplicationUtils;
import com.chinamobile.contacts.im.utils.aq;
import com.huawei.mcs.auth.data.AASConstants;
import com.huawei.mcs.cloud.msg.base.mms.Telephony;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class GainVirtualNumberController {
public static List<OtherNumBean> getVirtualNumber() {
try {
ArrayList arrayList = new ArrayList();
HashMap hashMap = new HashMap();
String randomString = OneCardLoginController.getRandomString(12);
HashMap hashMap2 = new HashMap();
hashMap2.put("app_key", OneCardLoginController.APP_KEY);
hashMap2.put("access_token", LoginInfoSP.getAccessToken(App.b()));
hashMap2.put("once", randomString);
hashMap2.put("version", OneCardLoginController.API_VERSION);
hashMap2.put("sdk_from", "java");
hashMap2.put(AASConstants.CLIENT_VERSION_MAP, ApplicationUtils.getVersionName(App.b()));
hashMap2.put("authcode", LoginInfoSP.getAuthcode(App.b()));
hashMap2.put("locationid", "0");
hashMap2.put("client_version", ApplicationUtils.getVersionName(App.b()));
hashMap2.put("device_id", ApplicationUtils.getUUID(App.b()));
hashMap2.put("clientType", "4");
String nornmalSignature = SignatureUtil.getNornmalSignature(hashMap2);
hashMap.put("app_key", OneCardLoginController.APP_KEY);
hashMap.put("access_token", LoginInfoSP.getAccessToken(App.b()));
hashMap.put("once", randomString);
hashMap.put("version", OneCardLoginController.API_VERSION);
hashMap.put("sdk_from", "java");
hashMap.put(AASConstants.CLIENT_VERSION_MAP, ApplicationUtils.getVersionName(App.b()));
hashMap.put("authcode", LoginInfoSP.getAuthcode(App.b()));
hashMap.put("locationid", "0");
hashMap.put("signature", nornmalSignature);
hashMap.put("client_version", ApplicationUtils.getVersionName(App.b()));
hashMap.put("device_id", ApplicationUtils.getUUID(App.b()));
hashMap.put("clientType", "4");
String doHttpsPost = HttpsClientManager.doHttpsPost("https://api.cytxl.com.cn/mobilecard/subPhonePool.json", hashMap);
if (!TextUtils.isEmpty(doHttpsPost)) {
aq.a("GainVirtualNumberController", "---" + doHttpsPost);
JSONObject jSONObject = new JSONObject(doHttpsPost);
int optInt = jSONObject.optInt(Telephony.TextBasedSmsColumns.ERROR_CODE, -1);
if (optInt == 0) {
String optString = jSONObject.optString("Locationname", "");
JSONArray jSONArray = jSONObject.getJSONArray("poollist");
if (jSONArray != null) {
for (int i = 0; i < jSONArray.length(); i++) {
OtherNumBean otherNumBean = new OtherNumBean();
otherNumBean.number = jSONArray.getString(i);
otherNumBean.address = optString;
arrayList.add(otherNumBean);
}
}
Log.e("GainVirtualNumberController", ",副号码归属地名称:" + optString);
return arrayList;
}
String optString2 = jSONObject.optString("error_msg", "");
new AccessTokenController(App.b()).ProblemToGetAccessToken(optInt);
if (!TextUtils.isEmpty(optString2)) {
Log.e("GainVirtualNumberController", optString2);
m.m(App.b(), optString2);
return arrayList;
}
return arrayList;
}
return arrayList;
} catch (JSONException e) {
e.printStackTrace();
return null;
} catch (Exception e2) {
e2.printStackTrace();
return null;
}
}
}