.class public Lcom/moji/mjweather/aqi/AqiWarnActivity;
.super Lcom/moji/base/MJActivity;
.source "AqiWarnActivity.java"


# annotations
.annotation build Lcom/moji/router/annotation/Router;
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/mjweather/aqi/AqiWarnActivity$ShareImageTask;
    }
.end annotation


# static fields
.field public static final AQI_FROM_WARN:Ljava/lang/String; = "aqi_warn"


# instance fields
.field private a:Landroid/widget/ImageView;

.field private b:Lcom/moji/share/MJThirdShareManager;

.field private c:Ljava/lang/String;

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

.field private j:Landroid/widget/RelativeLayout;

.field private k:Ljava/lang/String;

.field private l:Z

.field private m:Z

.field private n:Ljava/lang/String;


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

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

    const-string v0, ""

    .line 58
    iput-object v0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->c:Ljava/lang/String;

    const-string v0, "w3"

    .line 61
    iput-object v0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->k:Ljava/lang/String;

    const/4 v0, 0x0

    .line 62
    iput-boolean v0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->l:Z

    .line 63
    iput-boolean v0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->m:Z

    return-void
.end method

.method static synthetic a(Lcom/moji/mjweather/aqi/AqiWarnActivity;)Landroid/widget/ImageView;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->a:Landroid/widget/ImageView;

    return-object p0
.end method

.method private a()V
    .locals 4

    .line 135
    invoke-direct {p0}, Lcom/moji/mjweather/aqi/AqiWarnActivity;->b()Lcom/moji/share/entity/ShareContentConfig;

    move-result-object v0

    .line 136
    iget-object v1, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->b:Lcom/moji/share/MJThirdShareManager;

    if-nez v1, :cond_0

    .line 137
    new-instance v1, Lcom/moji/share/MJThirdShareManager;

    const/4 v2, 0x0

    invoke-direct {v1, p0, v2}, Lcom/moji/share/MJThirdShareManager;-><init>(Landroid/app/Activity;Lcom/moji/share/listener/ShareListener;)V

    iput-object v1, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->b:Lcom/moji/share/MJThirdShareManager;

    :cond_0
    if-eqz v0, :cond_1

    .line 140
    iget-object v1, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->b:Lcom/moji/share/MJThirdShareManager;

    sget-object v2, Lcom/moji/share/entity/ShareFromType;->AQIWarn:Lcom/moji/share/entity/ShareFromType;

    const/4 v3, 0x1

    invoke-virtual {v1, v2, v0, v3}, Lcom/moji/share/MJThirdShareManager;->a(Lcom/moji/share/entity/ShareFromType;Lcom/moji/share/entity/ShareContentConfig;Z)V

    :cond_1
    return-void
.end method

