花瓣 v4.6.12版本的 MD5 值为:6a3515d4d16d98931f1b3d25a91b257e
以下内容为反编译后的 LoginActivity.java 源代码,内容仅作参考
package com.huaban.android.modules.account.login;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.SpannableStringBuilder;
import android.text.TextWatcher;
import android.text.method.LinkMovementMethod;
import android.text.style.ForegroundColorSpan;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.afollestad.materialdialogs.f;
import com.flipboard.bottomsheet.BottomSheetLayout;
import com.flipboard.bottomsheet.commons.MenuSheetView;
import com.google.android.exoplayer2.u4.u0.h0;
import com.huaban.android.R;
import com.huaban.android.base.BaseActivity;
import com.huaban.android.common.Models.HBUser;
import com.huaban.android.g.b0;
import com.huaban.android.g.z;
import com.huaban.android.modules.settings.PolicyActivity;
import com.huaban.android.modules.settings.UserAgreementActivity;
import com.sigmob.sdk.base.mta.PointCategory;
import com.umeng.analytics.MobclickAgent;
import com.umeng.socialize.UMAuthListener;
import com.umeng.socialize.UMShareAPI;
import com.umeng.socialize.bean.SHARE_MEDIA;
import java.util.HashMap;
import java.util.Map;
import kotlin.f0;
import kotlin.x2.w.k0;
import kotlin.x2.w.w;
import org.greenrobot.eventbus.ThreadMode;
import org.jetbrains.anko.s0;
@f0(bv = {1, 0, 3}, d1 = {"\u0000P\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\n\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\t\u0018\u0000 >2\u00020\u0001:\u0001>B\u0007¢\u0006\u0004\b=\u0010\u0004J\u000f\u0010\u0003\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u0003\u0010\u0004J\u000f\u0010\u0005\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u0005\u0010\u0004J\u000f\u0010\u0006\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u0006\u0010\u0004J\u000f\u0010\u0007\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u0007\u0010\u0004J\u000f\u0010\b\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\b\u0010\u0004J\u000f\u0010\t\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\t\u0010\u0004J\u000f\u0010\n\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\n\u0010\u0004J\u000f\u0010\u000b\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u000b\u0010\u0004J\u000f\u0010\f\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\f\u0010\u0004J\u0017\u0010\u000f\u001a\u00020\u00022\u0006\u0010\u000e\u001a\u00020\rH\u0002¢\u0006\u0004\b\u000f\u0010\u0010J\u000f\u0010\u0011\u001a\u00020\u0002H\u0016¢\u0006\u0004\b\u0011\u0010\u0004J\u000f\u0010\u0012\u001a\u00020\u0002H\u0002¢\u0006\u0004\b\u0012\u0010\u0004J\r\u0010\u0013\u001a\u00020\u0002¢\u0006\u0004\b\u0013\u0010\u0004J\r\u0010\u0014\u001a\u00020\u0002¢\u0006\u0004\b\u0014\u0010\u0004J\r\u0010\u0015\u001a\u00020\u0002¢\u0006\u0004\b\u0015\u0010\u0004J\u001f\u0010\u0019\u001a\u00020\u00022\u0006\u0010\u0017\u001a\u00020\u00162\u0006\u0010\u0018\u001a\u00020\u0016H\u0002¢\u0006\u0004\b\u0019\u0010\u001aJ)\u0010 \u001a\u00020\u00022\u0006\u0010\u001c\u001a\u00020\u001b2\u0006\u0010\u001d\u001a\u00020\u001b2\b\u0010\u001f\u001a\u0004\u0018\u00010\u001eH\u0014¢\u0006\u0004\b \u0010!J\u0019\u0010$\u001a\u00020\u00022\b\u0010#\u001a\u0004\u0018\u00010\"H\u0014¢\u0006\u0004\b$\u0010%J\u000f\u0010&\u001a\u00020\u0002H\u0014¢\u0006\u0004\b&\u0010\u0004J\u0017\u0010)\u001a\u00020\u00022\u0006\u0010(\u001a\u00020'H\u0007¢\u0006\u0004\b)\u0010*J\u000f\u0010+\u001a\u00020\u0002H\u0014¢\u0006\u0004\b+\u0010\u0004J\u0017\u0010-\u001a\u00020\u00022\u0006\u0010,\u001a\u00020\"H\u0014¢\u0006\u0004\b-\u0010%J\u000f\u0010.\u001a\u00020\u0002H\u0002¢\u0006\u0004\b.\u0010\u0004R\"\u00100\u001a\u00020/8\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b0\u00101\u001a\u0004\b2\u00103\"\u0004\b4\u00105R$\u00107\u001a\u0004\u0018\u0001068\u0006@\u0006X\u0086\u000e¢\u0006\u0012\n\u0004\b7\u00108\u001a\u0004\b9\u0010:\"\u0004\b;\u0010<¨\u0006?"}, d2 = {"Lcom/huaban/android/modules/account/login/LoginActivity;", "Lcom/huaban/android/base/BaseActivity;", "", "bindClearAccountIV", "()V", "bindEvents", "bindForgetPasswordBtn", "bindLoginAccountET", "bindLoginPwdET", "bindRegisterBtn", "bindSeePwdIV", "bindSocialBtn", "bindSubmitBtn", "Lcom/umeng/socialize/bean/SHARE_MEDIA;", "media", "doLogin", "(Lcom/umeng/socialize/bean/SHARE_MEDIA;)V", PointCategory.FINISH, "initStatement", "loginCanceledCallback", "loginFailedCallback", "loginSucceedCallback", "", "account", "pwd", "loginWithAccountAndPwd", "(Ljava/lang/String;Ljava/lang/String;)V", "", "requestCode", "resultCode", "Landroid/content/Intent;", "data", "onActivityResult", "(IILandroid/content/Intent;)V", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "(Landroid/os/Bundle;)V", "onDestroy", "Lcom/huaban/android/common/Services/LoginEvent;", "loginEvent", "onLoggedIn", "(Lcom/huaban/android/common/Services/LoginEvent;)V", "onPause", "outState", "onSaveInstanceState", "showMoreOptions", "", "mDisplayFlg", "Z", "getMDisplayFlg", "()Z", "setMDisplayFlg", "(Z)V", "Lrx/Subscription;", "mLoginSubscription", "Lrx/Subscription;", "getMLoginSubscription", "()Lrx/Subscription;", "setMLoginSubscription", "(Lrx/Subscription;)V", "<init>", "Companion", "container.HuabanApp_release"}, k = 1, mv = {1, 1, 15}, pn = "", xi = 0, xs = "")
public final class LoginActivity extends BaseActivity {
@h.c.a.d
public static final a f8921f = new a(null);
private boolean c;
@h.c.a.e
private i.o f8922d;
private HashMap f8923e;
public static final class a {
private a() {
}
public final void a(@h.c.a.e Context context) {
Intent intent = new Intent(context, LoginActivity.class);
if (context instanceof BaseActivity) {
((BaseActivity) context).T(intent);
} else if (context instanceof Activity) {
context.startActivity(intent);
((Activity) context).overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
} else {
intent.addFlags(268435456);
if (context != null) {
context.startActivity(intent);
}
}
}
public a(w wVar) {
this();
}
}
public static final class b implements View.OnClickListener {
b() {
}
@Override
public final void onClick(View view) {
((EditText) LoginActivity.this.N(R.id.mLoginAccountET)).setText("");
}
}
public static final class c implements View.OnClickListener {
c() {
}
@Override
public final void onClick(View view) {
MobclickAgent.onEvent(LoginActivity.this, com.huaban.android.vendors.p.L0.R());
ForgetPasswordActivity.f8918f.a(LoginActivity.this);
}
}
public static final class d implements TextWatcher {
d() {
}
@Override
public void afterTextChanged(@h.c.a.e Editable editable) {
}
@Override
public void beforeTextChanged(@h.c.a.e CharSequence charSequence, int i2, int i3, int i4) {
}
@Override
public void onTextChanged(@h.c.a.e CharSequence charSequence, int i2, int i3, int i4) {
ImageView imageView = (ImageView) LoginActivity.this.N(R.id.mClearIV);
k0.o(imageView, "mClearIV");
EditText editText = (EditText) LoginActivity.this.N(R.id.mLoginAccountET);
k0.o(editText, "mLoginAccountET");
Editable text = editText.getText();
k0.o(text, "mLoginAccountET.text");
imageView.setVisibility(text.length() > 0 ? 0 : 4);
}
}
public static final class e implements TextWatcher {
e() {
}
@Override
public void afterTextChanged(@h.c.a.e Editable editable) {
}
@Override
public void beforeTextChanged(@h.c.a.e CharSequence charSequence, int i2, int i3, int i4) {
}
@Override
public void onTextChanged(@h.c.a.e CharSequence charSequence, int i2, int i3, int i4) {
ImageView imageView = (ImageView) LoginActivity.this.N(R.id.mSeeIV);
k0.o(imageView, "mSeeIV");
EditText editText = (EditText) LoginActivity.this.N(R.id.mLoginPwdET);
k0.o(editText, "mLoginPwdET");
Editable text = editText.getText();
k0.o(text, "mLoginPwdET.text");
imageView.setVisibility(text.length() > 0 ? 0 : 4);
}
}
public static final class f implements View.OnClickListener {
f() {
}
@Override
public final void onClick(View view) {
MobclickAgent.onEvent(LoginActivity.this, com.huaban.android.vendors.p.L0.U());
RegisterActivity.f8924g.a(LoginActivity.this);
}
}
public static final class g implements View.OnClickListener {
g() {
}
@Override
public final void onClick(View view) {
if (!LoginActivity.this.j0()) {
EditText editText = (EditText) LoginActivity.this.N(R.id.mLoginPwdET);
k0.o(editText, "mLoginPwdET");
editText.setInputType(144);
ImageView imageView = (ImageView) LoginActivity.this.N(R.id.mSeeIV);
k0.o(imageView, "mSeeIV");
s0.V(imageView, R.drawable.ic_password_see_on);
} else {
EditText editText2 = (EditText) LoginActivity.this.N(R.id.mLoginPwdET);
k0.o(editText2, "mLoginPwdET");
editText2.setInputType(h0.G);
ImageView imageView2 = (ImageView) LoginActivity.this.N(R.id.mSeeIV);
k0.o(imageView2, "mSeeIV");
s0.V(imageView2, R.drawable.ic_password_see);
}
LoginActivity loginActivity = LoginActivity.this;
loginActivity.q0(!loginActivity.j0());
EditText editText3 = (EditText) LoginActivity.this.N(R.id.mLoginPwdET);
k0.o(editText3, "mLoginPwdET");
((EditText) LoginActivity.this.N(R.id.mLoginPwdET)).setSelection(editText3.getText().length());
}
}
public static final class h implements View.OnClickListener {
h() {
}
@Override
public final void onClick(View view) {
ImageView imageView = (ImageView) LoginActivity.this.N(R.id.iv_agree);
k0.o(imageView, "iv_agree");
if (!imageView.isSelected()) {
LoginActivity loginActivity = LoginActivity.this;
String string = loginActivity.getString(R.string.login_uncheck_protocol);
k0.o(string, "getString(R.string.login_uncheck_protocol)");
b0.b(loginActivity, string);
return;
}
MobclickAgent.onEvent(LoginActivity.this, com.huaban.android.vendors.p.L0.X());
LoginActivity.this.i0(SHARE_MEDIA.SINA);
}
}
public static final class i implements View.OnClickListener {
i() {
}
@Override
public final void onClick(View view) {
ImageView imageView = (ImageView) LoginActivity.this.N(R.id.iv_agree);
k0.o(imageView, "iv_agree");
if (!imageView.isSelected()) {
LoginActivity loginActivity = LoginActivity.this;
String string = loginActivity.getString(R.string.login_uncheck_protocol);
k0.o(string, "getString(R.string.login_uncheck_protocol)");
b0.b(loginActivity, string);
return;
}
MobclickAgent.onEvent(LoginActivity.this, com.huaban.android.vendors.p.L0.T());
LoginActivity.this.i0(SHARE_MEDIA.QQ);
}
}
public static final class j implements View.OnClickListener {
j() {
}
@Override
public final void onClick(View view) {
MobclickAgent.onEvent(LoginActivity.this, com.huaban.android.vendors.p.L0.S());
LoginActivity.this.s0();
}
}
public static final class k implements View.OnClickListener {
k() {
}
@Override
public final void onClick(View view) {
ImageView imageView = (ImageView) LoginActivity.this.N(R.id.iv_agree);
k0.o(imageView, "iv_agree");
if (!imageView.isSelected()) {
LoginActivity loginActivity = LoginActivity.this;
String string = loginActivity.getString(R.string.login_uncheck_protocol);
k0.o(string, "getString(R.string.login_uncheck_protocol)");
b0.b(loginActivity, string);
return;
}
MobclickAgent.onEvent(LoginActivity.this, com.huaban.android.vendors.p.L0.W());
LoginActivity.this.i0(SHARE_MEDIA.WEIXIN);
}
}
public static final class l implements View.OnClickListener {
l() {
}
@Override
public final void onClick(View view) {
ImageView imageView = (ImageView) LoginActivity.this.N(R.id.iv_agree);
k0.o(imageView, "iv_agree");
if (!imageView.isSelected()) {
LoginActivity loginActivity = LoginActivity.this;
String string = loginActivity.getString(R.string.login_uncheck_protocol);
k0.o(string, "getString(R.string.login_uncheck_protocol)");
b0.b(loginActivity, string);
return;
}
EditText editText = (EditText) LoginActivity.this.N(R.id.mLoginAccountET);
EditText editText2 = (EditText) LoginActivity.this.N(R.id.mLoginPwdET);
k0.o(editText, "usernameField");
Editable text = editText.getText();
k0.o(text, "usernameField.text");
if (text.length() == 0) {
b0.b(LoginActivity.this, "请输入账号");
return;
}
k0.o(editText2, "passwordField");
Editable text2 = editText2.getText();
k0.o(text2, "passwordField.text");
if (text2.length() == 0) {
b0.b(LoginActivity.this, "请输入密码");
return;
}
Editable text3 = editText.getText();
k0.o(text3, "usernameField.text");
if (text3.length() == 0) {
return;
}
Editable text4 = editText2.getText();
k0.o(text4, "passwordField.text");
if (text4.length() == 0) {
return;
}
MobclickAgent.onEvent(LoginActivity.this, com.huaban.android.vendors.p.L0.Y());
LoginActivity.this.p0(editText.getText().toString(), editText2.getText().toString());
}
}
public static final class m implements UMAuthListener {
public static final class a extends i.n<HBUser> {
final com.afollestad.materialdialogs.f b;
a(com.afollestad.materialdialogs.f fVar) {
this.b = fVar;
}
@Override
public void onNext(@h.c.a.e HBUser hBUser) {
if (LoginActivity.this.isFinishing()) {
return;
}
com.afollestad.materialdialogs.f fVar = this.b;
if (fVar != null) {
fVar.dismiss();
}
LoginActivity.this.o0();
}
@Override
public void onCompleted() {
}
@Override
public void onError(@h.c.a.e Throwable th) {
if (LoginActivity.this.isFinishing()) {
return;
}
com.afollestad.materialdialogs.f fVar = this.b;
if (fVar != null) {
fVar.dismiss();
}
LoginActivity.this.n0();
}
}
m() {
}
@Override
public void onCancel(@h.c.a.e SHARE_MEDIA share_media, int i2) {
LoginActivity.this.m0();
}
@Override
public void onComplete(@h.c.a.e SHARE_MEDIA share_media, int i2, @h.c.a.e Map<String, String> map) {
String str;
if (LoginActivity.this.isFinishing()) {
return;
}
if (share_media == null) {
LoginActivity.this.n0();
return;
}
String str2 = map != null ? map.get("expires_in") : null;
if (share_media == SHARE_MEDIA.DOUBAN) {
if (map != null) {
str = map.get("access_key");
}
str = null;
} else {
if (map != null) {
str = map.get("access_token");
}
str = null;
}
String str3 = map != null ? map.get("uid") : null;
if (share_media == SHARE_MEDIA.WEIXIN) {
str3 = map != null ? map.get("openid") : null;
}
boolean z = false;
if (!(str == null || str.length() == 0)) {
if (!((str3 == null || str3.length() == 0) ? true : true)) {
com.huaban.android.c.a.d.p().d(z.b(share_media), str3, str, str2).q5(new a(com.huaban.android.g.a.k(LoginActivity.this)));
return;
}
}
LoginActivity.this.n0();
}
@Override
public void onError(@h.c.a.e SHARE_MEDIA share_media, int i2, @h.c.a.e Throwable th) {
LoginActivity.this.n0();
}
@Override
public void onStart(@h.c.a.e SHARE_MEDIA share_media) {
}
}
public static final class n extends com.huaban.android.views.d {
n() {
}
@Override
public void onClick(@h.c.a.d View view) {
k0.p(view, "widget");
PolicyActivity.f9108e.a(LoginActivity.this);
}
}
public static final class o extends com.huaban.android.views.d {
o() {
}
@Override
public void onClick(@h.c.a.d View view) {
k0.p(view, "widget");
UserAgreementActivity.f9125e.a(LoginActivity.this);
}
}
public static final class p implements View.OnClickListener {
p() {
}
@Override
public final void onClick(View view) {
ImageView imageView = (ImageView) LoginActivity.this.N(R.id.iv_agree);
k0.o(imageView, "iv_agree");
ImageView imageView2 = (ImageView) LoginActivity.this.N(R.id.iv_agree);
k0.o(imageView2, "iv_agree");
imageView.setSelected(!imageView2.isSelected());
ImageView imageView3 = (ImageView) LoginActivity.this.N(R.id.iv_agree);
k0.o(imageView3, "iv_agree");
if (imageView3.isSelected()) {
RelativeLayout relativeLayout = (RelativeLayout) LoginActivity.this.N(R.id.rl_agree);
k0.o(relativeLayout, "rl_agree");
relativeLayout.setBackground(null);
return;
}
((RelativeLayout) LoginActivity.this.N(R.id.rl_agree)).setBackgroundResource(R.drawable.bg_login_agree);
}
}
public static final class q extends i.n<HBUser> {
final com.afollestad.materialdialogs.f b;
q(com.afollestad.materialdialogs.f fVar) {
this.b = fVar;
}
@Override
public void onNext(@h.c.a.e HBUser hBUser) {
this.b.dismiss();
b0.a(LoginActivity.this, R.string.login_toast_success);
LoginActivity.this.finish();
}
@Override
public void onCompleted() {
}
@Override
public void onError(@h.c.a.e Throwable th) {
this.b.dismiss();
}
}
public static final class r implements MenuSheetView.d {
r() {
}
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
k0.o(menuItem, "item");
int itemId = menuItem.getItemId();
if (itemId == R.id.action_login_douban) {
MobclickAgent.onEvent(LoginActivity.this, com.huaban.android.vendors.p.L0.Q());
LoginActivity.this.i0(SHARE_MEDIA.DOUBAN);
} else if (itemId == R.id.action_login_renren) {
MobclickAgent.onEvent(LoginActivity.this, com.huaban.android.vendors.p.L0.V());
b0.b(LoginActivity.this, "人人用户请到花瓣主站(www.huaban.com)绑定花瓣账号后登录使用");
}
((BottomSheetLayout) LoginActivity.this.N(R.id.mLoginRBottomSheetLayout)).s();
return true;
}
}
private final void Z() {
((ImageView) N(R.id.mClearIV)).setOnClickListener(new b());
}
private final void a0() {
c0();
Z();
d0();
f0();
h0();
b0();
e0();
g0();
}
private final void b0() {
((TextView) N(R.id.mLoginForgetPwdTV)).setOnClickListener(new c());
}
private final void c0() {
((EditText) N(R.id.mLoginAccountET)).addTextChangedListener(new d());
}
private final void d0() {
((EditText) N(R.id.mLoginPwdET)).addTextChangedListener(new e());
}
private final void e0() {
((TextView) N(R.id.mLoginRegisterTV)).setOnClickListener(new f());
}
private final void f0() {
((ImageView) N(R.id.mSeeIV)).setOnClickListener(new g());
}
private final void g0() {
((Button) N(R.id.mLoginSocialWeibo)).setOnClickListener(new h());
((Button) N(R.id.mLoginSocialQQ)).setOnClickListener(new i());
((Button) N(R.id.mLoginSocialMore)).setOnClickListener(new j());
((Button) N(R.id.mLoginSocialWechat)).setOnClickListener(new k());
}
private final void h0() {
((Button) N(R.id.mLoginBtn)).setOnClickListener(new l());
}
public final void i0(SHARE_MEDIA share_media) {
UMShareAPI.get(this).doOauthVerify(this, share_media, new m());
}
private final void l0() {
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
spannableStringBuilder.append((CharSequence) getResources().getString(R.string.login_tip));
spannableStringBuilder.setSpan(new n(), 6, 14, 33);
spannableStringBuilder.setSpan(new o(), 14, 22, 33);
spannableStringBuilder.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.agree_click)), 6, 14, 33);
spannableStringBuilder.setSpan(new ForegroundColorSpan(getResources().getColor(R.color.agree_click)), 14, 22, 33);
TextView textView = (TextView) N(R.id.tv_statement);
k0.o(textView, "tv_statement");
textView.setMovementMethod(LinkMovementMethod.getInstance());
TextView textView2 = (TextView) N(R.id.tv_statement);
k0.o(textView2, "tv_statement");
textView2.setText(spannableStringBuilder);
ImageView imageView = (ImageView) N(R.id.iv_agree);
k0.o(imageView, "iv_agree");
imageView.setSelected(false);
((ImageView) N(R.id.iv_agree)).setOnClickListener(new p());
}
public final void p0(String str, String str2) {
this.f8922d = com.huaban.android.c.a.d.p().f(str, str2).q5(new q(new f.e(this).m1("请稍候").C("正在登录").t(false).b1(true, 0).g1()));
}
public final void s0() {
MenuSheetView menuSheetView = new MenuSheetView(this, MenuSheetView.c.LIST, (CharSequence) null, new r());
menuSheetView.d(R.menu.menu_login_more);
((BottomSheetLayout) N(R.id.mLoginRBottomSheetLayout)).K(menuSheetView);
}
@Override
public void M() {
HashMap hashMap = this.f8923e;
if (hashMap != null) {
hashMap.clear();
}
}
@Override
public View N(int i2) {
if (this.f8923e == null) {
this.f8923e = new HashMap();
}
View view = (View) this.f8923e.get(Integer.valueOf(i2));
if (view == null) {
View findViewById = findViewById(i2);
this.f8923e.put(Integer.valueOf(i2), findViewById);
return findViewById;
}
return view;
}
@Override
public void finish() {
MobclickAgent.onEvent(this, com.huaban.android.vendors.p.L0.P());
Q();
}
public final boolean j0() {
return this.c;
}
@h.c.a.e
public final i.o k0() {
return this.f8922d;
}
public final void m0() {
b0.a(this, R.string.login_toast_cancel);
}
public final void n0() {
b0.a(this, R.string.login_toast_failed);
}
public final void o0() {
b0.a(this, R.string.login_toast_success);
finish();
}
@Override
public void onActivityResult(int i2, int i3, @h.c.a.e Intent intent) {
super.onActivityResult(i2, i3, intent);
UMShareAPI.get(this).onActivityResult(i2, i3, intent);
}
@Override
public void onCreate(@h.c.a.e Bundle bundle) {
super.onCreate(bundle);
if (!org.greenrobot.eventbus.c.f().o(this)) {
org.greenrobot.eventbus.c.f().v(this);
}
MobclickAgent.onEvent(this, com.huaban.android.vendors.p.L0.O());
setContentView(R.layout.activity_login);
LinearLayout linearLayout = (LinearLayout) N(R.id.mRootView);
k0.o(linearLayout, "mRootView");
String string = getString(R.string.login_toolbar_title);
k0.o(string, "getString(R.string.login_toolbar_title)");
com.huaban.android.g.r.a(linearLayout, this, (r15 & 2) != 0 ? "" : string, (r15 & 4) == 0 ? null : "", (r15 & 8) != 0 ? Integer.valueOf(R.drawable.ic_back) : Integer.valueOf(R.drawable.ic_close), (r15 & 16) != 0 ? null : null, (r15 & 32) != 0 ? null : null, (r15 & 64) == 0 ? null : null);
l0();
a0();
}
@Override
protected void onDestroy() {
super.onDestroy();
org.greenrobot.eventbus.c.f().A(this);
UMShareAPI.get(this).release();
}
@org.greenrobot.eventbus.l(threadMode = ThreadMode.MAIN)
public final void onLoggedIn(@h.c.a.d com.huaban.android.c.a.g gVar) {
k0.p(gVar, "loginEvent");
if (gVar.a) {
o0();
}
}
@Override
public void onPause() {
super.onPause();
i.o oVar = this.f8922d;
if (oVar != null) {
oVar.unsubscribe();
}
}
@Override
public void onSaveInstanceState(@h.c.a.d Bundle bundle) {
k0.p(bundle, "outState");
super.onSaveInstanceState(bundle);
UMShareAPI.get(this).onSaveInstanceState(bundle);
}
public final void q0(boolean z) {
this.c = z;
}
public final void r0(@h.c.a.e i.o oVar) {
this.f8922d = oVar;
}
}