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

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


package com.excelliance.user.account.e.c;

import a.ab;
import a.q;
import android.content.Context;
import android.text.TextUtils;
import android.util.Log;
import androidx.work.WorkRequest;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.util.ag;
import com.excelliance.user.account.R;
import com.excelliance.user.account.b;
import com.excelliance.user.account.data.PhoneCard;
import com.excelliance.user.account.data.ResponseData;
import com.excelliance.user.account.f.e;
import com.google.gson.Gson;
import com.zero.support.core.api.q;
import com.zero.support.core.task.Response;
import java.util.concurrent.atomic.AtomicInteger;
import org.json.JSONException;
import org.json.JSONObject;
import retrofit2.m;

public class d implements b.h {

    public volatile boolean f15492a = false;

    public volatile boolean f15493b = false;
    public AtomicInteger c = new AtomicInteger(0);
    private Context d;
    private b.q e;

    @Override
    public void a() {
    }

    public d(Context context, b.q qVar) {
        this.d = context;
        this.e = qVar;
    }

    public void a(final ab abVar) {
        tp.f(new Runnable() {
            @Override
            public void run() {
                Response<String> a2 = ((com.excelliance.user.account.a.a) com.zero.support.core.api.a.a(com.excelliance.user.account.a.a.class)).a(abVar).c().a();
                e.b("PresenterInputAccount", "tryLogin/rawResponse:" + a2.d());
                final String d = a2.d();
                tp.i(new Runnable() {
                    @Override
                    public void run() {
                        if (TextUtils.isEmpty(d)) {
                            d.this.e.e();
                            return;
                        }
                        try {
                            String a3 = com.excelliance.kxqp.gs.util.c.a(d, "fuck_snsslmm_bslznw", "utf-8");
                            Log.d("PresenterInputAccount", "tryLogin/decrypt:" + a3);
                            JSONObject optJSONObject = new JSONObject(a3).optJSONObject("uinfo");
                            int optInt = optJSONObject.optInt("flag");
                            int optInt2 = optJSONObject.optInt("isset_pwd");
                            switch (optInt) {
                                case 1:
                                    d.this.e.e();
                                    break;
                                case 2:
                                    d.this.e.a();
                                    break;
                                case 3:
                                    if (optInt2 == 0) {
                                        d.this.e.b();
                                        break;
                                    } else {
                                        d.this.e.c();
                                        break;
                                    }
                                case 4:
                                    d.this.e.d();
                                    break;
                                default:
                                    d.this.e.e();
                                    break;
                            }
                        } catch (Exception e) {
                            e.printStackTrace();
                            d.this.e.e();
                        }
                    }
                });
            }
        });
    }

    public void a(final String str) {
        tp.f(new Runnable() {
            @Override
            public void run() {
                final Response<q> a2 = ((com.excelliance.user.account.a.a) com.zero.support.core.api.a.a(com.excelliance.user.account.a.a.class)).a(str).c().a();
                tp.i(new Runnable() {
                    @Override
                    public void run() {
                        String a3 = a2.c() ? ((q) a2.d()).a() : null;
                        if (TextUtils.isEmpty(a3)) {
                            d.this.e.e();
                            return;
                        }
                        try {
                            Log.d("PresenterInputAccount", "tryWxLogin: rawResponse = " + a3);
                            JSONObject jSONObject = new JSONObject(a3);
                            int optInt = jSONObject.optInt("code");
                            JSONObject optJSONObject = jSONObject.optJSONObject("data");
                            switch (optInt) {
                                case 0:
                                case 2:
                                case 3:
                                case 4:
                                    Log.d("PresenterInputAccount", "tryWxLogin:微信登陆失败  code = " + optInt);
                                    break;
                                case 1:
                                    d.this.e.a(optJSONObject.toString());
                                    return;
                                case 5:
                                    String optString = optJSONObject.optString("open_id");
                                    String optString2 = optJSONObject.optString("wx_nickname");
                                    if (!TextUtils.isEmpty(optString)) {
                                        d.this.e.a(optString, optString2);
                                        return;
                                    }
                                    Log.d("PresenterInputAccount", "tryWxLogin:微信登陆失败  open_id = " + optString);
                                    d.this.e.e();
                                    return;
                            }
                            d.this.e.e();
                        } catch (Exception e) {
                            e.printStackTrace();
                            d.this.e.e();
                        }
                    }
                });
            }
        });
    }

