497 lines
14 KiB
Smali
497 lines
14 KiB
Smali
.class public Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;
|
|
.super Lcom/moji/base/MJPresenter;
|
|
.source "SakuraFeedbackPresenter.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$FeedbackCallback;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/moji/base/MJPresenter<",
|
|
"Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$FeedbackCallback;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private b:Landroid/app/Dialog;
|
|
|
|
.field private c:Lcom/moji/sakura/feedback/SakuraFeedbackAdapter;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$FeedbackCallback;)V
|
|
.locals 0
|
|
|
|
.line 45
|
|
invoke-direct {p0, p1}, Lcom/moji/base/MJPresenter;-><init>(Lcom/moji/base/MJPresenter$ICallback;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;)Lcom/moji/sakura/feedback/SakuraFeedbackAdapter;
|
|
.locals 0
|
|
|
|
.line 35
|
|
iget-object p0, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->c:Lcom/moji/sakura/feedback/SakuraFeedbackAdapter;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private a(ILjava/lang/Long;ILcom/moji/location/entity/MJLocation;Lcom/moji/common/area/AreaInfo;)V
|
|
.locals 10
|
|
|
|
if-nez p5, :cond_0
|
|
|
|
const/4 p5, -0x1
|
|
|
|
const/4 v8, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 152
|
|
:cond_0
|
|
iget p5, p5, Lcom/moji/common/area/AreaInfo;->cityId:I
|
|
|
|
move v8, p5
|
|
|
|
:goto_0
|
|
const-wide/16 v0, 0x0
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
.line 154
|
|
invoke-virtual {p4}, Lcom/moji/location/entity/MJLocation;->getLatitude()D
|
|
|
|
move-result-wide v0
|
|
|
|
.line 155
|
|
invoke-virtual {p4}, Lcom/moji/location/entity/MJLocation;->getLongitude()D
|
|
|
|
move-result-wide p4
|
|
|
|
move-wide v4, p4
|
|
|
|
move-wide v6, v0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move-wide v4, v0
|
|
|
|
move-wide v6, v4
|
|
|
|
.line 157
|
|
:goto_1
|
|
new-instance p4, Lcom/moji/http/sakura/SakuraFeedbackRequest;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v1
|
|
|
|
move-object v0, p4
|
|
|
|
move v3, p1
|
|
|
|
move v9, p3
|
|
|
|
invoke-direct/range {v0 .. v9}, Lcom/moji/http/sakura/SakuraFeedbackRequest;-><init>(JIDDII)V
|
|
|
|
.line 158
|
|
new-instance p1, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$3;
|
|
|
|
invoke-direct {p1, p0}, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$3;-><init>(Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;)V
|
|
|
|
invoke-virtual {p4, p1}, Lcom/moji/http/sakura/SakuraFeedbackRequest;->a(Lcom/moji/requestcore/MJBaseHttpCallback;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic b(Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;)Landroid/app/Dialog;
|
|
.locals 0
|
|
|
|
.line 35
|
|
iget-object p0, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->b:Landroid/app/Dialog;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic c(Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;)Lcom/moji/base/MJPresenter$ICallback;
|
|
.locals 0
|
|
|
|
.line 35
|
|
iget-object p0, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->a:Lcom/moji/base/MJPresenter$ICallback;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic d(Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;)Lcom/moji/base/MJPresenter$ICallback;
|
|
.locals 0
|
|
|
|
.line 35
|
|
iget-object p0, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->a:Lcom/moji/base/MJPresenter$ICallback;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method static synthetic e(Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;)Lcom/moji/base/MJPresenter$ICallback;
|
|
.locals 0
|
|
|
|
.line 35
|
|
iget-object p0, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->a:Lcom/moji/base/MJPresenter$ICallback;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Landroid/app/Activity;Ljava/lang/Long;I)V
|
|
.locals 6
|
|
|
|
.line 49
|
|
iget-object v0, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->b:Landroid/app/Dialog;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 50
|
|
invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;
|
|
|
|
move-result-object v0
|
|
|
|
.line 51
|
|
sget v1, Lcom/moji/sakura/R$layout;->layout_sakura_feedback_dialog:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
.line 52
|
|
sget v1, Lcom/moji/sakura/R$id;->red_leaves_feedback_recycler:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Landroid/support/v7/widget/RecyclerView;
|
|
|
|
.line 53
|
|
sget v2, Lcom/moji/sakura/R$id;->red_leaves_feedback_submit:I
|
|
|
|
invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Landroid/widget/Button;
|
|
|
|
.line 54
|
|
sget v4, Lcom/moji/sakura/R$id;->iv_close:I
|
|
|
|
invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Landroid/widget/ImageView;
|
|
|
|
.line 55
|
|
new-instance v5, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$1;
|
|
|
|
invoke-direct {v5, p0, p1, p2, p3}, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$1;-><init>(Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;Landroid/app/Activity;Ljava/lang/Long;I)V
|
|
|
|
invoke-virtual {v2, v5}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
.line 72
|
|
new-instance p2, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$2;
|
|
|
|
invoke-direct {p2, p0}, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$2;-><init>(Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;)V
|
|
|
|
invoke-virtual {v4, p2}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
.line 80
|
|
new-instance p2, Landroid/app/Dialog;
|
|
|
|
sget p3, Lcom/moji/sakura/R$style;->rlfeedback:I
|
|
|
|
invoke-direct {p2, p1, p3}, Landroid/app/Dialog;-><init>(Landroid/content/Context;I)V
|
|
|
|
iput-object p2, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->b:Landroid/app/Dialog;
|
|
|
|
.line 81
|
|
iget-object p2, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->b:Landroid/app/Dialog;
|
|
|
|
invoke-virtual {p2}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
.line 83
|
|
invoke-virtual {p2}, Landroid/view/Window;->getDecorView()Landroid/view/View;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p3, v3, v3, v3, v3}, Landroid/view/View;->setPadding(IIII)V
|
|
|
|
.line 84
|
|
invoke-virtual {p2}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;
|
|
|
|
move-result-object p3
|
|
|
|
const/4 v2, -0x1
|
|
|
|
.line 85
|
|
iput v2, p3, Landroid/view/WindowManager$LayoutParams;->width:I
|
|
|
|
.line 86
|
|
iput v2, p3, Landroid/view/WindowManager$LayoutParams;->height:I
|
|
|
|
.line 87
|
|
invoke-virtual {p2, p3}, Landroid/view/Window;->setAttributes(Landroid/view/WindowManager$LayoutParams;)V
|
|
|
|
.line 89
|
|
:cond_0
|
|
iget-object p2, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->b:Landroid/app/Dialog;
|
|
|
|
invoke-virtual {p2, v0}, Landroid/app/Dialog;->setContentView(Landroid/view/View;)V
|
|
|
|
.line 90
|
|
iget-object p2, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->b:Landroid/app/Dialog;
|
|
|
|
invoke-virtual {p2, v3}, Landroid/app/Dialog;->setCancelable(Z)V
|
|
|
|
.line 91
|
|
iget-object p2, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->b:Landroid/app/Dialog;
|
|
|
|
const/4 p3, 0x1
|
|
|
|
invoke-virtual {p2, p3}, Landroid/app/Dialog;->setCanceledOnTouchOutside(Z)V
|
|
|
|
.line 93
|
|
new-instance p2, Landroid/support/v7/widget/LinearLayoutManager;
|
|
|
|
invoke-direct {p2, p1}, Landroid/support/v7/widget/LinearLayoutManager;-><init>(Landroid/content/Context;)V
|
|
|
|
.line 94
|
|
invoke-virtual {p2, p3}, Landroid/support/v7/widget/LinearLayoutManager;->b(I)V
|
|
|
|
.line 95
|
|
invoke-virtual {v1, p2}, Landroid/support/v7/widget/RecyclerView;->setLayoutManager(Landroid/support/v7/widget/RecyclerView$LayoutManager;)V
|
|
|
|
.line 96
|
|
new-instance p2, Lcom/moji/sakura/feedback/FeedbackItemDecorator;
|
|
|
|
invoke-direct {p2, p1}, Lcom/moji/sakura/feedback/FeedbackItemDecorator;-><init>(Landroid/content/Context;)V
|
|
|
|
invoke-virtual {v1, p2}, Landroid/support/v7/widget/RecyclerView;->a(Landroid/support/v7/widget/RecyclerView$ItemDecoration;)V
|
|
|
|
.line 97
|
|
new-instance p1, Lcom/moji/sakura/feedback/SakuraFeedbackAdapter;
|
|
|
|
invoke-direct {p1}, Lcom/moji/sakura/feedback/SakuraFeedbackAdapter;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->c:Lcom/moji/sakura/feedback/SakuraFeedbackAdapter;
|
|
|
|
.line 98
|
|
iget-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->c:Lcom/moji/sakura/feedback/SakuraFeedbackAdapter;
|
|
|
|
invoke-virtual {v1, p1}, Landroid/support/v7/widget/RecyclerView;->setAdapter(Landroid/support/v7/widget/RecyclerView$Adapter;)V
|
|
|
|
.line 100
|
|
:cond_1
|
|
iget-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->b:Landroid/app/Dialog;
|
|
|
|
invoke-virtual {p1}, Landroid/app/Dialog;->isShowing()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 101
|
|
iget-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->b:Landroid/app/Dialog;
|
|
|
|
invoke-virtual {p1}, Landroid/app/Dialog;->dismiss()V
|
|
|
|
.line 103
|
|
:cond_2
|
|
iget-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->c:Lcom/moji/sakura/feedback/SakuraFeedbackAdapter;
|
|
|
|
invoke-virtual {p1}, Lcom/moji/sakura/feedback/SakuraFeedbackAdapter;->d()V
|
|
|
|
.line 104
|
|
iget-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->b:Landroid/app/Dialog;
|
|
|
|
invoke-virtual {p1}, Landroid/app/Dialog;->show()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Lcom/moji/sakura/feedback/SakuraFeedbackAdapter;Ljava/lang/Long;I)V
|
|
.locals 10
|
|
|
|
const/4 v0, 0x4
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 109
|
|
iget-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->a:Lcom/moji/base/MJPresenter$ICallback;
|
|
|
|
check-cast p1, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$FeedbackCallback;
|
|
|
|
invoke-interface {p1, v0}, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$FeedbackCallback;->a(I)V
|
|
|
|
return-void
|
|
|
|
.line 112
|
|
:cond_0
|
|
invoke-virtual {p1}, Lcom/moji/sakura/feedback/SakuraFeedbackAdapter;->e()[I
|
|
|
|
move-result-object v1
|
|
|
|
.line 113
|
|
invoke-virtual {p1}, Lcom/moji/sakura/feedback/SakuraFeedbackAdapter;->f()I
|
|
|
|
move-result p1
|
|
|
|
if-gez p1, :cond_1
|
|
|
|
.line 116
|
|
sget p1, Lcom/moji/sakura/R$string;->sakura_feedback_check_first:I
|
|
|
|
invoke-static {p1}, Lcom/moji/tool/ToastTool;->a(I)V
|
|
|
|
return-void
|
|
|
|
.line 119
|
|
:cond_1
|
|
array-length v1, v1
|
|
|
|
if-lt p1, v1, :cond_2
|
|
|
|
.line 120
|
|
iget-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->a:Lcom/moji/base/MJPresenter$ICallback;
|
|
|
|
check-cast p1, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$FeedbackCallback;
|
|
|
|
invoke-interface {p1, v0}, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$FeedbackCallback;->a(I)V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
const/4 v1, 0x0
|
|
|
|
.line 126
|
|
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->a()Lcom/moji/common/area/AreaInfo;
|
|
|
|
move-result-object v7
|
|
|
|
.line 128
|
|
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->h()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
.line 129
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v5, Lcom/moji/location/MJLocationSource;->AMAP_LOCATION:Lcom/moji/location/MJLocationSource;
|
|
|
|
const-wide/32 v8, 0x5265c00
|
|
|
|
invoke-static {v2, v5, v8, v9}, Lcom/moji/location/provider/HistoryLocationHelper;->a(Landroid/content/Context;Lcom/moji/location/MJLocationSource;J)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
goto :goto_0
|
|
|
|
.line 132
|
|
:cond_3
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/moji/location/MJLocationSource;->AMAP_LOCATION:Lcom/moji/location/MJLocationSource;
|
|
|
|
invoke-static {v1, v2}, Lcom/moji/location/provider/HistoryLocationHelper;->b(Landroid/content/Context;Lcom/moji/location/MJLocationSource;)Lcom/moji/location/entity/MJLocation;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
.line 133
|
|
invoke-static {v1}, Lcom/moji/location/util/LocationUtil;->b(Lcom/moji/location/entity/MJLocation;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
const/4 v4, 0x1
|
|
|
|
:cond_4
|
|
:goto_0
|
|
if-nez v4, :cond_5
|
|
|
|
if-eqz v7, :cond_5
|
|
|
|
.line 135
|
|
iget-boolean v2, v7, Lcom/moji/common/area/AreaInfo;->isLocation:Z
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
.line 136
|
|
iget-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->a:Lcom/moji/base/MJPresenter$ICallback;
|
|
|
|
check-cast p1, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$FeedbackCallback;
|
|
|
|
invoke-interface {p1, v3}, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$FeedbackCallback;->a(I)V
|
|
|
|
return-void
|
|
|
|
:cond_5
|
|
move-object v6, v1
|
|
|
|
if-nez v4, :cond_6
|
|
|
|
if-nez v7, :cond_6
|
|
|
|
.line 142
|
|
iget-object p1, p0, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->a:Lcom/moji/base/MJPresenter$ICallback;
|
|
|
|
check-cast p1, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$FeedbackCallback;
|
|
|
|
invoke-interface {p1, v0}, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter$FeedbackCallback;->a(I)V
|
|
|
|
return-void
|
|
|
|
:cond_6
|
|
add-int/2addr v3, p1
|
|
|
|
move-object v2, p0
|
|
|
|
move-object v4, p2
|
|
|
|
move v5, p3
|
|
|
|
.line 145
|
|
invoke-direct/range {v2 .. v7}, Lcom/moji/sakura/feedback/SakuraFeedbackPresenter;->a(ILjava/lang/Long;ILcom/moji/location/entity/MJLocation;Lcom/moji/common/area/AreaInfo;)V
|
|
|
|
return-void
|
|
.end method
|