.class public Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;
.super Lcom/moji/tool/thread/task/MJAsyncTask;
.source "BaseAqiPresenter.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x4
    name = "ShareImageTask"
.end annotation

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


# instance fields
.field a:Lcom/moji/titlebar/MJTitleBar;

.field b:Ljava/lang/String;

.field c:Landroid/graphics/Bitmap;

.field d:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/moji/share/ShareImageManager$BitmapCompose;",
            ">;"
        }
    .end annotation
.end field

.field e:Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$OnImageDealFinish;

.field f:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/moji/viewcontrol/MJViewControl;",
            ">;"
        }
    .end annotation
.end field

.field final synthetic g:Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter;


# direct methods
.method public constructor <init>(Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter;Ljava/lang/String;Lcom/moji/titlebar/MJTitleBar;Ljava/util/List;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Lcom/moji/titlebar/MJTitleBar;",
            "Ljava/util/List<",
            "Lcom/moji/share/ShareImageManager$BitmapCompose;",
            ">;)V"
        }
    .end annotation

    .line 89
    iput-object p1, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->g:Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter;

    .line 90
    sget-object p1, Lcom/moji/tool/thread/ThreadPriority;->REAL_TIME:Lcom/moji/tool/thread/ThreadPriority;

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

    .line 83
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->f:Ljava/util/List;

    .line 91
    iput-object p2, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->b:Ljava/lang/String;

    .line 92
    iput-object p3, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->a:Lcom/moji/titlebar/MJTitleBar;

    .line 93
    iput-object p4, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->d:Ljava/util/List;

    return-void
.end method


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

    .line 77
    check-cast p1, [Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->a([Ljava/lang/Void;)Ljava/lang/Void;

    move-result-object p1

    return-object p1
.end method

.method protected varargs a([Ljava/lang/Void;)Ljava/lang/Void;
    .locals 6

    .line 135
    iget-object p1, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->d:Ljava/util/List;

    invoke-static {p1}, Lcom/moji/share/ShareImageManager;->a(Ljava/util/List;)Landroid/graphics/Bitmap;

    move-result-object v1

    .line 136
    new-instance p1, Lcom/moji/share/image/ShareImageControl;

    invoke-static {}, Lcom/moji/weathersence/MJSceneManager;->a()Lcom/moji/weathersence/MJSceneManager;

    move-result-object v0

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

    move-result-object v3

    iget-object v5, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->b:Ljava/lang/String;

    const v2, 0x7f060059

    const/4 v4, 0x0

    move-object v0, p1

    invoke-direct/range {v0 .. v5}, Lcom/moji/share/image/ShareImageControl;-><init>(Landroid/graphics/Bitmap;ILandroid/net/Uri;ZLjava/lang/String;)V

    .line 137
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->g:Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter;

    invoke-static {v0}, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter;->b(Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter;)Landroid/content/Context;

    move-result-object v0

    invoke-static {v0, p1}, Lcom/moji/share/ShareImageManager;->a(Landroid/content/Context;Lcom/moji/share/image/ShareImageControl;)Z

    const-string p1, "BaseAqiPresenter"

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

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

    const-string v1, "\u622a\u56fe\u6210\u529f \u4fdd\u5b58\u5230 mImgPath "

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

    iget-object v1, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->b:Ljava/lang/String;

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

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

    move-result-object v0

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

    const/4 p1, 0x0

    return-object p1
.end method

.method protected a()V
    .locals 5

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

    .line 100
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->a:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {v0}, Lcom/moji/titlebar/MJTitleBar;->f()V

    .line 101
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->a:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {v0}, Lcom/moji/titlebar/MJTitleBar;->h()V

    .line 103
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->a:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {v0}, Lcom/moji/titlebar/MJTitleBar;->destroyDrawingCache()V

    .line 104
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->a:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {v0}, Lcom/moji/titlebar/MJTitleBar;->buildDrawingCache()V

    .line 105
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->a:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {v0}, Lcom/moji/titlebar/MJTitleBar;->getDrawingCache()Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->c:Landroid/graphics/Bitmap;

    .line 106
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->a:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {v0}, Lcom/moji/titlebar/MJTitleBar;->getStatusBarHeight()I

    move-result v0

    const/4 v1, 0x0

    if-lez v0, :cond_0

    .line 108
    iget-object v2, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->c:Landroid/graphics/Bitmap;

    iget-object v3, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->c:Landroid/graphics/Bitmap;

    invoke-virtual {v3}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v3

    iget-object v4, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->c:Landroid/graphics/Bitmap;

    invoke-virtual {v4}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v4

    sub-int/2addr v4, v0

    invoke-static {v2, v1, v0, v3, v4}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIII)Landroid/graphics/Bitmap;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->c:Landroid/graphics/Bitmap;

    .line 110
    :cond_0
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->d:Ljava/util/List;

    iget-object v2, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->c:Landroid/graphics/Bitmap;

    invoke-static {v2}, Lcom/moji/share/ShareImageManager$BitmapCompose;->a(Landroid/graphics/Bitmap;)Lcom/moji/share/ShareImageManager$BitmapCompose;

    move-result-object v2

    invoke-interface {v0, v1, v2}, Ljava/util/List;->add(ILjava/lang/Object;)V

    .line 111
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->f:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/moji/viewcontrol/MJViewControl;

    .line 112
    invoke-virtual {v1}, Lcom/moji/viewcontrol/MJViewControl;->destroyShareBitmap()V

    goto :goto_0

    .line 115
    :cond_1
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->a:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {v0}, Lcom/moji/titlebar/MJTitleBar;->i()V

    .line 116
    iget-object v0, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->a:Lcom/moji/titlebar/MJTitleBar;

    invoke-virtual {v0}, Lcom/moji/titlebar/MJTitleBar;->j()V

    return-void
.end method

.method public a(Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$OnImageDealFinish;)V
    .locals 0

    .line 86
    iput-object p1, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->e:Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$OnImageDealFinish;

    return-void
.end method

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

    .line 77
    check-cast p1, Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->a(Ljava/lang/Void;)V

    return-void
.end method

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

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

    .line 123
    iget-object p1, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->g:Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter;

    iget-object p1, p1, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter;->d:Lcom/moji/share/MJThirdShareManager;

    if-eqz p1, :cond_0

    .line 124
    iget-object p1, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->g:Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter;

    iget-object p1, p1, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter;->d:Lcom/moji/share/MJThirdShareManager;

    const/4 v0, 0x1

    invoke-virtual {p1, v0}, Lcom/moji/share/MJThirdShareManager;->a(Z)V

    .line 127
    :cond_0
    iget-object p1, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->e:Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$OnImageDealFinish;

    if-eqz p1, :cond_1

    .line 128
    iget-object p1, p0, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$ShareImageTask;->e:Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$OnImageDealFinish;

    invoke-interface {p1}, Lcom/moji/mjweather/aqi/presenter/BaseAqiPresenter$OnImageDealFinish;->a()V

    :cond_1
    return-void
.end method
