.class Lcom/moji/forum/ui/TopicActivity$22;
.super Lcom/moji/tool/thread/task/MJAsyncTask;
.source "TopicActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/forum/ui/TopicActivity;->a(JLjava/lang/String;)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<",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        "Ljava/lang/String;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic a:J

.field final synthetic b:Ljava/lang/String;

.field final synthetic c:Lcom/moji/forum/ui/TopicActivity;

.field private d:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/moji/http/ugc/bean/ImageInfo;",
            ">;"
        }
    .end annotation
.end field

.field private e:Ljava/lang/String;


# direct methods
.method constructor <init>(Lcom/moji/forum/ui/TopicActivity;Lcom/moji/tool/thread/ThreadPriority;JLjava/lang/String;)V
    .locals 0

    .line 1705
    iput-object p1, p0, Lcom/moji/forum/ui/TopicActivity$22;->c:Lcom/moji/forum/ui/TopicActivity;

    iput-wide p3, p0, Lcom/moji/forum/ui/TopicActivity$22;->a:J

    iput-object p5, p0, Lcom/moji/forum/ui/TopicActivity$22;->b:Ljava/lang/String;

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

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

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

    iput-object p1, p0, Lcom/moji/forum/ui/TopicActivity$22;->d:Ljava/util/List;

    const-string p1, ""

    .line 1707
    iput-object p1, p0, Lcom/moji/forum/ui/TopicActivity$22;->e:Ljava/lang/String;

    return-void
