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

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


package com.excelliance.kxqp.gs.util;

import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import com.zero.support.core.task.Response;
import java.util.regex.Pattern;
import org.json.JSONObject;

public class ci {

    private static ci f11962a;

    public interface a {
        void a(String str);

        void b(String str);
    }

    private ci() {
    }

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

    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)) {
            Log.d("UserAccountUtil", "未获取到参数");
        } else {
            ((com.zero.support.core.api.v) com.zero.support.core.api.a.a(com.zero.support.core.api.v.class)).a(new com.zero.support.core.api.u("https://sdk.ourplay.com.cn/account/sendmsgnew.php", c.a(str))).a(new com.zero.support.core.observable.d<Response<String>>() {
                @Override
                public void a(final Response<String> response) {
                    com.zero.support.core.a.e().execute(new Runnable() {
                        @Override
                        public void run() {
                            if (response.d() != null) {
                                aVar.a((String) response.d());
                            } else {
                                aVar.b(response.e());
                            }
                        }
                    });
                }
            });
        }
    }

    private String a(String str, int i, Context context) {
        try {
            JSONObject jSONObject = new JSONObject();
            jSONObject.put("phoneNum", str);
            jSONObject.put("position", i);
            jSONObject.put("apiPublicFlag", 29);
            if (i == 3 || i == 2) {
                if (context != null) {
                    boolean b2 = bx.a().b(context);
                    Log.d("UserAccountUtil", "loginStatus = " + b2);
                    if (b2) {
                        String a2 = bx.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 bx.a(str);
    }
}