.class public Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;
.super Lcom/moji/base/MJPresenter;
.source "AqiCameraSharePresenter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$AqiCameraShareCallback;,
        Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$OnImageDealFinish;,
        Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$ShareImageTask;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/base/MJPresenter<",
        "Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$AqiCameraShareCallback;",
        ">;"
    }
.end annotation


# instance fields
.field b:Lcom/moji/mjweather/aqi/AqiPreviewHelper;

.field c:Lcom/moji/share/entity/ShareContentConfig;

.field d:Lcom/moji/share/MJThirdShareManager;

.field private e:Landroid/app/Activity;

.field private f:Z


# direct methods
.method public constructor <init>(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$AqiCameraShareCallback;Landroid/app/Activity;)V
    .locals 1

    .line 62
    invoke-direct {p0, p1}, Lcom/moji/base/MJPresenter;-><init>(Lcom/moji/base/MJPresenter$ICallback;)V

    const/4 p1, 0x0

    .line 306
    iput-boolean p1, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->f:Z

    .line 63
    iput-object p2, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->e:Landroid/app/Activity;

    .line 64
    new-instance p1, Lcom/moji/mjweather/aqi/AqiPreviewHelper;

    iget-object p2, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->e:Landroid/app/Activity;

    invoke-direct {p1, p2}, Lcom/moji/mjweather/aqi/AqiPreviewHelper;-><init>(Landroid/content/Context;)V

    iput-object p1, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->b:Lcom/moji/mjweather/aqi/AqiPreviewHelper;

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

    iget-object p2, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->e:Landroid/app/Activity;

    const/4 v0, 0x0

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

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

    return-void
.end method

.method static synthetic a(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;)Lcom/moji/base/MJPresenter$ICallback;
    .locals 0

    .line 45
    iget-object p0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->a:Lcom/moji/base/MJPresenter$ICallback;

    return-object p0
.end method

.method static synthetic a(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;Ljava/lang/String;)Lcom/moji/share/entity/ShareContentConfig;
    .locals 0

    .line 45
    invoke-direct {p0, p1}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->a(Ljava/lang/String;)Lcom/moji/share/entity/ShareContentConfig;

    move-result-object p0

    return-object p0
.end method

.method private a(Ljava/lang/String;)Lcom/moji/share/entity/ShareContentConfig;
    .locals 4

    const v0, 0x7f0e051d

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

    move-result-object v0

    const-string v1, ""

    const-string v2, ""

    .line 227
    new-instance v3, Lcom/moji/share/entity/ShareContentConfig$Builder;

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

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

    move-result-object v0

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

    move-result-object p1

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

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

    .line 230
    invoke-virtual {p1, v0, v1}, 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 p1

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

    move-result-object p1

    return-object p1
.end method

