.class public Lcom/moji/mjweather/setting/activity/InputCityActivity;
.super Lcom/moji/base/MJActivity;
.source "InputCityActivity.java"


# static fields
.field public static final KEY_LOCATION_CITY:I = 0x32

.field public static final KEY_SELECT_CITY:I = 0x28

.field public static latitude:D

.field public static longitude:D

.field public static mCity:Ljava/lang/String;

.field public static mDistrict:Ljava/lang/String;

.field public static mLocationAdr:Ljava/lang/String;

.field public static mProvince:Ljava/lang/String;

.field public static mStreet:Ljava/lang/String;

.field public static mStreetNum:Ljava/lang/String;


# instance fields
.field private a:Landroid/os/Handler;

.field private b:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/moji/http/ugc/bean/CitySearchResultData;",
            ">;"
        }
    .end annotation
.end field

.field private c:Lcom/moji/titlebar/MJTitleBar;

.field private i:Landroid/widget/ImageButton;

.field private j:Landroid/widget/GridView;

.field private k:Landroid/widget/EditText;

.field private l:Landroid/widget/LinearLayout;

.field private m:Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

.field private n:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/moji/areamanagement/entity/CityItemRecord;",
            ">;"
        }
    .end annotation
.end field

.field private o:Lcom/moji/areamanagement/db/LocalCityDBHelper;

.field private p:Ljava/lang/String;

.field private q:Landroid/app/Dialog;

.field private r:Z

.field private s:Landroid/widget/LinearLayout;

.field private t:Landroid/widget/RelativeLayout;

.field private u:Lcom/moji/http/ugc/SearchCityRequest;

