.class Lcom/moji/mjweather/weather/WeatherPagePresenter$4;
.super Ljava/lang/Object;
.source "WeatherPagePresenter.java"

# interfaces
.implements Lcom/moji/weatherprovider/update/WeatherUpdateListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/mjweather/weather/WeatherPagePresenter;->a(Lcom/moji/weatherprovider/update/WeatherUpdater$UPDATE_TYPE;)V
.end annotation

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


# instance fields
.field final synthetic a:Lcom/moji/mjweather/weather/WeatherPagePresenter;


# direct methods
.method constructor <init>(Lcom/moji/mjweather/weather/WeatherPagePresenter;)V
    .locals 0

    .line 462
    iput-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public a(Lcom/moji/common/area/AreaInfo;Lcom/moji/location/entity/MJLocation;)V
    .locals 1

    if-eqz p2, :cond_4

    .line 532
    invoke-virtual {p2}, Lcom/moji/location/entity/MJLocation;->isLocAccuracyLow()Z

    move-result p1

    if-eqz p1, :cond_4

    invoke-static {}, Lcom/moji/tool/DeviceTool;->p()Z

    move-result p1

    if-nez p1, :cond_4

    .line 533
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->q(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mvpframe/IMJMvpView;

    move-result-object p1

    if-eqz p1, :cond_3

    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->r(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mvpframe/IMJMvpView;

    move-result-object p1

    check-cast p1, Lcom/moji/mjweather/weather/IWeatherPageView;

    invoke-interface {p1}, Lcom/moji/mjweather/weather/IWeatherPageView;->h()Z

    move-result p1

    if-eqz p1, :cond_0

    goto :goto_0

    .line 536
    :cond_0
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->c(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mjweather/TabWeatherFragment;

    move-result-object p1

    if-nez p1, :cond_1

    .line 538
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    iget-object p2, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p2}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->s(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mvpframe/IMJMvpView;

    move-result-object p2

    check-cast p2, Lcom/moji/mjweather/weather/WeatherPageView;

    invoke-virtual {p2}, Lcom/moji/mjweather/weather/WeatherPageView;->getActivity()Landroid/app/Activity;

    move-result-object p2

    invoke-virtual {p1, p2}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->a(Landroid/app/Activity;)Lcom/moji/mjweather/TabWeatherFragment;

    move-result-object p1

    :cond_1
    if-eqz p1, :cond_2

    .line 541
    iget-object p2, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-virtual {p2}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->h()Lcom/moji/common/area/AreaInfo;

    move-result-object p2

    sget-object v0, Lcom/moji/weatherprovider/event/CITY_STATE;->ACCURACY_LOW:Lcom/moji/weatherprovider/event/CITY_STATE;

    invoke-virtual {p1, p2, v0}, Lcom/moji/mjweather/TabWeatherFragment;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/event/CITY_STATE;)V

    .line 543
    :cond_2
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->t(Lcom/moji/mjweather/weather/WeatherPagePresenter;)V

    goto :goto_1

    :cond_3
    :goto_0
    return-void

    :cond_4
    :goto_1
    return-void
.end method

.method public a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/data/Weather;)V
    .locals 2

    const-string p2, "doRefreshWeatherData"

    .line 466
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, " on Success = "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 468
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->b(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mvpframe/IMJMvpView;

    move-result-object p1

    check-cast p1, Lcom/moji/mjweather/weather/IWeatherPageView;

    invoke-interface {p1}, Lcom/moji/mjweather/weather/IWeatherPageView;->b()V

    return-void
.end method

.method public a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/update/Result;)V
    .locals 3

    const-string v0, "doRefreshWeatherData"

    .line 473
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string v2, " onFailure = "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string v2, ", errCode:"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget v2, p2, Lcom/moji/weatherprovider/update/Result;->a:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V

    .line 475
    iget v0, p2, Lcom/moji/weatherprovider/update/Result;->a:I

    const/4 v1, 0x3

    if-ne v0, v1, :cond_0

    const/4 p2, 0x0

    .line 476
    invoke-virtual {p0, p1, p2}, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/data/Weather;)V

    return-void

    .line 479
    :cond_0
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->c(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mjweather/TabWeatherFragment;

    move-result-object p1

    if-nez p1, :cond_1

    .line 481
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    iget-object v0, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {v0}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->d(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mvpframe/IMJMvpView;

    move-result-object v0

    check-cast v0, Lcom/moji/mjweather/weather/WeatherPageView;

    invoke-virtual {v0}, Lcom/moji/mjweather/weather/WeatherPageView;->getActivity()Landroid/app/Activity;

    move-result-object v0

    invoke-virtual {p1, v0}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->a(Landroid/app/Activity;)Lcom/moji/mjweather/TabWeatherFragment;

    move-result-object p1

    .line 483
    :cond_1
    iget v0, p2, Lcom/moji/weatherprovider/update/Result;->a:I

    const/4 v1, 0x2

    if-eq v0, v1, :cond_7

    const/4 v1, 0x7

    if-eq v0, v1, :cond_5

    const/16 v1, 0x9

    if-eq v0, v1, :cond_4

    const/16 v1, 0xe

    if-eq v0, v1, :cond_2

    goto :goto_0

    :cond_2
    if-eqz p1, :cond_3

    .line 499
    iget-object v0, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-virtual {v0}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->h()Lcom/moji/common/area/AreaInfo;

    move-result-object v0

    sget-object v2, Lcom/moji/weatherprovider/event/CITY_STATE;->LOCATION_CLOSE:Lcom/moji/weatherprovider/event/CITY_STATE;

    invoke-virtual {p1, v0, v2}, Lcom/moji/mjweather/TabWeatherFragment;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/event/CITY_STATE;)V

    .line 500
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->h(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mvpframe/IMJMvpView;

    move-result-object p1

    check-cast p1, Lcom/moji/mjweather/weather/IWeatherPageView;

    invoke-interface {p1, v1}, Lcom/moji/mjweather/weather/IWeatherPageView;->a(I)V

    .line 502
    :cond_3
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->i(Lcom/moji/mjweather/weather/WeatherPagePresenter;)V

    goto :goto_0

    :cond_4
    return-void

    :cond_5
    if-eqz p1, :cond_6

    .line 492
    iget-object v0, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-virtual {v0}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->h()Lcom/moji/common/area/AreaInfo;

    move-result-object v0

    sget-object v2, Lcom/moji/weatherprovider/event/CITY_STATE;->PERMISSION_FAIL:Lcom/moji/weatherprovider/event/CITY_STATE;

    invoke-virtual {p1, v0, v2}, Lcom/moji/mjweather/TabWeatherFragment;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/event/CITY_STATE;)V

    .line 493
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->f(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mvpframe/IMJMvpView;

    move-result-object p1

    check-cast p1, Lcom/moji/mjweather/weather/IWeatherPageView;

    invoke-interface {p1, v1}, Lcom/moji/mjweather/weather/IWeatherPageView;->a(I)V

    .line 495
    :cond_6
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->g(Lcom/moji/mjweather/weather/WeatherPagePresenter;)V

    goto :goto_0

    :cond_7
    if-eqz p1, :cond_8

    .line 486
    iget-object v0, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-virtual {v0}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->h()Lcom/moji/common/area/AreaInfo;

    move-result-object v0

    sget-object v2, Lcom/moji/weatherprovider/event/CITY_STATE;->LOCATION_FAIL:Lcom/moji/weatherprovider/event/CITY_STATE;

    invoke-virtual {p1, v0, v2}, Lcom/moji/mjweather/TabWeatherFragment;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/event/CITY_STATE;)V

    .line 487
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->e(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mvpframe/IMJMvpView;

    move-result-object p1

    check-cast p1, Lcom/moji/mjweather/weather/IWeatherPageView;

    invoke-interface {p1, v1}, Lcom/moji/mjweather/weather/IWeatherPageView;->a(I)V

    .line 508
    :cond_8
    :goto_0
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->j(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mvpframe/IMJMvpView;

    move-result-object p1

    check-cast p1, Lcom/moji/mjweather/weather/IWeatherPageView;

    invoke-interface {p1}, Lcom/moji/mjweather/weather/IWeatherPageView;->g()Z

    move-result p1

    if-eqz p1, :cond_9

    .line 509
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->k(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mvpframe/IMJMvpView;

    move-result-object p1

    check-cast p1, Lcom/moji/mjweather/weather/IWeatherPageView;

    invoke-interface {p1}, Lcom/moji/mjweather/weather/IWeatherPageView;->b()V

    goto :goto_1

    .line 511
    :cond_9
    iget-object p1, p0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4;->a:Lcom/moji/mjweather/weather/WeatherPagePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/weather/WeatherPagePresenter;->p(Lcom/moji/mjweather/weather/WeatherPagePresenter;)Lcom/moji/mvpframe/IMJMvpView;

    move-result-object p1

    check-cast p1, Lcom/moji/mjweather/weather/IWeatherPageView;

    new-instance v0, Lcom/moji/mjweather/weather/WeatherPagePresenter$4$1;

    invoke-direct {v0, p0, p2}, Lcom/moji/mjweather/weather/WeatherPagePresenter$4$1;-><init>(Lcom/moji/mjweather/weather/WeatherPagePresenter$4;Lcom/moji/weatherprovider/update/Result;)V

    invoke-interface {p1, v0}, Lcom/moji/mjweather/weather/IWeatherPageView;->hideLoading(Lcom/moji/mvpframe/delegate/ILoadingCallback;)V

    :goto_1
    return-void
.end method
