OurPlay v5.5.9版本的 MD5 值为:d4e139798f4c2243a1145c8af5e21046

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


package com.excelliance.kxqp.user;

import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.util.ac;
import com.excelliance.kxqp.util.aj;
import java.util.regex.Pattern;
import org.json.JSONObject;

public class b {

    private static b f14851a;

    public interface a {
        void a(String str);

        void b(String str);
    }

    private b() {
    }

    public static b a() {
        if (f14851a == null) {
            synchronized (b.class) {
                if (f14851a == null) {
                    f14851a = new b();
                }
            }
        }
        return f14851a;
    }

    public void a(String str, int i, a aVar) {
        a(aVar, a(str, i, (Context) null));
    }

    public void a(String str, int i, a aVar, Context context) {
        a(aVar, a(str, i, context));
    }

    private void a(final a aVar, String str) {
        if (TextUtils.isEmpty(str)) {
            az.d("UserAccountUtil", "未获取到参数");
            return;
        }
        az.d("UserAccountUtil", "content = " + str);
        String a2 = com.excelliance.kxqp.util.b.a(str);
        az.d("UserAccountUtil", "content = " + a2);
        ac.a().a("http://folder.appota.cn/sendmsg.php", a2, new ac.a() {
            @Override
            public void a(String str2) {
                aVar.a(str2);
            }

            @Override
            public void b(String str2) {
                Log.d("UserAccountUtil", "onFailed info = " + str2);
                aVar.b(str2);
            }
        });
    }

    private String a(String str, int i, Context context) {
        try {
            JSONObject jSONObject = new JSONObject();
            jSONObject.put("phoneNum", str);
            jSONObject.put("position", i);
            if (i == 3 || i == 2) {
                if (context != null) {
                    boolean b2 = aj.a().b(context);
                    Log.d("UserAccountUtil", "loginStatus = " + b2);
                    if (b2) {
                        String a2 = aj.a().a(context);
                        Log.d("UserAccountUtil", "rid = " + a2);
                        if (!TextUtils.isEmpty(a2) && !TextUtils.equals(a2, "0")) {
                            jSONObject.put("rid", a2);
                        }
                    } else {
                        Log.d("UserAccountUtil", "loginStatus is false");
                    }
                } else {
                    Log.d("UserAccountUtil", "context is null");
                }
            }
            return jSONObject.toString();
        } catch (Exception e) {
            Log.d("UserAccountUtil", "has exception");
            e.printStackTrace();
            return null;
        }
    }

    public boolean a(String str) {
        return Pattern.compile("^[0-9A-Za-z]{6,20}$").matcher(str).matches();
    }

    public boolean b(String str) {
        return c(str);
    }

    public boolean c(String str) {
        return Pattern.compile("^((13[0-9])|(15[^4])|(18[0-9])|(17[0-8])|(147))\\d{8}$").matcher(str).matches();
    }
}