.class Lcom/moji/mjweather/setting/activity/InputCityActivity$7;
.super Lcom/moji/requestcore/MJHttpCallback;
.source "InputCityActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/mjweather/setting/activity/InputCityActivity;->b(Ljava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/requestcore/MJHttpCallback<",
        "Lcom/moji/http/ugc/bean/SearchCityResp;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic a:Ljava/lang/String;

.field final synthetic b:Lcom/moji/mjweather/setting/activity/InputCityActivity;


# direct methods
.method constructor <init>(Lcom/moji/mjweather/setting/activity/InputCityActivity;Ljava/lang/String;)V
    .locals 0

    .line 369
    iput-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    iput-object p2, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->a:Ljava/lang/String;

    invoke-direct {p0}, Lcom/moji/requestcore/MJHttpCallback;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Lcom/moji/http/ugc/bean/SearchCityResp;)V
    .locals 8

    .line 372
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->g(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Landroid/os/Handler;

    move-result-object v0

    const/4 v1, 0x3

    invoke-virtual {v0, v1}, Landroid/os/Handler;->removeMessages(I)V

    .line 373
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->h(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Landroid/widget/LinearLayout;

    move-result-object v0

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    if-eqz p1, :cond_6

    .line 374
    iget-object v0, p1, Lcom/moji/http/ugc/bean/SearchCityResp;->city_list:Ljava/util/List;

    if-eqz v0, :cond_6

    iget-object v0, p1, Lcom/moji/http/ugc/bean/SearchCityResp;->city_list:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-eqz v0, :cond_6

    .line 375
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    iget-object p1, p1, Lcom/moji/http/ugc/bean/SearchCityResp;->city_list:Ljava/util/List;

    invoke-static {v0, p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->a(Lcom/moji/mjweather/setting/activity/InputCityActivity;Ljava/util/List;)Ljava/util/List;

    .line 376
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    .line 377
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->i(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object v0

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->i(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-eqz v0, :cond_1

    const/4 v0, 0x0

    const/4 v2, 0x0

    .line 378
    :goto_0
    iget-object v3, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v3}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->i(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object v3

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v3

    if-ge v2, v3, :cond_0

    .line 379
    new-instance v3, Lcom/moji/areamanagement/entity/CityItemRecord;

    invoke-direct {v3}, Lcom/moji/areamanagement/entity/CityItemRecord;-><init>()V

    .line 380
    iget-object v4, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v4}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->i(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/moji/http/ugc/bean/CitySearchResultData;

    iget-object v4, v4, Lcom/moji/http/ugc/bean/CitySearchResultData;->pname:Ljava/lang/String;

    iput-object v4, v3, Lcom/moji/areamanagement/entity/CityItemRecord;->provinceName:Ljava/lang/String;

    .line 381
    iget-object v4, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v4}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->i(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/moji/http/ugc/bean/CitySearchResultData;

    iget-object v4, v4, Lcom/moji/http/ugc/bean/CitySearchResultData;->name:Ljava/lang/String;

    iput-object v4, v3, Lcom/moji/areamanagement/entity/CityItemRecord;->cityName:Ljava/lang/String;

    .line 382
    iget-object v4, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v4}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->i(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object v4

    invoke-interface {v4, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/moji/http/ugc/bean/CitySearchResultData;

    iget v4, v4, Lcom/moji/http/ugc/bean/CitySearchResultData;->id:I

    iput v4, v3, Lcom/moji/areamanagement/entity/CityItemRecord;->cityID:I

    .line 383
    invoke-virtual {p1, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 386
    :cond_0
    iget-object v2, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v2}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->i(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-nez v2, :cond_1

    .line 387
    iget-object v2, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v2}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->h(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Landroid/widget/LinearLayout;

    move-result-object v2

    invoke-virtual {v2, v0}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 388
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->j(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Landroid/widget/RelativeLayout;

    move-result-object v0

    const v2, 0x7f090611

    invoke-virtual {v0, v2}, Landroid/widget/RelativeLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V

    .line 389
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->j(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Landroid/widget/RelativeLayout;

    move-result-object v0

    const v2, 0x7f0909bd

    invoke-virtual {v0, v2}, Landroid/widget/RelativeLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    const v2, 0x7f0e077c

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setText(I)V

    .line 392
    :cond_1
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->a:Ljava/lang/String;

    iget-object v2, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v2}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->a(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_7

    .line 393
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->e(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object v0

    if-nez v0, :cond_2

    .line 394
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    invoke-static {v0, v2}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->b(Lcom/moji/mjweather/setting/activity/InputCityActivity;Ljava/util/List;)Ljava/util/List;

    .line 396
    :cond_2
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 397
    iget-object v2, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v2}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->e(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_3
    :goto_1
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_5

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/moji/areamanagement/entity/CityItemRecord;

    .line 398
    invoke-virtual {p1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v4

    :cond_4
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v5

    if-eqz v5, :cond_3

    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/moji/areamanagement/entity/CityItemRecord;

    .line 399
    iget v6, v5, Lcom/moji/areamanagement/entity/CityItemRecord;->cityID:I

    .line 400
    iget v7, v3, Lcom/moji/areamanagement/entity/CityItemRecord;->cityID:I

    if-ne v6, v7, :cond_4

    .line 402
    invoke-virtual {v0, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_1

    .line 407
    :cond_5
    invoke-virtual {p1, v0}, Ljava/util/ArrayList;->removeAll(Ljava/util/Collection;)Z

    .line 408
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->e(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object v0

    invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z

    .line 411
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->k(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

    move-result-object p1

    const/4 v0, 0x1

    invoke-virtual {p1, v0}, Lcom/moji/mjweather/setting/adapter/CityGridAdapter;->a(I)V

    .line 412
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->l(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Landroid/widget/LinearLayout;

    move-result-object p1

    invoke-virtual {p1, v1}, Landroid/widget/LinearLayout;->setVisibility(I)V

    .line 413
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->k(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

    move-result-object p1

    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->e(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object v0

    invoke-virtual {p1, v0}, Lcom/moji/mjweather/setting/adapter/CityGridAdapter;->a(Ljava/util/List;)V

    .line 414
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->k(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/mjweather/setting/adapter/CityGridAdapter;->notifyDataSetChanged()V

    goto :goto_2

    .line 418
    :cond_6
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->a:Ljava/lang/String;

    invoke-static {p1, v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->a(Lcom/moji/mjweather/setting/activity/InputCityActivity;Ljava/lang/String;)V

    :cond_7
    :goto_2
    return-void
.end method

.method protected onFailed(Lcom/moji/requestcore/MJException;)V
    .locals 1

    .line 424
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->g(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Landroid/os/Handler;

    move-result-object p1

    const/4 v0, 0x3

    invoke-virtual {p1, v0}, Landroid/os/Handler;->removeMessages(I)V

    .line 425
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->i(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object p1

    if-eqz p1, :cond_0

    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    invoke-static {p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->i(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;

    move-result-object p1

    invoke-interface {p1}, Ljava/util/List;->isEmpty()Z

    move-result p1

    if-eqz p1, :cond_1

    .line 426
    :cond_0
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->b:Lcom/moji/mjweather/setting/activity/InputCityActivity;

    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->a:Ljava/lang/String;

    invoke-static {p1, v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->a(Lcom/moji/mjweather/setting/activity/InputCityActivity;Ljava/lang/String;)V

    :cond_1
    return-void
.end method

.method public synthetic onSuccess(Ljava/lang/Object;)V
    .locals 0

    .line 369
    check-cast p1, Lcom/moji/http/ugc/bean/SearchCityResp;

    invoke-virtual {p0, p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;->a(Lcom/moji/http/ugc/bean/SearchCityResp;)V

    return-void
.end method