    public void b(final String str) {
        this.f15492a = false;
        this.f15493b = false;
        this.c.set(0);
        tp.f(new Runnable() {
            @Override
            public void run() {
                m<ResponseData<PhoneCard>> mVar;
                long currentTimeMillis = System.currentTimeMillis();
                e.b("PresenterInputAccount", "tryLogin/currentTimeSecret:" + com.excelliance.kxqp.gs.util.c.a(currentTimeMillis + "") + " currentTime:" + currentTimeMillis);
                a.q a2 = new q.a().a("phoneNum", str).a();
                ResponseData<PhoneCard> responseData = new ResponseData<>();
                m<ResponseData<PhoneCard>> mVar2 = null;
                try {
                    mVar = com.excelliance.user.account.d.a.a().a(d.this.d, WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS, WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS, "https://api.ourplay.com.cn/").c(a2).a();
                    try {
                        if (mVar.c()) {
                            responseData = mVar.d();
                        } else {
                            responseData.msg = mVar.b();
                        }
                    } catch (Exception e) {
                        mVar2 = mVar;
                        e = e;
                        e.printStackTrace();
                        Log.e("PresenterInputAccount", "UpdateManager/getWePlayData:" + e.toString());
                        responseData.msg = e.toString();
                        mVar = mVar2;
                        if (mVar != null) {
                        }
                    }
                } catch (Exception e2) {
                    e = e2;
                }
                if (mVar != null) {
                    d.this.a(101, d.this.d.getString(R.string.account_server_exception));
                    return;
                }
                if (responseData.data == null) {
                    d.this.a(101, d.this.d.getString(R.string.account_server_exception));
                    return;
                }
                String str2 = responseData.data.taskId;
                Log.d("PresenterInputAccount", "checkSuperSimLogin  " + responseData.toString());
                if (responseData.code == 1) {
                    d.this.b(str2, str);
                } else {
                    d.this.e.c(str);
                }
            }
        });
    }

    public void b(String str, String str2) {
        final String str3;
        long currentTimeMillis = System.currentTimeMillis();
        e.b("PresenterInputAccount", "startSimLogin/currentTimeSecret:" + com.excelliance.kxqp.gs.util.c.a(currentTimeMillis + "") + " currentTime:" + currentTimeMillis);
        Response<String> a2 = ((com.excelliance.user.account.a.a) com.zero.support.core.api.a.a(com.excelliance.user.account.a.a.class)).b(new q.a().a("phoneNum", str2).a("taskId", str).a("sign", ag.a("zmxxkj_" + str + "_" + str2 + "_simlogin", "UTF-8")).a()).c().a();
        StringBuilder sb = new StringBuilder();
        sb.append("startSimLogin/response:");
        sb.append(new Gson().a((Object) null));
        e.b("PresenterInputAccount", sb.toString());
        if (1 == a2.f()) {
            try {
                str3 = new JSONObject(com.excelliance.kxqp.gs.util.c.a(a2.d(), "fuck_snsslmm_bslznw", "utf-8")).optJSONObject("uinfo").toString();
            } catch (JSONException e) {
                e.printStackTrace();
                str3 = "";
            }
            tp.i(new Runnable() {
                @Override
                public void run() {
                    d.this.e.b(str3);
                }
            });
            return;
        }
        if (1111 == a2.f()) {
            if (!this.f15493b) {
                this.f15493b = true;
                tp.f(b());
            }
            if (!this.f15492a) {
                a(str, str2);
                return;
            } else {
                if (this.c.incrementAndGet() == 1) {
                    this.e.c(str2);
                    a(101, "超时");
                    return;
                }
                return;
            }
        }
        if (a2.h() != null) {
            a(101, this.d.getString(R.string.account_server_exception));
        } else {
            this.e.c(str2);
        }
    }

    public void a(final int i, final String str) {
        tp.i(new Runnable() {
            @Override
            public void run() {
                d.this.e.a(i, str);
            }
        });
    }

    public void a(String str, String str2) {
        try {
            Thread.sleep(500L);
            b(str, str2);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    public Runnable b() {
        return new Runnable() {
            @Override
            public void run() {
                try {
                    Thread.sleep(WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS);
                    d.this.f15492a = true;
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        };
    }
}