今奥全景相机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

493 lines
13 KiB

.class public Lcom/viatech/gallery/BaseUploadController$UploadBean;
.super Ljava/lang/Object;
.source "BaseUploadController.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/viatech/gallery/BaseUploadController;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = "UploadBean"
.end annotation
# instance fields
.field protected mBucket:Ljava/lang/String;
.field protected mEndpoint:Ljava/lang/String;
.field protected mFileInfo:Lcom/viatech/gallery/FileInfo;
.field private mIUpload:Lcom/viatech/gallery/BaseUploadController$IUpload;
.field private mProgressBar:Landroid/widget/ProgressBar;
.field private mProgressText:Ljava/lang/String;
.field private mProgressTextView:Landroid/widget/TextView;
.field protected mType:I
.field protected mUploadUrl:Ljava/lang/String;
.field private mUserId:Ljava/lang/String;
.field final synthetic this$0:Lcom/viatech/gallery/BaseUploadController;
# direct methods
.method public constructor <init>(Lcom/viatech/gallery/BaseUploadController;Lcom/viatech/gallery/FileInfo;Ljava/lang/String;I)V
.locals 8
.prologue
const/4 v5, 0x0
.line 193
move-object v0, p0
move-object v1, p1
move-object v2, p2
move-object v3, p3
move v4, p4
move-object v6, v5
move-object v7, v5
invoke-direct/range {v0 .. v7}, Lcom/viatech/gallery/BaseUploadController$UploadBean;-><init>(Lcom/viatech/gallery/BaseUploadController;Lcom/viatech/gallery/FileInfo;Ljava/lang/String;ILandroid/widget/ProgressBar;Landroid/widget/TextView;Ljava/lang/String;)V
.line 194
return-void
.end method
.method public constructor <init>(Lcom/viatech/gallery/BaseUploadController;Lcom/viatech/gallery/FileInfo;Ljava/lang/String;ILandroid/widget/ProgressBar;Landroid/widget/TextView;Ljava/lang/String;)V
.locals 4
.prologue
const/4 v3, 0x0
.line 170
iput-object p1, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->this$0:Lcom/viatech/gallery/BaseUploadController;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 171
if-nez p4, :cond_2
.line 172
invoke-static {}, Lcom/viatech/gallery/FileInfo;->newRandFileName4Photo()Ljava/lang/String;
move-result-object v0
invoke-virtual {p2, v0}, Lcom/viatech/gallery/FileInfo;->setServerFileName(Ljava/lang/String;)V
.line 173
invoke-static {}, Lcom/viatech/Config;->a()Lcom/viatech/Config;
move-result-object v0
iget-object v1, p2, Lcom/viatech/gallery/FileInfo;->name:Ljava/lang/String;
invoke-virtual {v0, v1}, Lcom/viatech/Config;->a(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_0
.line 174
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-static {}, Lcom/viatech/gallery/FileInfo;->newRandFileName4Photo()Ljava/lang/String;
move-result-object v1
invoke-static {}, Lcom/viatech/gallery/FileInfo;->newRandFileName4Photo()Ljava/lang/String;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/String;->length()I
move-result v2
add-int/lit8 v2, v2, -0x4
invoke-virtual {v1, v3, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "_V3D"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, ".jpg"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-virtual {p2, v0}, Lcom/viatech/gallery/FileInfo;->setServerFileName(Ljava/lang/String;)V
.line 176
:cond_0
invoke-virtual {p2}, Lcom/viatech/gallery/FileInfo;->createThumbnail()V
.line 184
:cond_1
:goto_0
iput-object p5, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressBar:Landroid/widget/ProgressBar;
.line 185
iput-object p6, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressTextView:Landroid/widget/TextView;
.line 186
iput-object p7, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressText:Ljava/lang/String;
.line 187
iput-object p2, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mFileInfo:Lcom/viatech/gallery/FileInfo;
.line 188
iput-object p3, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mUserId:Ljava/lang/String;
.line 189
iput p4, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mType:I
.line 190
return-void
.line 177
:cond_2
const/4 v0, 0x3
if-ne p4, v0, :cond_1
.line 178
invoke-static {}, Lcom/viatech/gallery/FileInfo;->newRandFileName4EditVideo()Ljava/lang/String;
move-result-object v0
iput-object v0, p2, Lcom/viatech/gallery/FileInfo;->serverFileName:Ljava/lang/String;
.line 179
invoke-static {}, Lcom/viatech/Config;->a()Lcom/viatech/Config;
move-result-object v0
iget-object v1, p2, Lcom/viatech/gallery/FileInfo;->name:Ljava/lang/String;
invoke-virtual {v0, v1}, Lcom/viatech/Config;->a(Ljava/lang/String;)Z
move-result v0
if-eqz v0, :cond_3
.line 180
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
iget-object v1, p2, Lcom/viatech/gallery/FileInfo;->serverFileName:Ljava/lang/String;
iget-object v2, p2, Lcom/viatech/gallery/FileInfo;->serverFileName:Ljava/lang/String;
invoke-virtual {v2}, Ljava/lang/String;->length()I
move-result v2
add-int/lit8 v2, v2, -0x4
invoke-virtual {v1, v3, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "_V3D"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, ".mp4"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
iput-object v0, p2, Lcom/viatech/gallery/FileInfo;->serverFileName:Ljava/lang/String;
.line 182
:cond_3
iget-object v0, p2, Lcom/viatech/gallery/FileInfo;->serverFileName:Ljava/lang/String;
const-string v1, ".mp4"
const-string v2, "_thumb.jpg"
invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
move-result-object v0
iput-object v0, p2, Lcom/viatech/gallery/FileInfo;->serverThumbnailFileName:Ljava/lang/String;
goto :goto_0
.end method
.method static synthetic access$300(Lcom/viatech/gallery/BaseUploadController$UploadBean;)Lcom/viatech/gallery/BaseUploadController$IUpload;
.locals 1
.prologue
.line 158
iget-object v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mIUpload:Lcom/viatech/gallery/BaseUploadController$IUpload;
return-object v0
.end method
.method static synthetic access$302(Lcom/viatech/gallery/BaseUploadController$UploadBean;Lcom/viatech/gallery/BaseUploadController$IUpload;)Lcom/viatech/gallery/BaseUploadController$IUpload;
.locals 0
.prologue
.line 158
iput-object p1, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mIUpload:Lcom/viatech/gallery/BaseUploadController$IUpload;
return-object p1
.end method
.method static synthetic access$500(Lcom/viatech/gallery/BaseUploadController$UploadBean;)Ljava/lang/String;
.locals 1
.prologue
.line 158
iget-object v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mUserId:Ljava/lang/String;
return-object v0
.end method
# virtual methods
.method public getFileName()Ljava/lang/String;
.locals 2
.prologue
.line 199
iget v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mType:I
const/4 v1, 0x3
if-eq v0, v1, :cond_0
iget v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mType:I
if-nez v0, :cond_1
.line 200
:cond_0
iget-object v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mFileInfo:Lcom/viatech/gallery/FileInfo;
iget-object v0, v0, Lcom/viatech/gallery/FileInfo;->serverThumbnailFileName:Ljava/lang/String;
.line 203
:goto_0
return-object v0
.line 202
:cond_1
iget-object v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mFileInfo:Lcom/viatech/gallery/FileInfo;
iget-object v0, v0, Lcom/viatech/gallery/FileInfo;->serverFileName:Ljava/lang/String;
goto :goto_0
.end method
.method public getFilePath()Ljava/lang/String;
.locals 2
.prologue
.line 223
iget v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mType:I
const/4 v1, 0x3
if-eq v0, v1, :cond_0
iget v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mType:I
if-nez v0, :cond_1
.line 224
:cond_0
iget-object v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mFileInfo:Lcom/viatech/gallery/FileInfo;
iget-object v0, v0, Lcom/viatech/gallery/FileInfo;->thumbnailPath:Ljava/lang/String;
.line 229
:goto_0
return-object v0
.line 225
:cond_1
iget v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mType:I
const/4 v1, 0x1
if-ne v0, v1, :cond_2
.line 226
iget-object v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mFileInfo:Lcom/viatech/gallery/FileInfo;
invoke-virtual {v0}, Lcom/viatech/gallery/FileInfo;->getFullPath()Ljava/lang/String;
move-result-object v0
goto :goto_0
.line 228
:cond_2
iget-object v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mFileInfo:Lcom/viatech/gallery/FileInfo;
iget-object v0, v0, Lcom/viatech/gallery/FileInfo;->path:Ljava/lang/String;
goto :goto_0
.end method
.method public progress()V
.locals 6
.prologue
const/16 v5, 0x64
.line 215
iget-object v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressBar:Landroid/widget/ProgressBar;
if-eqz v0, :cond_0
.line 216
iget-object v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressBar:Landroid/widget/ProgressBar;
invoke-virtual {v0, v5}, Landroid/widget/ProgressBar;->setProgress(I)V
.line 217
:cond_0
iget-object v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressTextView:Landroid/widget/TextView;
if-eqz v0, :cond_1
.line 218
iget-object v0, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressTextView:Landroid/widget/TextView;
const-string v1, "%s%d%%"
const/4 v2, 0x2
new-array v2, v2, [Ljava/lang/Object;
const/4 v3, 0x0
iget-object v4, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressText:Ljava/lang/String;
aput-object v4, v2, v3
const/4 v3, 0x1
invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v2, v3
invoke-static {v1, v2}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 219
:cond_1
return-void
.end method
.method public progress(JJ)V
.locals 7
.prologue
.line 207
const-wide/16 v0, 0x64
mul-long/2addr v0, p1
div-long/2addr v0, p3
long-to-int v0, v0
.line 208
iget-object v1, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressBar:Landroid/widget/ProgressBar;
if-eqz v1, :cond_0
.line 209
iget-object v1, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressBar:Landroid/widget/ProgressBar;
invoke-virtual {v1, v0}, Landroid/widget/ProgressBar;->setProgress(I)V
.line 210
:cond_0
iget-object v1, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressTextView:Landroid/widget/TextView;
if-eqz v1, :cond_1
.line 211
iget-object v1, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressTextView:Landroid/widget/TextView;
const-string v2, "%s%d%%"
const/4 v3, 0x2
new-array v3, v3, [Ljava/lang/Object;
const/4 v4, 0x0
iget-object v5, p0, Lcom/viatech/gallery/BaseUploadController$UploadBean;->mProgressText:Ljava/lang/String;
aput-object v5, v3, v4
const/4 v4, 0x1
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
aput-object v0, v3, v4
invoke-static {v2, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 212
:cond_1
return-void
.end method