和通讯录 v4.2.0版本的 MD5 值为:f213fa766dccbfebde0dd8add5534518

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


package com.chinamobile.contacts.im.utils;

import android.content.Context;
import android.net.Uri;
import com.chinamobile.contacts.im.data.ContactAccessor;
import com.huawei.mcs.api.McsApi;
import com.iflytek.cloud.SpeechConstant;
import java.net.URLEncoder;
import org.json.JSONException;
import org.json.JSONObject;
import org.simpleframework.xml.strategy.Name;

public class ay {

    public static Context f3753a;

    private static ay f3754b;
    private az c;
    private String d;

    private ay(Context context) {
        f3753a = context;
    }

    public static ay a(Context context) {
        if (f3754b == null) {
            f3754b = new ay(context);
        }
        return f3754b;
    }

    public Uri a(String str, String str2) {
        String string;
        String str3 = null;
        String a2 = ContactAccessor.getEntity(f3753a).c() ? ContactAccessor.getEntity(f3753a).a() : null;
        if (str2 != null) {
            try {
                string = new JSONObject(str2).getString("139mail_token");
            } catch (Exception e) {
                bm.a("Get139InfoUtils", e.toString());
                return null;
            }
        } else {
            string = null;
        }
        if (str != null) {
            String string2 = new JSONObject(str).getString("139mail_id");
            if (string2 == null || string2.equalsIgnoreCase("[]")) {
                return null;
            }
            str3 = URLEncoder.encode("mid=" + string2 + "&imapid=" + string2, "utf-8");
        }
        StringBuilder append = new StringBuilder().append("http://wapmail.10086.cn/wapsso2?Mobile_No=");
        if (a2 == null) {
            a2 = "";
        }
        String sb = append.append(a2).append("&Flag=4").append(str3 == null ? "" : "&Message=" + str3).append(string != null ? "&SSOID=" + string : "").toString();
        bm.b("Get139InfoUtils", sb);
        return Uri.parse(sb);
    }

    public Uri b(String str, String str2) {
        String string;
        String a2 = ContactAccessor.getEntity(f3753a).c() ? ContactAccessor.getEntity(f3753a).a() : null;
        if (str2 != null) {
            try {
                string = new JSONObject(str2).getString("139mail_token");
            } catch (Exception e) {
                bm.a("Get139InfoUtils", e.toString());
                return null;
            }
        } else {
            string = null;
        }
        if (str != null) {
            new JSONObject(str).getString("139mail_id");
        }
        StringBuilder append = new StringBuilder().append("http://wapmail.10086.cn/wapsso2?Mobile_No=");
        if (a2 == null) {
            a2 = "";
        }
        String sb = append.append(a2).append("&Flag=4").append(0 == 0 ? "" : "&Message=" + ((String) null)).append(string != null ? "&SSOID=" + string : "").toString();
        bm.b("Get139InfoUtils", sb);
        return Uri.parse(sb);
    }

    public void a() {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("jsonrpc", McsApi.API_VERSION);
            JSONObject jSONObject2 = new JSONObject();
            jSONObject.put("method", "sso/139mail/token/get");
            jSONObject2.put("session", ContactAccessor.getAuth(f3753a).l());
            jSONObject2.put("client_id", "4");
            jSONObject.put(SpeechConstant.PARAMS, jSONObject2);
            jSONObject.put(Name.MARK, ApplicationUtils.generateString(2));
            this.d = jSONObject.toString();
        } catch (JSONException e) {
            this.d = "";
        }
    }

    public void a(String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("jsonrpc", McsApi.API_VERSION);
            JSONObject jSONObject2 = new JSONObject();
            jSONObject.put("method", "sso/139mail/id/get");
            jSONObject2.put("session", ContactAccessor.getAuth(f3753a).l());
            jSONObject2.put("port_number", str);
            jSONObject2.put("client_id", "4");
            jSONObject.put(SpeechConstant.PARAMS, jSONObject2);
            jSONObject.put(Name.MARK, ApplicationUtils.generateString(2));
            this.d = jSONObject.toString();
        } catch (JSONException e) {
            this.d = "";
        }
    }

    public void a(az azVar) {
        this.c = azVar;
        new ba(this, this.d).executeOnMainExecutor(new Void[0]);
    }
}