.method public static a(Landroid/app/Activity;ILjava/lang/String;Lcom/moji/mjweather/aqi/entity/AqiPreviewInfo;)V
    .locals 2

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

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

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

    const-string v1, "PATH"

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

    const-string p2, "INFO"

    .line 57
    invoke-virtual {v0, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    .line 58
    invoke-virtual {p0, v0, p1}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V

    return-void
.end method

.method private a(Landroid/graphics/Bitmap;)V
    .locals 4

    .line 152
    new-instance v0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$2;

    sget-object v1, Lcom/moji/tool/thread/ThreadPriority;->BACKGROUND:Lcom/moji/tool/thread/ThreadPriority;

    invoke-direct {v0, p0, v1}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$2;-><init>(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;Lcom/moji/tool/thread/ThreadPriority;)V

    sget-object v1, Lcom/moji/tool/thread/ThreadType;->IO_THREAD:Lcom/moji/tool/thread/ThreadType;

    const/4 v2, 0x1

    new-array v2, v2, [Landroid/graphics/Bitmap;

    const/4 v3, 0x0

    aput-object p1, v2, v3

    .line 201
    invoke-virtual {v0, v1, v2}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$2;->a(Lcom/moji/tool/thread/ThreadType;[Ljava/lang/Object;)Lcom/moji/tool/thread/task/MJAsyncTask;

    return-void
.end method

.method static synthetic a(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;Landroid/graphics/Bitmap;)V
    .locals 0

    .line 45
    invoke-direct {p0, p1}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->b(Landroid/graphics/Bitmap;)V

    return-void
.end method

.method static synthetic b(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;)Lcom/moji/base/MJPresenter$ICallback;
    .locals 0

    .line 45
    iget-object p0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->a:Lcom/moji/base/MJPresenter$ICallback;

    return-object p0
.end method

.method private b(Landroid/graphics/Bitmap;)V
    .locals 4

    .line 205
    iget-object v0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->c:Lcom/moji/share/entity/ShareContentConfig;

    if-nez v0, :cond_1

    .line 206
    invoke-virtual {p1}, Landroid/graphics/Bitmap;->isRecycled()Z

    move-result v0

    if-eqz v0, :cond_0

    const-string p1, "\u56fe\u7247\u5904\u7406\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5"

    .line 207
    invoke-static {p1}, Lcom/moji/tool/ToastTool;->a(Ljava/lang/String;)V

    return-void

    .line 210
    :cond_0
    new-instance v0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$ShareImageTask;

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

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

    invoke-direct {v0, p0, v1}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$ShareImageTask;-><init>(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$OnImageDealFinish;)V

    sget-object v1, Lcom/moji/tool/thread/ThreadType;->CPU_THREAD:Lcom/moji/tool/thread/ThreadType;

    const/4 v2, 0x1

    new-array v2, v2, [Landroid/graphics/Bitmap;

    const/4 v3, 0x0

    aput-object p1, v2, v3

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

    :cond_1
    return-void
.end method

.method static synthetic b(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;Landroid/graphics/Bitmap;)V
    .locals 0

    .line 45
    invoke-direct {p0, p1}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->a(Landroid/graphics/Bitmap;)V

    return-void
.end method

.method static synthetic c(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;)Lcom/moji/base/MJPresenter$ICallback;
    .locals 0

    .line 45
    iget-object p0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->a:Lcom/moji/base/MJPresenter$ICallback;

    return-object p0
.end method

.method static synthetic d(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;)Lcom/moji/base/MJPresenter$ICallback;
    .locals 0

    .line 45
    iget-object p0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->a:Lcom/moji/base/MJPresenter$ICallback;

    return-object p0
.end method

.method static synthetic e(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;)Landroid/app/Activity;
    .locals 0

    .line 45
    iget-object p0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->e:Landroid/app/Activity;

    return-object p0
.end method

.method static synthetic f(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;)Lcom/moji/base/MJPresenter$ICallback;
    .locals 0

    .line 45
    iget-object p0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->a:Lcom/moji/base/MJPresenter$ICallback;

    return-object p0
.end method

.method static synthetic g(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;)Lcom/moji/base/MJPresenter$ICallback;
    .locals 0

    .line 45
    iget-object p0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->a:Lcom/moji/base/MJPresenter$ICallback;

    return-object p0
.end method


# virtual methods
.method public a()Landroid/graphics/BitmapFactory$Options;
    .locals 4

    .line 138
    iget-object v0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->e:Landroid/app/Activity;

    invoke-virtual {v0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "PATH"

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

    move-result-object v0

    .line 139
    new-instance v1, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v1}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    const/4 v2, 0x1

    .line 140
    iput-boolean v2, v1, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 141
    invoke-static {v0, v1}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    .line 142
    iget v0, v1, Landroid/graphics/BitmapFactory$Options;->outHeight:I

    iget v3, v1, Landroid/graphics/BitmapFactory$Options;->outWidth:I

    if-le v0, v3, :cond_0

    const/4 v0, 0x0

    .line 143
    iput-boolean v0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->f:Z

    goto :goto_0

    .line 145
    :cond_0
    iput-boolean v2, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->f:Z

    .line 147
    :goto_0
    iget-object v0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->a:Lcom/moji/base/MJPresenter$ICallback;

    check-cast v0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$AqiCameraShareCallback;

    iget-boolean v2, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->f:Z

    invoke-interface {v0, v2}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$AqiCameraShareCallback;->a(Z)V

    return-object v1
.end method

.method public a(II)V
    .locals 2

    .line 73
    new-instance v0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$1;

    sget-object v1, Lcom/moji/tool/thread/ThreadPriority;->BACKGROUND:Lcom/moji/tool/thread/ThreadPriority;

    invoke-direct {v0, p0, v1, p1, p2}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$1;-><init>(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;Lcom/moji/tool/thread/ThreadPriority;II)V

    sget-object p1, Lcom/moji/tool/thread/ThreadType;->IO_THREAD:Lcom/moji/tool/thread/ThreadType;

    const/4 p2, 0x0

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

    .line 131
    invoke-virtual {v0, p1, p2}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$1;->a(Lcom/moji/tool/thread/ThreadType;[Ljava/lang/Object;)Lcom/moji/tool/thread/task/MJAsyncTask;

    return-void
.end method

.method public a(Lcom/moji/share/entity/ShareFromType;Lcom/moji/share/entity/ShareChannelType;Lcom/moji/share/entity/ShareContentConfig;)V
    .locals 2

    .line 236
    iget-object v0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->d:Lcom/moji/share/MJThirdShareManager;

    const/4 v1, 0x0

    invoke-virtual {v0, p1, p2, p3, v1}, Lcom/moji/share/MJThirdShareManager;->a(Lcom/moji/share/entity/ShareFromType;Lcom/moji/share/entity/ShareChannelType;Lcom/moji/share/entity/ShareContentConfig;Z)V

    .line 237
    sget-object p1, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$4;->a:[I

    invoke-virtual {p2}, Lcom/moji/share/entity/ShareChannelType;->ordinal()I

    move-result p2

    aget p1, p1, p2

    packed-switch p1, :pswitch_data_0

    goto :goto_0

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

    move-result-object p1

    sget-object p2, Lcom/moji/statistics/EVENT_TAG;->AQI_PIC_SHARE_CLICK:Lcom/moji/statistics/EVENT_TAG;

    const-string p3, "4"

    invoke-virtual {p1, p2, p3}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    goto :goto_0

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

    move-result-object p1

    sget-object p2, Lcom/moji/statistics/EVENT_TAG;->AQI_PIC_SHARE_CLICK:Lcom/moji/statistics/EVENT_TAG;

    const-string p3, "3"

    invoke-virtual {p1, p2, p3}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    goto :goto_0

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

    move-result-object p1

    sget-object p2, Lcom/moji/statistics/EVENT_TAG;->AQI_PIC_SHARE_CLICK:Lcom/moji/statistics/EVENT_TAG;

    const-string p3, "2"

    invoke-virtual {p1, p2, p3}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    goto :goto_0

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

    move-result-object p1

    sget-object p2, Lcom/moji/statistics/EVENT_TAG;->AQI_PIC_SHARE_CLICK:Lcom/moji/statistics/EVENT_TAG;

    const-string p3, "1"

    invoke-virtual {p1, p2, p3}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;)Lcom/moji/statistics/EventManager;

    :goto_0
    return-void

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_3
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method

.method public b()Lcom/moji/share/entity/ShareContentConfig;
    .locals 1

    .line 220
    iget-object v0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->c:Lcom/moji/share/entity/ShareContentConfig;

    return-object v0
.end method

.method public c()Z
    .locals 1

    .line 309
    iget-boolean v0, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->f:Z

    return v0
.end method
