.class public Lcom/moji/mjweather/aqi/presenter/AqiMapPresenter;
.super Lcom/moji/mvpframe/BasePresenter;
.source "AqiMapPresenter.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/mvpframe/BasePresenter<",
        "Lcom/moji/mjweather/aqi/presenter/AqiApi;",
        "Lcom/moji/mjweather/aqi/view/IAqiMapView;",
        ">;"
    }
.end annotation


# direct methods
.method public constructor <init>(Lcom/moji/mjweather/aqi/view/IAqiMapView;)V
    .locals 0

    .line 26
    invoke-direct {p0, p1}, Lcom/moji/mvpframe/BasePresenter;-><init>(Lcom/moji/mvpframe/IMJMvpView;)V

    return-void
.end method

.method public static a(Landroid/content/Context;Lcom/moji/common/area/AreaInfo;DDLjava/lang/String;Z)V
    .locals 2

    .line 36
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/moji/mjweather/aqi/AqiMapActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "AREA"

    .line 37
    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    const-string p1, "LAT"

    .line 38
    invoke-virtual {v0, p1, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;D)Landroid/content/Intent;

    const-string p1, "LNG"

    .line 39
    invoke-virtual {v0, p1, p4, p5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;D)Landroid/content/Intent;

    const-string p1, "TIME"

    .line 40
    invoke-virtual {v0, p1, p6}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string p1, "LOC_FAIL"

    .line 41
    invoke-virtual {v0, p1, p7}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    .line 42
    invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    return-void
.end method

.method private a(Lcom/amap/api/maps2d/model/LatLng;Z)V
    .locals 1

    .line 71
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/AqiMapPresenter;->f:Lcom/moji/mvpframe/IMJMvpView;

    check-cast v0, Lcom/moji/mjweather/aqi/view/IAqiMapView;

    invoke-interface {v0, p1, p2}, Lcom/moji/mjweather/aqi/view/IAqiMapView;->loadCityMap(Lcom/amap/api/maps2d/model/LatLng;Z)V

    return-void
.end method

.method private a(Lcom/moji/common/area/AreaInfo;)V
    .locals 1

    if-eqz p1, :cond_0

    .line 62
    iget-boolean p1, p1, Lcom/moji/common/area/AreaInfo;->isLocation:Z

    if-eqz p1, :cond_0

    .line 63
    iget-object p1, p0, Lcom/moji/mjweather/aqi/presenter/AqiMapPresenter;->f:Lcom/moji/mvpframe/IMJMvpView;

    check-cast p1, Lcom/moji/mjweather/aqi/view/IAqiMapView;

    const/4 v0, 0x1

    invoke-interface {p1, v0}, Lcom/moji/mjweather/aqi/view/IAqiMapView;->setIsLocationCity(Z)V

    goto :goto_0

    .line 65
    :cond_0
    iget-object p1, p0, Lcom/moji/mjweather/aqi/presenter/AqiMapPresenter;->f:Lcom/moji/mvpframe/IMJMvpView;

    check-cast p1, Lcom/moji/mjweather/aqi/view/IAqiMapView;

    invoke-interface {p1}, Lcom/moji/mjweather/aqi/view/IAqiMapView;->hideLocationAction()V

    .line 66
    iget-object p1, p0, Lcom/moji/mjweather/aqi/presenter/AqiMapPresenter;->f:Lcom/moji/mvpframe/IMJMvpView;

    check-cast p1, Lcom/moji/mjweather/aqi/view/IAqiMapView;

    const/4 v0, 0x0

    invoke-interface {p1, v0}, Lcom/moji/mjweather/aqi/view/IAqiMapView;->setIsLocationCity(Z)V

    :goto_0
    return-void
.end method


# virtual methods
.method protected a()Lcom/moji/mjweather/aqi/presenter/AqiApi;
    .locals 1

    .line 31
    new-instance v0, Lcom/moji/mjweather/aqi/presenter/AqiApi;

    invoke-direct {v0}, Lcom/moji/mjweather/aqi/presenter/AqiApi;-><init>()V

    return-object v0
.end method

.method public a(Landroid/content/Intent;)V
    .locals 8

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

    move-result v0

    if-nez v0, :cond_0

    .line 47
    iget-object p1, p0, Lcom/moji/mjweather/aqi/presenter/AqiMapPresenter;->f:Lcom/moji/mvpframe/IMJMvpView;

    check-cast p1, Lcom/moji/mjweather/aqi/view/IAqiMapView;

    const/4 v0, 0x1

    invoke-interface {p1, v0}, Lcom/moji/mjweather/aqi/view/IAqiMapView;->showNetStatusView(Z)V

    return-void

    .line 50
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/AqiMapPresenter;->f:Lcom/moji/mvpframe/IMJMvpView;

    check-cast v0, Lcom/moji/mjweather/aqi/view/IAqiMapView;

    const/4 v1, 0x0

    invoke-interface {v0, v1}, Lcom/moji/mjweather/aqi/view/IAqiMapView;->showNetStatusView(Z)V

    const-string v0, "AREA"

    .line 51
    invoke-virtual {p1, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v0

    check-cast v0, Lcom/moji/common/area/AreaInfo;

    const-string v2, "LAT"

    const-wide/high16 v3, -0x4010000000000000L    # -1.0

    .line 52
    invoke-virtual {p1, v2, v3, v4}, Landroid/content/Intent;->getDoubleExtra(Ljava/lang/String;D)D

    move-result-wide v5

    const-string v2, "LNG"

    .line 53
    invoke-virtual {p1, v2, v3, v4}, Landroid/content/Intent;->getDoubleExtra(Ljava/lang/String;D)D

    move-result-wide v2

    const-string v4, "TIME"

    .line 54
    invoke-virtual {p1, v4}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    const-string v7, "LOC_FAIL"

    .line 55
    invoke-virtual {p1, v7, v1}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result p1

    .line 56
    iget-object v1, p0, Lcom/moji/mjweather/aqi/presenter/AqiMapPresenter;->f:Lcom/moji/mvpframe/IMJMvpView;

    check-cast v1, Lcom/moji/mjweather/aqi/view/IAqiMapView;

    invoke-interface {v1, v4}, Lcom/moji/mjweather/aqi/view/IAqiMapView;->setSubTitle(Ljava/lang/String;)V

    .line 57
    new-instance v1, Lcom/amap/api/maps2d/model/LatLng;

    invoke-direct {v1, v5, v6, v2, v3}, Lcom/amap/api/maps2d/model/LatLng;-><init>(DD)V

    invoke-direct {p0, v1, p1}, Lcom/moji/mjweather/aqi/presenter/AqiMapPresenter;->a(Lcom/amap/api/maps2d/model/LatLng;Z)V

    .line 58
    invoke-direct {p0, v0}, Lcom/moji/mjweather/aqi/presenter/AqiMapPresenter;->a(Lcom/moji/common/area/AreaInfo;)V

    return-void
.end method

.method protected synthetic b()Ljava/lang/Object;
    .locals 1

    .line 18
    invoke-virtual {p0}, Lcom/moji/mjweather/aqi/presenter/AqiMapPresenter;->a()Lcom/moji/mjweather/aqi/presenter/AqiApi;

    move-result-object v0

    return-object v0
.end method
