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

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


package com.excelliance.kxqp.gs.ui.gameaccount;

import android.content.Context;
import android.os.Handler;
import android.os.HandlerThread;
import android.util.Log;
import com.excelliance.kxqp.gs.bean.RiotAccountBean;
import com.excelliance.kxqp.gs.discover.model.ResponseData;
import com.excelliance.kxqp.gs.thpool.tp;
import com.excelliance.kxqp.gs.ui.gameaccount.a;
import com.excelliance.kxqp.gs.util.as;
import com.excelliance.kxqp.gs.util.ay;
import com.excelliance.kxqp.gs.util.az;
import com.excelliance.kxqp.gs.util.bf;
import com.excelliance.kxqp.gs.util.cn;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

public class c implements a.InterfaceC0388a {

    private a.b f9451a;

    private Handler f9452b;
    private Context c;

    public c(Context context, a.b bVar) {
        this.c = context;
        this.f9451a = bVar;
        HandlerThread handlerThread = new HandlerThread("RankingPresenter", 10);
        handlerThread.start();
        this.f9452b = new Handler(handlerThread.getLooper());
    }

    @Override
    public void initData() {
        if (this.f9451a == null || !bf.e(this.c)) {
            return;
        }
        this.f9451a.a();
        this.f9452b.post(new Runnable() {
            @Override
            public void run() {
                String h = as.h(c.this.c);
                Log.d("GameAccountPresenter", "run googleAccount: " + h);
                final com.excelliance.kxqp.gs.ui.gaccount.c a2 = ay.a(c.this.c, h);
                az.d("GameAccountPresenter", "run: wrapper " + a2);
                final RiotAccountBean i = as.i(c.this.c);
                if (c.this.f9451a != null) {
                    tp.i(new Runnable() {
                        @Override
                        public void run() {
                            if (c.this.f9451a != null) {
                                c.this.f9451a.a(a2, i);
                            }
                        }
                    });
                }
            }
        });
    }

    public void a() {
        this.f9452b.post(new Runnable() {
            @Override
            public void run() {
                final ResponseData a2 = new com.excelliance.kxqp.gs.discover.bbs.c(c.this.c).a(cn.i(c.this.c).toString(), "https://api.ourplay.com.cn/coupon/bind-prepay-riot", new com.excelliance.kxqp.gs.discover.a.c<Object>() {
                    @Override
                    public ResponseData<Object> a(String str) {
                        try {
                            return (ResponseData) new Gson().a(str, new TypeToken<ResponseData<Object>>() {
                            }.getType());
                        } catch (Exception e) {
                            az.e("GameAccountPresenter", "bindAccount/ex:" + e);
                            return null;
                        }
                    }
                });
                if (c.this.f9451a != null) {
                    tp.i(new Runnable() {
                        @Override
                        public void run() {
                            if (c.this.f9451a != null) {
                                c.this.f9451a.a(a2 != null && a2.code == 0);
                            }
                        }
                    });
                }
            }
        });
    }

    public void b() {
        this.f9452b.getLooper().quit();
        this.f9451a = null;
        this.c = null;
    }
}