.field private final v:Lcom/moji/location/MJLocationListener;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 52
    invoke-direct {p0}, Lcom/moji/base/MJActivity;-><init>()V

    .line 56
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->b:Ljava/util/List;

    const-string v0, ""

    .line 75
    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->p:Ljava/lang/String;

    const/4 v0, 0x1

    .line 77
    iput-boolean v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->r:Z

    .line 296
    new-instance v0, Lcom/moji/mjweather/setting/activity/InputCityActivity$6;

    invoke-direct {v0, p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity$6;-><init>(Lcom/moji/mjweather/setting/activity/InputCityActivity;)V

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->v:Lcom/moji/location/MJLocationListener;

    return-void
.end method

.method static synthetic a(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/lang/String;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->p:Ljava/lang/String;

    return-object p0
.end method

.method static synthetic a(Lcom/moji/mjweather/setting/activity/InputCityActivity;Ljava/util/List;)Ljava/util/List;
    .locals 0

    .line 52
    iput-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->b:Ljava/util/List;

    return-object p1
.end method

.method private a(Landroid/widget/ImageView;Landroid/widget/ImageView;Landroid/widget/ImageView;)V
    .locals 6

    .line 254
    new-instance v0, Landroid/view/animation/TranslateAnimation;

    const v1, 0x3dcccccd    # 0.1f

    const/4 v2, 0x0

    const/high16 v3, 0x41200000    # 10.0f

    invoke-direct {v0, v2, v2, v3, v1}, Landroid/view/animation/TranslateAnimation;-><init>(FFFF)V

    const-wide/16 v2, 0x258

    .line 257
    invoke-virtual {v0, v2, v3}, Landroid/view/animation/Animation;->setDuration(J)V

    .line 258
    invoke-virtual {p1, v0}, Landroid/widget/ImageView;->setAnimation(Landroid/view/animation/Animation;)V

    .line 259
    invoke-virtual {p1, v0}, Landroid/widget/ImageView;->startAnimation(Landroid/view/animation/Animation;)V

    const p1, 0x7fffffff

    .line 260
    invoke-virtual {v0, p1}, Landroid/view/animation/Animation;->setRepeatCount(I)V

    const/4 v2, 0x2

    .line 261
    invoke-virtual {v0, v2}, Landroid/view/animation/Animation;->setRepeatMode(I)V

    .line 263
    new-instance v3, Landroid/view/animation/AlphaAnimation;

    const v4, 0x3ecccccd    # 0.4f

    const/high16 v5, 0x3f800000    # 1.0f

    invoke-direct {v3, v4, v5}, Landroid/view/animation/AlphaAnimation;-><init>(FF)V

    const-wide/16 v4, 0x226

    .line 264
    invoke-virtual {v3, v4, v5}, Landroid/view/animation/Animation;->setDuration(J)V

    .line 265
    invoke-virtual {v3, p1}, Landroid/view/animation/Animation;->setRepeatCount(I)V

    .line 266
    invoke-virtual {v3, v2}, Landroid/view/animation/Animation;->setRepeatMode(I)V

    .line 267
    invoke-virtual {p2, v3}, Landroid/widget/ImageView;->setAnimation(Landroid/view/animation/Animation;)V

    .line 268
    invoke-virtual {p2, v3}, Landroid/widget/ImageView;->startAnimation(Landroid/view/animation/Animation;)V

    .line 270
    new-instance p2, Landroid/view/animation/AlphaAnimation;

    const v2, 0x3f4ccccd    # 0.8f

    invoke-direct {p2, v2, v1}, Landroid/view/animation/AlphaAnimation;-><init>(FF)V

    const-wide/16 v1, 0x4b0

    .line 271
    invoke-virtual {p2, v1, v2}, Landroid/view/animation/Animation;->setDuration(J)V

    .line 272
    invoke-virtual {p2, p1}, Landroid/view/animation/Animation;->setRepeatCount(I)V

    const/4 p1, 0x1

    .line 273
    invoke-virtual {p2, p1}, Landroid/view/animation/Animation;->setRepeatMode(I)V

    .line 274
    invoke-virtual {p3, p2}, Landroid/widget/ImageView;->setAnimation(Landroid/view/animation/Animation;)V

    .line 275
    invoke-virtual {p3, p2}, Landroid/widget/ImageView;->startAnimation(Landroid/view/animation/Animation;)V

    .line 277
    invoke-virtual {v3}, Landroid/view/animation/Animation;->startNow()V

    .line 278
    invoke-virtual {p2}, Landroid/view/animation/Animation;->startNow()V

    .line 279
    invoke-virtual {v0}, Landroid/view/animation/Animation;->startNow()V

    return-void
.end method

.method static synthetic a(Lcom/moji/mjweather/setting/activity/InputCityActivity;Ljava/lang/String;)V
    .locals 0

    .line 52
    invoke-direct {p0, p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->a(Ljava/lang/String;)V

    return-void
.end method

.method private a(Ljava/lang/String;)V
    .locals 2

    .line 347
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->p:Ljava/lang/String;

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    return-void

    .line 350
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->m:Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

    const/4 v1, 0x1

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

    .line 351
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->l:Landroid/widget/LinearLayout;

    const/16 v1, 0x8

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

    .line 352
    invoke-virtual {p0, p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->getCityList(Ljava/lang/String;)Ljava/util/List;

    move-result-object p1

    .line 353
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->m:Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

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

    .line 354
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->m:Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

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

    return-void
.end method

.method static synthetic a(Lcom/moji/mjweather/setting/activity/InputCityActivity;Z)Z
    .locals 0

    .line 52
    iput-boolean p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->r:Z

    return p1
.end method

.method static synthetic b(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Landroid/widget/EditText;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->k:Landroid/widget/EditText;

    return-object p0
.end method

.method static synthetic b(Lcom/moji/mjweather/setting/activity/InputCityActivity;Ljava/lang/String;)Ljava/lang/String;
    .locals 0

    .line 52
    iput-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->p:Ljava/lang/String;

    return-object p1
.end method

.method static synthetic b(Lcom/moji/mjweather/setting/activity/InputCityActivity;Ljava/util/List;)Ljava/util/List;
    .locals 0

    .line 52
    iput-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

    return-object p1
.end method

.method private b(Ljava/lang/String;)V
    .locals 4

    .line 359
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->b:Ljava/util/List;

    if-eqz v0, :cond_0

    .line 360
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->b:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    .line 362
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->s:Landroid/widget/LinearLayout;

    const/4 v1, 0x0

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

    .line 363
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->t:Landroid/widget/RelativeLayout;

    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 364
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->t:Landroid/widget/RelativeLayout;

    const v1, 0x7f0909bd

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

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    const v1, 0x7f0e077e

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

    .line 365
    new-instance v0, Lcom/moji/http/ugc/SearchCityRequest;

    invoke-direct {v0, p1}, Lcom/moji/http/ugc/SearchCityRequest;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->u:Lcom/moji/http/ugc/SearchCityRequest;

    .line 366
    new-instance v0, Lcom/moji/requestcore/RequestBuilder$Builder;

    invoke-direct {v0}, Lcom/moji/requestcore/RequestBuilder$Builder;-><init>()V

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/moji/requestcore/RequestBuilder$Builder;->a(I)Lcom/moji/requestcore/RequestBuilder$Builder;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/moji/requestcore/RequestBuilder$Builder;->b(I)Lcom/moji/requestcore/RequestBuilder$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/moji/requestcore/RequestBuilder$Builder;->c()Lcom/moji/requestcore/RequestBuilder;

    move-result-object v0

    .line 367
    iget-object v1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->u:Lcom/moji/http/ugc/SearchCityRequest;

    invoke-virtual {v1, v0}, Lcom/moji/http/ugc/SearchCityRequest;->a(Lcom/moji/requestcore/RequestBuilder;)V

    .line 368
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->a:Landroid/os/Handler;

    const/4 v1, 0x3

    const-wide/16 v2, 0xbb8

    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z

    .line 369
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->u:Lcom/moji/http/ugc/SearchCityRequest;

    new-instance v1, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;

    invoke-direct {v1, p0, p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity$7;-><init>(Lcom/moji/mjweather/setting/activity/InputCityActivity;Ljava/lang/String;)V

    invoke-virtual {v0, v1}, Lcom/moji/http/ugc/SearchCityRequest;->a(Lcom/moji/requestcore/MJBaseHttpCallback;)V

    return-void
.end method

.method static synthetic c(Lcom/moji/mjweather/setting/activity/InputCityActivity;)V
    .locals 0

    .line 52
    invoke-direct {p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->d()V

    return-void
.end method

.method private d()V
    .locals 5

    const v0, 0x7f0b0357

    const/4 v1, 0x0

    .line 185
    invoke-static {p0, v0, v1}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    .line 186
    new-instance v1, Landroid/app/Dialog;

    const v2, 0x7f0f00ac

    invoke-direct {v1, p0, v2}, Landroid/app/Dialog;-><init>(Landroid/content/Context;I)V

    iput-object v1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->q:Landroid/app/Dialog;

    .line 187
    iget-object v1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->q:Landroid/app/Dialog;

    invoke-virtual {v1, v0}, Landroid/app/Dialog;->setContentView(Landroid/view/View;)V

    .line 188
    iget-object v1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->q:Landroid/app/Dialog;

    invoke-virtual {v1}, Landroid/app/Dialog;->getWindow()Landroid/view/Window;

    move-result-object v1

    invoke-virtual {v1}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;

    move-result-object v1

    invoke-static {}, Lcom/moji/tool/DeviceTool;->f()F

    move-result v2

    const/high16 v3, 0x43520000    # 210.0f

    mul-float v2, v2, v3

    float-to-int v2, v2

    iput v2, v1, Landroid/view/WindowManager$LayoutParams;->width:I

    const v1, 0x7f090633

    .line 189
    invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    const v2, 0x7f090572

    .line 190
    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ImageView;

    .line 191
    invoke-virtual {v2}, Landroid/widget/ImageView;->bringToFront()V

    const v3, 0x7f0903b3

    .line 192
    invoke-virtual {v0, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/ImageView;

    const v4, 0x7f0903b5

    .line 193
    invoke-virtual {v0, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    .line 194
    invoke-direct {p0, v2, v3, v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->a(Landroid/widget/ImageView;Landroid/widget/ImageView;Landroid/widget/ImageView;)V

    .line 195
    new-instance v0, Lcom/moji/mjweather/setting/activity/InputCityActivity$4;

    invoke-direct {v0, p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity$4;-><init>(Lcom/moji/mjweather/setting/activity/InputCityActivity;)V

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 205
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->q:Landroid/app/Dialog;

    new-instance v1, Lcom/moji/mjweather/setting/activity/InputCityActivity$5;

    invoke-direct {v1, p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity$5;-><init>(Lcom/moji/mjweather/setting/activity/InputCityActivity;)V

    invoke-virtual {v0, v1}, Landroid/app/Dialog;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V

    .line 211
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->q:Landroid/app/Dialog;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/app/Dialog;->setCanceledOnTouchOutside(Z)V

    .line 212
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->q:Landroid/app/Dialog;

    invoke-virtual {v0}, Landroid/app/Dialog;->show()V

    return-void
.end method

.method static synthetic d(Lcom/moji/mjweather/setting/activity/InputCityActivity;)V
    .locals 0

    .line 52
    invoke-direct {p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->j()V

    return-void
.end method

.method static synthetic e(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

    return-object p0
.end method

.method private e()V
    .locals 1

    .line 215
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->q:Landroid/app/Dialog;

    if-eqz v0, :cond_0

    .line 216
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->q:Landroid/app/Dialog;

    invoke-virtual {v0}, Landroid/app/Dialog;->dismiss()V

    :cond_0
    return-void
.end method

.method static synthetic f(Lcom/moji/mjweather/setting/activity/InputCityActivity;)V
    .locals 0

    .line 52
    invoke-direct {p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->e()V

    return-void
.end method

.method static synthetic g(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Landroid/os/Handler;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->a:Landroid/os/Handler;

    return-object p0
.end method

.method static synthetic h(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Landroid/widget/LinearLayout;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->s:Landroid/widget/LinearLayout;

    return-object p0
.end method

.method static synthetic i(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Ljava/util/List;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->b:Ljava/util/List;

    return-object p0
.end method

.method static synthetic j(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Landroid/widget/RelativeLayout;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->t:Landroid/widget/RelativeLayout;

    return-object p0
.end method

.method private j()V
    .locals 2

    .line 288
    invoke-static {}, Lcom/moji/tool/DeviceTool;->m()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 289
    new-instance v0, Lcom/moji/location/MJLocationManager;

    invoke-direct {v0}, Lcom/moji/location/MJLocationManager;-><init>()V

    iget-object v1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->v:Lcom/moji/location/MJLocationListener;

    invoke-virtual {v0, p0, v1}, Lcom/moji/location/MJLocationManager;->a(Landroid/content/Context;Lcom/moji/location/MJLocationListener;)V

    goto :goto_0

    .line 291
    :cond_0
    invoke-direct {p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->e()V

    const v0, 0x7f0e0588

    const/4 v1, 0x1

    .line 292
    invoke-static {p0, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    :goto_0
    return-void
.end method

.method static synthetic k(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Lcom/moji/mjweather/setting/adapter/CityGridAdapter;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->m:Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

    return-object p0
.end method

.method static synthetic l(Lcom/moji/mjweather/setting/activity/InputCityActivity;)Landroid/widget/LinearLayout;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->l:Landroid/widget/LinearLayout;

    return-object p0
.end method


# virtual methods
.method protected a()V
    .locals 2

    const v0, 0x7f0b0061

    .line 99
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->setContentView(I)V

    .line 100
    new-instance v0, Lcom/moji/areamanagement/db/LocalCityDBHelper;

    invoke-virtual {p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/moji/areamanagement/db/LocalCityDBHelper;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->o:Lcom/moji/areamanagement/db/LocalCityDBHelper;

    .line 101
    new-instance v0, Lcom/moji/mjweather/setting/activity/InputCityActivity$1;

    invoke-direct {v0, p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity$1;-><init>(Lcom/moji/mjweather/setting/activity/InputCityActivity;)V

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->a:Landroid/os/Handler;

    return-void
.end method

.method protected b()V
    .locals 2

    const v0, 0x7f090952

    .line 115
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/moji/titlebar/MJTitleBar;

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->c:Lcom/moji/titlebar/MJTitleBar;

    const v0, 0x7f09000c

    .line 116
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageButton;

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->i:Landroid/widget/ImageButton;

    const v0, 0x7f090007

    .line 117
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/GridView;

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->j:Landroid/widget/GridView;

    const v0, 0x7f090003

    .line 118
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/EditText;

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->k:Landroid/widget/EditText;

    const v0, 0x7f090012

    .line 119
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->l:Landroid/widget/LinearLayout;

    const v0, 0x7f090722

    .line 120
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/RelativeLayout;

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->t:Landroid/widget/RelativeLayout;

    const v0, 0x7f0904d5

    .line 121
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->s:Landroid/widget/LinearLayout;

    .line 122
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->s:Landroid/widget/LinearLayout;

    const/16 v1, 0x8

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

    const v0, 0x7f0901ef

    .line 123
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    .line 124
    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    .line 125
    new-instance v0, Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

    invoke-direct {v0, p0}, Lcom/moji/mjweather/setting/adapter/CityGridAdapter;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->m:Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

    .line 126
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->m:Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

    invoke-virtual {p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->getHotCityList()Ljava/util/List;

    move-result-object v1

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

    .line 127
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->j:Landroid/widget/GridView;

    iget-object v1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->m:Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

    invoke-virtual {v0, v1}, Landroid/widget/GridView;->setAdapter(Landroid/widget/ListAdapter;)V

    return-void
.end method

.method protected c()V
    .locals 2

    .line 131
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->k:Landroid/widget/EditText;

    new-instance v1, Lcom/moji/mjweather/setting/activity/InputCityActivity$2;

    invoke-direct {v1, p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity$2;-><init>(Lcom/moji/mjweather/setting/activity/InputCityActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V

    .line 157
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->j:Landroid/widget/GridView;

    new-instance v1, Lcom/moji/mjweather/setting/activity/InputCityActivity$3;

    invoke-direct {v1, p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity$3;-><init>(Lcom/moji/mjweather/setting/activity/InputCityActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/GridView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    return-void
.end method

.method public getCityList(Ljava/lang/String;)Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/List<",
            "Lcom/moji/areamanagement/entity/CityItemRecord;",
            ">;"
        }
    .end annotation

    .line 283
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->o:Lcom/moji/areamanagement/db/LocalCityDBHelper;

    invoke-virtual {v0, p1}, Lcom/moji/areamanagement/db/LocalCityDBHelper;->c(Ljava/lang/String;)Ljava/util/List;

    move-result-object p1

    iput-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

    .line 284
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

    return-object p1
.end method

.method public getHotCityList()Ljava/util/List;
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/List<",
            "Lcom/moji/areamanagement/entity/CityItemRecord;",
            ">;"
        }
    .end annotation

    .line 221
    invoke-static {}, Lcom/mojiweather/area/CityManager;->f()Lcom/mojiweather/area/CityManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/mojiweather/area/CityManager;->d()Ljava/util/List;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

    .line 222
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

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

    move-result v0

    if-eqz v0, :cond_1

    .line 223
    :cond_0
    invoke-static {}, Lcom/mojiweather/area/CityManager;->f()Lcom/mojiweather/area/CityManager;

    move-result-object v0

    invoke-virtual {v0}, Lcom/mojiweather/area/CityManager;->e()Ljava/util/List;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

    .line 225
    :cond_1
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

    return-object v0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 0
    .param p1    # Landroid/os/Bundle;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

    .line 92
    invoke-super {p0, p1}, Lcom/moji/base/MJActivity;->onCreate(Landroid/os/Bundle;)V

    .line 93
    invoke-virtual {p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->a()V

    .line 94
    invoke-virtual {p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->b()V

    .line 95
    invoke-virtual {p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->c()V

    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .line 435
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->o:Lcom/moji/areamanagement/db/LocalCityDBHelper;

    if-eqz v0, :cond_0

    .line 436
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->o:Lcom/moji/areamanagement/db/LocalCityDBHelper;

    invoke-virtual {v0}, Lcom/moji/areamanagement/db/LocalCityDBHelper;->a()V

    .line 438
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->u:Lcom/moji/http/ugc/SearchCityRequest;

    if-eqz v0, :cond_1

    .line 439
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->u:Lcom/moji/http/ugc/SearchCityRequest;

    invoke-virtual {v0}, Lcom/moji/http/ugc/SearchCityRequest;->h_()V

    .line 441
    :cond_1
    invoke-super {p0}, Lcom/moji/base/MJActivity;->onDestroy()V

    return-void
.end method

.method public setGridAdapter(Ljava/lang/String;I)V
    .locals 1

    .line 229
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

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

    move-result v0

    if-nez v0, :cond_0

    .line 230
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->clear()V

    const/4 v0, 0x0

    .line 231
    iput-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->n:Ljava/util/List;

    .line 233
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->j:Landroid/widget/GridView;

    invoke-virtual {v0, p2}, Landroid/widget/GridView;->setNumColumns(I)V

    .line 234
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p2

    if-eqz p2, :cond_1

    .line 235
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->m:Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

    const/4 p2, 0x3

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

    .line 236
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->l:Landroid/widget/LinearLayout;

    const/4 p2, 0x0

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

    .line 237
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->m:Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

    invoke-virtual {p0}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->getHotCityList()Ljava/util/List;

    move-result-object p2

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

    .line 238
    iget-object p1, p0, Lcom/moji/mjweather/setting/activity/InputCityActivity;->m:Lcom/moji/mjweather/setting/adapter/CityGridAdapter;

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

    goto :goto_0

    .line 240
    :cond_1
    invoke-static {}, Lcom/moji/tool/DeviceTool;->m()Z

    move-result p2

    if-nez p2, :cond_2

    .line 241
    invoke-direct {p0, p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->a(Ljava/lang/String;)V

    const p1, 0x7f0e05be

    .line 242
    invoke-virtual {p0, p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->getString(I)Ljava/lang/String;

    move-result-object p1

    const/4 p2, 0x1

    invoke-static {p0, p1, p2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    goto :goto_0

    .line 244
    :cond_2
    invoke-direct {p0, p1}, Lcom/moji/mjweather/setting/activity/InputCityActivity;->b(Ljava/lang/String;)V

    :goto_0
    return-void
.end method
