438 lines
11 KiB
Smali
438 lines
11 KiB
Smali
.class public abstract Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;
|
|
.super Lcom/moji/mvpframe/BasePresenter;
|
|
.source "BaseAccountPresenter.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/moji/mjweather/me/presenter/BaseAccountPresenter$ErrorListener;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<A:",
|
|
"Ljava/lang/Object;",
|
|
"V::",
|
|
"Lcom/moji/mjweather/me/view/IBaseAccountInputView;",
|
|
">",
|
|
"Lcom/moji/mvpframe/BasePresenter<",
|
|
"TA;TV;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private a:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/moji/mjweather/me/view/IBaseAccountInputView;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TV;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 38
|
|
invoke-direct {p0, p1}, Lcom/moji/mvpframe/BasePresenter;-><init>(Lcom/moji/mvpframe/IMJMvpView;)V
|
|
|
|
.line 39
|
|
new-instance p1, Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-direct {p1}, Lcom/moji/preferences/ProcessPrefer;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->a:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Landroid/content/Intent;Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-object v0
|
|
|
|
.line 161
|
|
:cond_0
|
|
invoke-virtual {p1, p2}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return-object v0
|
|
|
|
.line 164
|
|
:cond_1
|
|
invoke-virtual {p1, p2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private b(I)Ljava/lang/String;
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroid/support/annotation/StringRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 112
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->n()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected final a(I)Ljava/lang/String;
|
|
.locals 1
|
|
.param p1 # I
|
|
.annotation build Landroid/support/annotation/StringRes;
|
|
.end annotation
|
|
.end param
|
|
|
|
.line 154
|
|
invoke-virtual {p0}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->n()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/Context;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public a(Landroid/content/Intent;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "mobile"
|
|
|
|
.line 121
|
|
invoke-direct {p0, p1, v0}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->a(Landroid/content/Intent;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method protected a(Lcom/moji/http/ugc/bean/account/LoginResultEntity;)V
|
|
.locals 4
|
|
|
|
.line 44
|
|
invoke-static {}, Lcom/moji/account/data/AccountProvider;->a()Lcom/moji/account/data/AccountProvider;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p1, Lcom/moji/http/ugc/bean/account/LoginResultEntity;->session_id:Ljava/lang/String;
|
|
|
|
iget-object v2, p1, Lcom/moji/http/ugc/bean/account/LoginResultEntity;->sns_id:Ljava/lang/String;
|
|
|
|
iget-object v3, p1, Lcom/moji/http/ugc/bean/account/LoginResultEntity;->access_token:Ljava/lang/String;
|
|
|
|
.line 48
|
|
invoke-virtual {p1}, Lcom/moji/http/ugc/bean/account/LoginResultEntity;->isVip()Z
|
|
|
|
move-result p1
|
|
|
|
.line 44
|
|
invoke-virtual {v0, v1, v2, v3, p1}, Lcom/moji/account/data/AccountProvider;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Ljava/lang/String;)Z
|
|
.locals 2
|
|
|
|
.line 58
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->m()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const p1, 0x7f0e0588
|
|
|
|
.line 59
|
|
invoke-direct {p0, p1}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->b(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lcom/moji/tool/ToastTool;->a(Ljava/lang/String;)V
|
|
|
|
return v1
|
|
|
|
.line 61
|
|
:cond_0
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const p1, 0x7f0e0632
|
|
|
|
.line 62
|
|
invoke-direct {p0, p1}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->b(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lcom/moji/tool/ToastTool;->a(Ljava/lang/String;)V
|
|
|
|
return v1
|
|
|
|
.line 64
|
|
:cond_1
|
|
invoke-static {p1}, Lcom/moji/tool/RegexUtil;->b(Ljava/lang/String;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
const p1, 0x7f0e001c
|
|
|
|
.line 65
|
|
invoke-direct {p0, p1}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->b(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lcom/moji/tool/ToastTool;->a(Ljava/lang/String;)V
|
|
|
|
return v1
|
|
|
|
:cond_2
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public a(Ljava/lang/String;Lcom/moji/mjweather/me/presenter/BaseAccountPresenter$ErrorListener;)Z
|
|
.locals 3
|
|
|
|
const-string v0, "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"
|
|
|
|
.line 95
|
|
invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
|
|
|
|
move-result-object v0
|
|
|
|
.line 97
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 98
|
|
iget-object p1, p0, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->f:Lcom/moji/mvpframe/IMJMvpView;
|
|
|
|
check-cast p1, Lcom/moji/mjweather/me/view/IBaseAccountInputView;
|
|
|
|
const v0, 0x7f0e001d
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->a(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {p1, v1}, Lcom/moji/mjweather/me/view/IBaseAccountInputView;->onErrorShow(Ljava/lang/String;)V
|
|
|
|
.line 99
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->a(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p2, p1}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter$ErrorListener;->a(Ljava/lang/String;)V
|
|
|
|
return v2
|
|
|
|
.line 102
|
|
:cond_0
|
|
invoke-virtual {v0, p1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
|
|
|
|
move-result-object p1
|
|
|
|
.line 103
|
|
invoke-virtual {p1}, Ljava/util/regex/Matcher;->matches()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
.line 104
|
|
iget-object p1, p0, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->f:Lcom/moji/mvpframe/IMJMvpView;
|
|
|
|
check-cast p1, Lcom/moji/mjweather/me/view/IBaseAccountInputView;
|
|
|
|
const v0, 0x7f0e0019
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->a(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {p1, v1}, Lcom/moji/mjweather/me/view/IBaseAccountInputView;->onErrorShow(Ljava/lang/String;)V
|
|
|
|
.line 105
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->a(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p2, p1}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter$ErrorListener;->a(Ljava/lang/String;)V
|
|
|
|
return v2
|
|
|
|
:cond_1
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public b(Landroid/content/Intent;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "sns_code"
|
|
|
|
.line 132
|
|
invoke-direct {p0, p1, v0}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->a(Landroid/content/Intent;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public b(Ljava/lang/String;)Z
|
|
.locals 3
|
|
|
|
const-string v0, "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"
|
|
|
|
.line 77
|
|
invoke-static {v0}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;)Ljava/util/regex/Pattern;
|
|
|
|
move-result-object v0
|
|
|
|
.line 79
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 80
|
|
iget-object p1, p0, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->f:Lcom/moji/mvpframe/IMJMvpView;
|
|
|
|
check-cast p1, Lcom/moji/mjweather/me/view/IBaseAccountInputView;
|
|
|
|
const v0, 0x7f0e001d
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->a(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, v0}, Lcom/moji/mjweather/me/view/IBaseAccountInputView;->onErrorShow(Ljava/lang/String;)V
|
|
|
|
return v2
|
|
|
|
.line 83
|
|
:cond_0
|
|
invoke-virtual {v0, p1}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
|
|
|
|
move-result-object p1
|
|
|
|
.line 84
|
|
invoke-virtual {p1}, Ljava/util/regex/Matcher;->matches()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
.line 85
|
|
iget-object p1, p0, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->f:Lcom/moji/mvpframe/IMJMvpView;
|
|
|
|
check-cast p1, Lcom/moji/mjweather/me/view/IBaseAccountInputView;
|
|
|
|
const v0, 0x7f0e0019
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->a(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1, v0}, Lcom/moji/mjweather/me/view/IBaseAccountInputView;->onErrorShow(Ljava/lang/String;)V
|
|
|
|
return v2
|
|
|
|
:cond_1
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public c(Landroid/content/Intent;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
const-string v0, "email"
|
|
|
|
.line 141
|
|
invoke-direct {p0, p1, v0}, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->a(Landroid/content/Intent;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final c(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 150
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, "_moji"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lcom/moji/tool/EncryptTool;->a(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public g()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 168
|
|
iget-object v0, p0, Lcom/moji/mjweather/me/presenter/BaseAccountPresenter;->a:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/ProcessPrefer;->j()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|