和通讯录 v3.9.6版本的 MD5 值为:669178e2ee1b2311daf378bd20c6bbe1
以下内容为反编译后的 CancelOtherNumController.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.mobilecard.HttpsClientManager;
import com.chinamobile.contacts.im.mobilecard.OneCardLoginController;
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.cloud.msg.base.mms.Telephony;
import java.util.HashMap;
import org.json.JSONException;
import org.json.JSONObject;
public class CancelOtherNumController {
public static boolean cancel(String str) {
try {
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("subphone", str);
hashMap2.put("authcode", LoginInfoSP.getAuthcode(App.b()));
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("subphone", str);
hashMap.put("authcode", LoginInfoSP.getAuthcode(App.b()));
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/subPhoneCancle.json", hashMap);
if (TextUtils.isEmpty(doHttpsPost)) {
return false;
}
aq.a("CancelOtherNumController", "---" + doHttpsPost);
JSONObject jSONObject = new JSONObject(doHttpsPost);
int optInt = jSONObject.optInt(Telephony.TextBasedSmsColumns.ERROR_CODE, -1);
if (optInt == 0) {
return true;
}
String optString = jSONObject.optString("error_msg", "");
new AccessTokenController(App.b()).ProblemToGetAccessToken(optInt);
if (TextUtils.isEmpty(optString)) {
return false;
}
Log.e("CancelOtherNumController", optString);
return false;
} catch (JSONException e) {
e.printStackTrace();
return false;
} catch (Exception e2) {
e2.printStackTrace();
return false;
}
}
}