.end method


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

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

    invoke-virtual {p0, p1}, Lcom/moji/forum/ui/TopicActivity$22;->a([Ljava/lang/Void;)Ljava/lang/String;

    move-result-object p1

    return-object p1
.end method

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

    .line 1740
    :try_start_0
    iget-object p1, p0, Lcom/moji/forum/ui/TopicActivity$22;->d:Ljava/util/List;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result p1

    if-eqz p1, :cond_3

    const/4 p1, 0x0

    .line 1747
    :goto_0
    iget-object v0, p0, Lcom/moji/forum/ui/TopicActivity$22;->d:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-ge p1, v0, :cond_3

    .line 1748
    sget-object v0, Lcom/moji/forum/common/Constants;->k:Ljava/lang/String;

    invoke-static {v0}, Lcom/moji/forum/common/ForumUtil;->c(Ljava/lang/String;)Z

    .line 1749
    iget-object v0, p0, Lcom/moji/forum/ui/TopicActivity$22;->d:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/moji/http/ugc/bean/ImageInfo;

    iget-object v0, v0, Lcom/moji/http/ugc/bean/ImageInfo;->filePath:Ljava/lang/String;

    sget-object v1, Lcom/moji/forum/common/Constants;->k:Ljava/lang/String;

    invoke-static {v0, v1}, Lcom/moji/forum/common/ForumUtil;->b(Ljava/lang/String;Ljava/lang/String;)Landroid/graphics/Bitmap;

    .line 1753
    new-instance v0, Lcom/moji/http/upload/UploadImage;

    new-instance v1, Ljava/io/File;

    sget-object v2, Lcom/moji/forum/common/Constants;->k:Ljava/lang/String;

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

    const-string v2, "http://ugcup.moji001.com/share/mqup"

    invoke-direct {v0, v1, v2}, Lcom/moji/http/upload/UploadImage;-><init>(Ljava/io/File;Ljava/lang/String;)V

    invoke-virtual {v0}, Lcom/moji/http/upload/UploadImage;->f()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

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

    move-result v1

    const/4 v2, 0x0

    if-nez v1, :cond_2

    const-string v1, "lll"

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

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

    const-string v4, "doInBackground:"

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

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

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

    move-result-object v3

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

    .line 1758
    invoke-static {v0}, Lcom/moji/forum/common/ForumUtil;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    const-string v1, ".jpg"

    .line 1759
    invoke-virtual {v0, v1}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

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

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

    const/4 v2, 0x1

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

    .line 1762
    sget-object v3, Lcom/moji/forum/common/Constants;->k:Ljava/lang/String;

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

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

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

    .line 1765
    iget-object v4, p0, Lcom/moji/forum/ui/TopicActivity$22;->d:Ljava/util/List;

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v4

    sub-int/2addr v4, v2

    if-eq p1, v4, :cond_0

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

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

    iget-object v4, p0, Lcom/moji/forum/ui/TopicActivity$22;->e:Ljava/lang/String;

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

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

    const-string v0, ","

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

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

    const-string v0, ","

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

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

    const-string v0, ";"

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

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

    move-result-object v0

    iput-object v0, p0, Lcom/moji/forum/ui/TopicActivity$22;->e:Ljava/lang/String;

    goto :goto_1

    .line 1768
    :cond_0
    new-instance v2, Ljava/lang/StringBuilder;

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

    iget-object v4, p0, Lcom/moji/forum/ui/TopicActivity$22;->e:Ljava/lang/String;

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

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

    const-string v0, ","

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

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

    const-string v0, ","

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

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

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

    move-result-object v0

    iput-object v0, p0, Lcom/moji/forum/ui/TopicActivity$22;->e:Ljava/lang/String;

    :goto_1
    add-int/lit8 p1, p1, 0x1

    goto/16 :goto_0

    :cond_1
    return-object v2

    :cond_2
    return-object v2

    .line 1777
    :cond_3
    iget-object p1, p0, Lcom/moji/forum/ui/TopicActivity$22;->e:Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    return-object p1

    :catch_0
    const-string p1, ""

    return-object p1
.end method

.method protected a()V
    .locals 3

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

    .line 1712
    iget-object v0, p0, Lcom/moji/forum/ui/TopicActivity$22;->c:Lcom/moji/forum/ui/TopicActivity;

    invoke-static {v0}, Lcom/moji/forum/ui/TopicActivity;->G(Lcom/moji/forum/ui/TopicActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_0
    :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/http/ugc/bean/ImageInfo;

    .line 1713
    iget v2, v1, Lcom/moji/http/ugc/bean/ImageInfo;->type:I

    if-nez v2, :cond_0

    .line 1714
    iget-object v2, p0, Lcom/moji/forum/ui/TopicActivity$22;->d:Ljava/util/List;

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

    goto :goto_0

    .line 1718
    :cond_1
    iget-object v0, p0, Lcom/moji/forum/ui/TopicActivity$22;->c:Lcom/moji/forum/ui/TopicActivity;

    invoke-static {v0}, Lcom/moji/forum/ui/TopicActivity;->c(Lcom/moji/forum/ui/TopicActivity;)Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->FOLLOW_PIC_SHOW:Lcom/moji/statistics/EVENT_TAG;

    iget-object v2, p0, Lcom/moji/forum/ui/TopicActivity$22;->d:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v2

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

    return-void
.end method

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

    .line 1705
    check-cast p1, Ljava/lang/String;

    invoke-virtual {p0, p1}, Lcom/moji/forum/ui/TopicActivity$22;->a(Ljava/lang/String;)V

    return-void
.end method

.method protected a(Ljava/lang/String;)V
    .locals 4

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

    .line 1724
    iget-object v0, p0, Lcom/moji/forum/ui/TopicActivity$22;->c:Lcom/moji/forum/ui/TopicActivity;

    invoke-static {v0}, Lcom/moji/forum/ui/TopicActivity;->w(Lcom/moji/forum/ui/TopicActivity;)Z

    move-result v0

    if-eqz v0, :cond_0

    return-void

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

    move-result v0

    if-eqz v0, :cond_2

    .line 1727
    iget-object p1, p0, Lcom/moji/forum/ui/TopicActivity$22;->c:Lcom/moji/forum/ui/TopicActivity;

    invoke-virtual {p1}, Lcom/moji/forum/ui/TopicActivity;->dismissLoadDialog()V

    .line 1728
    iget-object p1, p0, Lcom/moji/forum/ui/TopicActivity$22;->c:Lcom/moji/forum/ui/TopicActivity;

    sget v0, Lcom/moji/forum/R$string;->comment_failed_retry:I

    const/4 v1, 0x1

    invoke-static {p1, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object p1

    invoke-virtual {p1}, Landroid/widget/Toast;->show()V

    .line 1729
    iget-object p1, p0, Lcom/moji/forum/ui/TopicActivity$22;->c:Lcom/moji/forum/ui/TopicActivity;

    invoke-static {p1}, Lcom/moji/forum/ui/TopicActivity;->c(Lcom/moji/forum/ui/TopicActivity;)Lcom/moji/statistics/EventManager;

    move-result-object p1

    sget-object v0, Lcom/moji/statistics/EVENT_TAG;->FOLLOW_CMT_FAILED:Lcom/moji/statistics/EVENT_TAG;

    invoke-virtual {p1, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;

    .line 1730
    iget-object p1, p0, Lcom/moji/forum/ui/TopicActivity$22;->c:Lcom/moji/forum/ui/TopicActivity;

    invoke-static {p1}, Lcom/moji/forum/ui/TopicActivity;->I(Lcom/moji/forum/ui/TopicActivity;)I

    move-result p1

    const/4 v0, 0x3

    if-ne p1, v0, :cond_1

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

    move-result-object p1

    sget-object v0, Lcom/moji/statistics/EVENT_TAG;->THEME_FOLLOW_CMT_FAILED:Lcom/moji/statistics/EVENT_TAG;

    const-string v1, "2"

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

    :cond_1
    return-void

    .line 1734
    :cond_2
    iget-object v0, p0, Lcom/moji/forum/ui/TopicActivity$22;->c:Lcom/moji/forum/ui/TopicActivity;

    iget-wide v1, p0, Lcom/moji/forum/ui/TopicActivity$22;->a:J

    iget-object v3, p0, Lcom/moji/forum/ui/TopicActivity$22;->b:Ljava/lang/String;

    invoke-static {v0, v1, v2, v3, p1}, Lcom/moji/forum/ui/TopicActivity;->a(Lcom/moji/forum/ui/TopicActivity;JLjava/lang/String;Ljava/lang/String;)V

    return-void
.end method