.method private b()Lcom/moji/share/entity/ShareContentConfig;
    .locals 5

    const v0, 0x7f0e00e0

    .line 147
    invoke-static {v0}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;

    move-result-object v0

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

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

    invoke-virtual {p0}, Lcom/moji/mjweather/aqi/AqiWarnActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v2

    const-string v3, "share"

    invoke-static {v2, v3}, Lcom/moji/tool/FileTool;->a(Landroid/content/Context;Ljava/lang/String;)Ljava/io/File;

    move-result-object v2

    invoke-virtual {v2}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v2

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

    const-string v2, "/aqi_warn.png"

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

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

    move-result-object v1

    const v2, 0x7f0e051d

    .line 149
    invoke-static {v2}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;

    move-result-object v2

    .line 150
    new-instance v3, Ljava/lang/StringBuilder;

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

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

    .line 151
    new-instance v0, Lcom/moji/mjweather/aqi/AqiWarnActivity$ShareImageTask;

    invoke-direct {v0, p0, v1}, Lcom/moji/mjweather/aqi/AqiWarnActivity$ShareImageTask;-><init>(Lcom/moji/mjweather/aqi/AqiWarnActivity;Ljava/lang/String;)V

    .line 152
    sget-object v2, Lcom/moji/tool/thread/ThreadType;->IO_THREAD:Lcom/moji/tool/thread/ThreadType;

    const/4 v4, 0x0

    new-array v4, v4, [Ljava/lang/Void;

    invoke-virtual {v0, v2, v4}, Lcom/moji/mjweather/aqi/AqiWarnActivity$ShareImageTask;->a(Lcom/moji/tool/thread/ThreadType;[Ljava/lang/Object;)Lcom/moji/tool/thread/task/MJAsyncTask;

    .line 153
    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    .line 154
    new-instance v2, Lcom/moji/share/entity/ShareContentConfig$Builder;

    iget-object v4, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->n:Ljava/lang/String;

    invoke-direct {v2, v4, v0}, Lcom/moji/share/entity/ShareContentConfig$Builder;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 156
    invoke-virtual {v2, v1}, Lcom/moji/share/entity/ShareContentConfig$Builder;->c(Ljava/lang/String;)Lcom/moji/share/entity/ShareContentConfig$Builder;

    move-result-object v0

    sget-object v1, Lcom/moji/share/entity/ShareChannelType;->WX_FRIEND:Lcom/moji/share/entity/ShareChannelType;

    sget-object v4, Lcom/moji/share/entity/ShareContentType;->PIC:Lcom/moji/share/entity/ShareContentType;

    .line 157
    invoke-virtual {v0, v1, v4}, Lcom/moji/share/entity/ShareContentConfig$Builder;->a(Lcom/moji/share/entity/ShareChannelType;Lcom/moji/share/entity/ShareContentType;)Lcom/moji/share/entity/ShareContentConfig$Builder;

    move-result-object v0

    const-string v1, "\uff1a"

    .line 158
    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->c:Ljava/lang/String;

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

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

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/moji/share/entity/ShareContentConfig$Builder;->m(Ljava/lang/String;)Lcom/moji/share/entity/ShareContentConfig$Builder;

    .line 159
    invoke-virtual {v2}, Lcom/moji/share/entity/ShareContentConfig$Builder;->a()Lcom/moji/share/entity/ShareContentConfig;

    move-result-object v0

    return-object v0
.end method

.method static synthetic b(Lcom/moji/mjweather/aqi/AqiWarnActivity;)V
    .locals 0

    .line 52
    invoke-direct {p0}, Lcom/moji/mjweather/aqi/AqiWarnActivity;->a()V

    return-void
.end method

.method static synthetic c(Lcom/moji/mjweather/aqi/AqiWarnActivity;)Z
    .locals 0

    .line 52
    iget-boolean p0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->l:Z

    return p0
.end method

.method static synthetic d(Lcom/moji/mjweather/aqi/AqiWarnActivity;)Z
    .locals 0

    .line 52
    iget-boolean p0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->m:Z

    return p0
.end method

.method static synthetic e(Lcom/moji/mjweather/aqi/AqiWarnActivity;)Lcom/moji/titlebar/MJTitleBar;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->i:Lcom/moji/titlebar/MJTitleBar;

    return-object p0
.end method

.method static synthetic f(Lcom/moji/mjweather/aqi/AqiWarnActivity;)Landroid/widget/RelativeLayout;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->j:Landroid/widget/RelativeLayout;

    return-object p0
.end method

.method static synthetic g(Lcom/moji/mjweather/aqi/AqiWarnActivity;)Lcom/moji/share/MJThirdShareManager;
    .locals 0

    .line 52
    iget-object p0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->b:Lcom/moji/share/MJThirdShareManager;

    return-object p0
.end method

.method public static start(Landroid/content/Context;Ljava/lang/String;)V
    .locals 2

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

    move-result v0

    if-eqz v0, :cond_0

    const p1, 0x7f0e00e2

    invoke-static {p1}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;

    move-result-object p1

    .line 222
    :cond_0
    new-instance v0, Landroid/content/Intent;

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

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

    const-string v1, "pollution_remind"

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

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

    return-void
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .locals 4

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

    const p1, 0x7f0b0019

    .line 70
    invoke-virtual {p0, p1}, Lcom/moji/mjweather/aqi/AqiWarnActivity;->setContentView(I)V

    const p1, 0x7f0900ae

    .line 71
    invoke-virtual {p0, p1}, Lcom/moji/mjweather/aqi/AqiWarnActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/ImageView;

    iput-object p1, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->a:Landroid/widget/ImageView;

    const p1, 0x7f09008a

    .line 72
    invoke-virtual {p0, p1}, Lcom/moji/mjweather/aqi/AqiWarnActivity;->a(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/widget/RelativeLayout;

    iput-object p1, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->j:Landroid/widget/RelativeLayout;

    .line 73
    invoke-virtual {p0}, Lcom/moji/mjweather/aqi/AqiWarnActivity;->getIntent()Landroid/content/Intent;

    move-result-object p1

    if-eqz p1, :cond_2

    const-string v0, "pollution_remind"

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

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->c:Ljava/lang/String;

    .line 76
    iget-object v0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->c:Ljava/lang/String;

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

    move-result v0

    if-nez v0, :cond_0

    const v0, 0x7f0901ae

    .line 77
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/aqi/AqiWarnActivity;->a(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iget-object v1, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->c:Ljava/lang/String;

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

    .line 79
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->k:Ljava/lang/String;

    const-string v1, "ids"

    invoke-virtual {p1, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

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

    move-result v0

    const/4 v1, 0x1

    if-eqz v0, :cond_1

    .line 80
    iput-boolean v1, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->l:Z

    .line 81
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v2, Lcom/moji/statistics/EVENT_TAG;->FEEDBACK_ALERT_CLICK:Lcom/moji/statistics/EVENT_TAG;

    const-string v3, "2"

    invoke-virtual {v0, v2, v3}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    :cond_1
    const-string v0, "show_aqi"

    const/4 v2, 0x0

    .line 83
    invoke-virtual {p1, v0, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result p1

    if-ne v1, p1, :cond_2

    .line 84
    iput-boolean v1, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->m:Z

    .line 88
    :cond_2
    invoke-static {}, Lcom/moji/weathersence/MJSceneManager;->a()Lcom/moji/weathersence/MJSceneManager;

    move-result-object p1

    invoke-virtual {p1}, Lcom/moji/weathersence/MJSceneManager;->k()Landroid/net/Uri;

    move-result-object p1

    new-instance v0, Lcom/moji/mjweather/aqi/AqiWarnActivity$1;

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

    invoke-static {p1, v0}, Lcom/moji/tool/ImageTool;->a(Landroid/net/Uri;Lcom/squareup/picasso/Target;)V

    const p1, 0x7f09094f

    .line 100
    invoke-virtual {p0, p1}, Lcom/moji/mjweather/aqi/AqiWarnActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

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

    iput-object p1, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->i:Lcom/moji/titlebar/MJTitleBar;

    const p1, 0x7f0e0067

    .line 101
    invoke-static {p1}, Lcom/moji/base/AqiValueProvider;->b(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->n:Ljava/lang/String;

    .line 102
    iget-object v0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->i:Lcom/moji/titlebar/MJTitleBar;

    iget-object v1, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->n:Ljava/lang/String;

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->setTitleText(Ljava/lang/CharSequence;)V

    .line 103
    iget-object v0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->i:Lcom/moji/titlebar/MJTitleBar;

    new-instance v1, Lcom/moji/mjweather/aqi/AqiWarnActivity$2;

    const v2, 0x7f0806cb

    invoke-direct {v1, p0, v2}, Lcom/moji/mjweather/aqi/AqiWarnActivity$2;-><init>(Lcom/moji/mjweather/aqi/AqiWarnActivity;I)V

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->a(Lcom/moji/titlebar/MJTitleBar$Action;)Landroid/view/View;

    .line 109
    iget-object v0, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->i:Lcom/moji/titlebar/MJTitleBar;

    new-instance v1, Lcom/moji/mjweather/aqi/AqiWarnActivity$3;

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

    invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->setOnClickBackListener(Lcom/moji/titlebar/MJTitleBar$OnClickBack;)V

    const v0, 0x7f090476

    .line 122
    invoke-virtual {p0, v0}, Lcom/moji/mjweather/aqi/AqiWarnActivity;->a(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    .line 123
    invoke-static {p1}, Lcom/moji/base/AqiValueProvider;->b(I)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v0, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    const p1, 0x7f090273

    .line 126
    invoke-virtual {p0, p1}, Lcom/moji/mjweather/aqi/AqiWarnActivity;->a(I)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    const v0, 0x7f0e00e1

    .line 127
    invoke-static {v0}, Lcom/moji/base/AqiValueProvider;->b(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 131
    new-instance p1, Lcom/moji/share/MJThirdShareManager;

    const/4 v0, 0x0

    invoke-direct {p1, p0, v0}, Lcom/moji/share/MJThirdShareManager;-><init>(Landroid/app/Activity;Lcom/moji/share/listener/ShareListener;)V

    iput-object p1, p0, Lcom/moji/mjweather/aqi/AqiWarnActivity;->b:Lcom/moji/share/MJThirdShareManager;

    return-void
.end method
