.class Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$2;
.super Lcom/moji/tool/thread/task/MJAsyncTask;
.source "AqiCameraSharePresenter.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->a(Landroid/graphics/Bitmap;)V
.end annotation

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

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/tool/thread/task/MJAsyncTask<",
        "Landroid/graphics/Bitmap;",
        "Ljava/lang/Void;",
        "Ljava/lang/Boolean;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic a:Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;


# direct methods
.method constructor <init>(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;Lcom/moji/tool/thread/ThreadPriority;)V
    .locals 0

    .line 152
    iput-object p1, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$2;->a:Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;

    invoke-direct {p0, p2}, Lcom/moji/tool/thread/task/MJAsyncTask;-><init>(Lcom/moji/tool/thread/ThreadPriority;)V

    return-void
.end method


# virtual methods
.method protected varargs a([Landroid/graphics/Bitmap;)Ljava/lang/Boolean;
    .locals 5

    const/4 v0, 0x0

    :try_start_0
    const-string v1, "camera_aqi_water.jpg"

    .line 175
    invoke-static {v1}, Lcom/moji/tool/FilePathUtil;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    .line 176
    aget-object p1, p1, v0

    .line 177
    new-instance v2, Ljava/io/File;

    invoke-direct {v2, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 179
    new-instance v1, Ljava/io/FileOutputStream;

    invoke-direct {v1, v2}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V

    .line 180
    sget-object v3, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat;

    const/16 v4, 0x64

    invoke-virtual {p1, v3, v4, v1}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 181
    invoke-virtual {v1}, Ljava/io/FileOutputStream;->close()V

    .line 183
    new-instance p1, Ljava/io/File;

    new-instance v1, Ljava/lang/StringBuilder;

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

    invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File;

    move-result-object v3

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

    move-result-object v3

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

    const-string v3, "/DCIM/Camera"

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

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

    move-result-object v1

    invoke-direct {p1, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

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

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

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

    move-result-object v3

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

    const-string v3, "/"

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

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v3

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

    const-string v3, ".jpg"

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

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

    move-result-object v1

    .line 185
    invoke-virtual {p1}, Ljava/io/File;->mkdirs()Z

    .line 187
    new-instance p1, Ljava/io/File;

    invoke-direct {p1, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 188
    invoke-virtual {p1}, Ljava/io/File;->createNewFile()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 189
    invoke-static {v2, p1}, Lcom/moji/tool/FileTool;->a(Ljava/io/File;Ljava/io/File;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 191
    invoke-static {p1}, Lcom/moji/tool/ImageTool;->b(Ljava/io/File;)V

    const-string v1, "===="

    .line 192
    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "file save success "

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

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

    move-result-object p1

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

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

    move-result-object p1

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

    :cond_0
    const/4 p1, 0x1

    .line 195
    invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p1
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    return-object p1

    :catch_0
    move-exception p1

    const-string v1, "AqiCameraSharePresenter"

    .line 197
    invoke-static {v1, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 198
    invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object p1

    return-object p1
.end method

.method protected bridge synthetic a([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 0

    .line 152
    check-cast p1, [Landroid/graphics/Bitmap;

    invoke-virtual {p0, p1}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$2;->a([Landroid/graphics/Bitmap;)Ljava/lang/Boolean;

    move-result-object p1

    return-object p1
.end method

.method protected a()V
    .locals 0

    .line 157
    invoke-super {p0}, Lcom/moji/tool/thread/task/MJAsyncTask;->a()V

    return-void
.end method

.method protected a(Ljava/lang/Boolean;)V
    .locals 1

    .line 162
    invoke-super {p0, p1}, Lcom/moji/tool/thread/task/MJAsyncTask;->a(Ljava/lang/Object;)V

    .line 163
    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result p1

    if-eqz p1, :cond_0

    .line 164
    iget-object p1, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$2;->a:Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->f(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;)Lcom/moji/base/MJPresenter$ICallback;

    move-result-object p1

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

    invoke-interface {p1}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$AqiCameraShareCallback;->c()V

    const-string p1, "AqiCameraSharePresenter"

    const-string v0, "onPostExecute: \u4fdd\u5b58\u5230\u76f8\u518c\u6210\u529f"

    .line 165
    invoke-static {p1, v0}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_0

    .line 167
    :cond_0
    iget-object p1, p0, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$2;->a:Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;

    invoke-static {p1}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;->g(Lcom/moji/mjweather/aqi/AqiCameraSharePresenter;)Lcom/moji/base/MJPresenter$ICallback;

    move-result-object p1

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

    invoke-interface {p1}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$AqiCameraShareCallback;->d()V

    const-string p1, "AqiCameraSharePresenter"

    const-string v0, "onPostExecute: \u4fdd\u5b58\u5230\u76f8\u518c\u5931\u8d25 "

    .line 168
    invoke-static {p1, v0}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V

    :goto_0
    return-void
.end method

.method protected bridge synthetic a(Ljava/lang/Object;)V
    .locals 0

    .line 152
    check-cast p1, Ljava/lang/Boolean;

    invoke-virtual {p0, p1}, Lcom/moji/mjweather/aqi/AqiCameraSharePresenter$2;->a(Ljava/lang/Boolean;)V

    return-void
.end method
