导航菜单

页面标题

页面副标题

95爱播免登录版 v3.1.9 - WXEntryActivity.java 源代码

正在查看: 95爱播免登录版 v3.1.9 应用的 WXEntryActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.mifeng.ui.wxapi;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import com.r.n.e;
import com.r.n.g;
import com.showself.ui.h.a.a;
import com.showself.ui.h.b.b;
import com.showself.ui.h.b.d;
import com.showself.ui.h.c.f;
import com.showself.utils.Utils;
import com.showself.utils.p;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.modelmsg.SendAuth;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;

public class WXEntryActivity extends Activity implements IWXAPIEventHandler {
    private IWXAPI a;

    private void a(BaseResp baseResp) {
        f l = f.l(this);
        b m = l.m();
        d n = l.n();
        int i2 = baseResp.errCode;
        if (i2 == -2) {
            if (baseResp.getType() != 1 || m == null) {
                if (baseResp.getType() != 2 || n == null) {
                    return;
                }
                n.onCancel();
                return;
            }
            if (TextUtils.isEmpty(f.l(this).j())) {
                g j2 = g.j();
                com.r.n.d c = com.r.n.d.c();
                c.e("Login");
                c.f("LoginPage");
                c.d("LoginButton");
                c.h(e.Cancel);
                c.a("type", "WeChat");
                j2.u(c.b());
            } else {
                g j3 = g.j();
                com.r.n.d c2 = com.r.n.d.c();
                c2.e("Login");
                c2.f("LoginPage");
                c2.d("LoginButton");
                c2.h(e.Cancel);
                c2.a("type", "WeChat");
                c2.a("LoginType", f.l(this).j());
                j3.u(c2.b());
            }
            m.onCancel();
            return;
        }
        if (i2 != 0) {
            if (baseResp.getType() != 1 || m == null) {
                if (baseResp.getType() != 2 || n == null) {
                    return;
                }
                n.onError();
                return;
            }
            if (TextUtils.isEmpty(f.l(this).j())) {
                g j4 = g.j();
                com.r.n.d c3 = com.r.n.d.c();
                c3.e("Login");
                c3.f("LoginPage");
                c3.d("LoginButton");
                c3.h(e.Failed);
                c3.a("type", "WeChat");
                j4.u(c3.b());
            } else {
                g j5 = g.j();
                com.r.n.d c4 = com.r.n.d.c();
                c4.e("Login");
                c4.f("LoginPage");
                c4.d("LoginButton");
                c4.h(e.Failed);
                c4.a("type", "WeChat");
                c4.a("LoginType", f.l(this).j());
                j5.u(c4.b());
            }
            m.onError("授权失败");
            return;
        }
        if (baseResp.getType() != 1) {
            if (baseResp.getType() != 2 || n == null) {
                return;
            }
            n.onSuccess();
            return;
        }
        String str = ((SendAuth.Resp) baseResp).code;
        a aVar = new a();
        aVar.h(5);
        aVar.l(str);
        if (m != null) {
            if (TextUtils.isEmpty(f.l(this).j())) {
                g j6 = g.j();
                com.r.n.d c5 = com.r.n.d.c();
                c5.e("Login");
                c5.f("LoginPage");
                c5.d("LoginButton");
                c5.h(e.Success);
                c5.a("type", "WeChat");
                j6.u(c5.b());
            } else {
                g j7 = g.j();
                com.r.n.d c6 = com.r.n.d.c();
                c6.e("Login");
                c6.f("LoginPage");
                c6.d("LoginButton");
                c6.h(e.Success);
                c6.a("type", "WeChat");
                c6.a("LoginType", f.l(this).j());
                j7.u(c6.b());
            }
            m.a(aVar);
        }
    }

    @Override
    public void finish() {
        Utils.n(this);
        super.finish();
    }

    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        p.a("wxentryactivity", "onCreate");
        if (getIntent() == null) {
            finish();
            return;
        }
        Utils.U0(this);
        IWXAPI createWXAPI = WXAPIFactory.createWXAPI(this, "wx9914ffed42c83e61");
        this.a = createWXAPI;
        createWXAPI.handleIntent(getIntent(), this);
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);
        setIntent(intent);
        this.a.handleIntent(intent, this);
    }

    @Override
    public void onReq(BaseReq baseReq) {
    }

    @Override
    public void onResp(BaseResp baseResp) {
        a(baseResp);
        finish();
    }
}