今奥全景相机
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.

1814 lines
47 KiB

.class public Lcom/viatech/gallery/SendPhotoActivity;
.super Landroid/app/Activity;
.source "SendPhotoActivity.java"
# static fields
.field private static final MSG_UPLOAD_RETRY:I = 0x3e8
.field public static final SHARE_2_FACEBOOK:Ljava/lang/String; = "share_facebook_key"
.field public static final SHARE_2_WEIXIN:Ljava/lang/String; = "share_weixin_key"
.field public static final SHARE_ONLY_KEY:Ljava/lang/String; = "share_only_key"
.field private static final TAG:Ljava/lang/String;
# instance fields
.field private mEditText:Landroid/widget/EditText;
.field mFacebookCallback:Lcom/facebook/FacebookCallback;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/facebook/FacebookCallback",
"<",
"Lcom/facebook/login/LoginResult;",
">;"
}
.end annotation
.end field
.field private mFacebookCallbackManager:Lcom/facebook/CallbackManager;
.field private mFileInfo:Lcom/viatech/gallery/FileInfo;
.field private mFileList:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/viatech/gallery/FileInfo;",
">;"
}
.end annotation
.end field
.field private mHandler:Landroid/os/Handler;
.field private mIsShare2Facebook:Z
.field private mIsShare2Weixin:Z
.field private mNunberTextView:Landroid/widget/TextView;
.field private mShareDialog:Lcom/afollestad/materialdialogs/f;
.field private mShareOnly:Z
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 54
const-class v0, Lcom/viatech/gallery/SendPhotoActivity;
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
return-void
.end method
.method public constructor <init>()V
.locals 1
.prologue
.line 52
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
.line 64
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileList:Ljava/util/ArrayList;
.line 73
new-instance v0, Lcom/viatech/gallery/SendPhotoActivity$1;
invoke-direct {v0, p0}, Lcom/viatech/gallery/SendPhotoActivity$1;-><init>(Lcom/viatech/gallery/SendPhotoActivity;)V
iput-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mHandler:Landroid/os/Handler;
.line 85
new-instance v0, Lcom/viatech/gallery/SendPhotoActivity$2;
invoke-direct {v0, p0}, Lcom/viatech/gallery/SendPhotoActivity$2;-><init>(Lcom/viatech/gallery/SendPhotoActivity;)V
iput-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFacebookCallback:Lcom/facebook/FacebookCallback;
return-void
.end method
.method static synthetic access$000(Lcom/viatech/gallery/SendPhotoActivity;)Lcom/afollestad/materialdialogs/f;
.locals 1
.prologue
.line 52
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mShareDialog:Lcom/afollestad/materialdialogs/f;
return-object v0
.end method
.method static synthetic access$002(Lcom/viatech/gallery/SendPhotoActivity;Lcom/afollestad/materialdialogs/f;)Lcom/afollestad/materialdialogs/f;
.locals 0
.prologue
.line 52
iput-object p1, p0, Lcom/viatech/gallery/SendPhotoActivity;->mShareDialog:Lcom/afollestad/materialdialogs/f;
return-object p1
.end method
.method static synthetic access$100(Lcom/viatech/gallery/SendPhotoActivity;)V
.locals 0
.prologue
.line 52
invoke-direct {p0}, Lcom/viatech/gallery/SendPhotoActivity;->doUpload2Facebook()V
return-void
.end method
.method static synthetic access$200(Lcom/viatech/gallery/SendPhotoActivity;)Landroid/widget/EditText;
.locals 1
.prologue
.line 52
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mEditText:Landroid/widget/EditText;
return-object v0
.end method
.method static synthetic access$300(Lcom/viatech/gallery/SendPhotoActivity;)Landroid/widget/TextView;
.locals 1
.prologue
.line 52
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mNunberTextView:Landroid/widget/TextView;
return-object v0
.end method
.method static synthetic access$400()Ljava/lang/String;
.locals 1
.prologue
.line 52
sget-object v0, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
return-object v0
.end method
.method private doUpload2Facebook()V
.locals 7
.prologue
const/4 v1, 0x1
const/4 v2, 0x0
.line 370
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileList:Ljava/util/ArrayList;
invoke-virtual {v0, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/viatech/gallery/FileInfo;
.line 371
new-instance v3, Ljava/io/File;
invoke-virtual {v0}, Lcom/viatech/gallery/FileInfo;->getFullPath()Ljava/lang/String;
move-result-object v0
invoke-direct {v3, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 372
invoke-static {v3}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;
move-result-object v3
.line 374
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mShareDialog:Lcom/afollestad/materialdialogs/f;
if-nez v0, :cond_1
move v0, v1
.line 375
:goto_0
iget-object v4, p0, Lcom/viatech/gallery/SendPhotoActivity;->mShareDialog:Lcom/afollestad/materialdialogs/f;
if-nez v4, :cond_0
.line 376
new-instance v4, Lcom/afollestad/materialdialogs/f$a;
invoke-direct {v4, p0}, Lcom/afollestad/materialdialogs/f$a;-><init>(Landroid/content/Context;)V
.line 377
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, ""
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
const v6, 0x7f07017f
invoke-virtual {p0, v6}, Lcom/viatech/gallery/SendPhotoActivity;->getString(I)Ljava/lang/String;
move-result-object v6
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
const-string v6, " Facebook"
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-virtual {v4, v5}, Lcom/afollestad/materialdialogs/f$a;->a(Ljava/lang/CharSequence;)Lcom/afollestad/materialdialogs/f$a;
.line 378
sget-object v5, Lcom/afollestad/materialdialogs/h;->b:Lcom/afollestad/materialdialogs/h;
invoke-virtual {v4, v5}, Lcom/afollestad/materialdialogs/f$a;->a(Lcom/afollestad/materialdialogs/h;)Lcom/afollestad/materialdialogs/f$a;
.line 379
invoke-virtual {v4, v2}, Lcom/afollestad/materialdialogs/f$a;->a(Z)Lcom/afollestad/materialdialogs/f$a;
.line 380
const/16 v2, 0x64
invoke-virtual {v4, v1, v2, v1}, Lcom/afollestad/materialdialogs/f$a;->a(ZIZ)Lcom/afollestad/materialdialogs/f$a;
.line 381
invoke-virtual {v4}, Lcom/afollestad/materialdialogs/f$a;->b()Lcom/afollestad/materialdialogs/f;
move-result-object v1
iput-object v1, p0, Lcom/viatech/gallery/SendPhotoActivity;->mShareDialog:Lcom/afollestad/materialdialogs/f;
.line 383
:cond_0
iget-object v1, p0, Lcom/viatech/gallery/SendPhotoActivity;->mShareDialog:Lcom/afollestad/materialdialogs/f;
invoke-virtual {v1}, Lcom/afollestad/materialdialogs/f;->show()V
.line 384
iget-object v1, p0, Lcom/viatech/gallery/SendPhotoActivity;->mShareDialog:Lcom/afollestad/materialdialogs/f;
invoke-virtual {v1}, Lcom/afollestad/materialdialogs/f;->h()Landroid/widget/ProgressBar;
move-result-object v1
.line 385
const/16 v2, 0x8
invoke-virtual {v1, v2}, Landroid/widget/ProgressBar;->setVisibility(I)V
.line 387
iget-object v2, p0, Lcom/viatech/gallery/SendPhotoActivity;->mEditText:Landroid/widget/EditText;
invoke-virtual {v2}, Landroid/widget/EditText;->getText()Landroid/text/Editable;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object v2
new-instance v4, Lcom/viatech/gallery/SendPhotoActivity$6;
invoke-direct {v4, p0, v0, v1}, Lcom/viatech/gallery/SendPhotoActivity$6;-><init>(Lcom/viatech/gallery/SendPhotoActivity;ZLandroid/widget/ProgressBar;)V
invoke-static {v3, v2, p0, v4}, Lcom/viatech/util/SocialShareUtil;->uploadPhoto2Facebook(Landroid/net/Uri;Ljava/lang/String;Landroid/app/Activity;Lcom/viatech/util/SocialShareUtil$OnFacebookUploadCallback;)V
.line 443
return-void
:cond_1
move v0, v2
.line 374
goto :goto_0
.end method
.method private fileSizeMsg(Ljava/lang/String;)Ljava/lang/String;
.locals 12
.prologue
const-wide/16 v10, 0x400
const/high16 v9, 0x4e800000
const/high16 v8, 0x49800000 # 1048576.0f
const/high16 v7, 0x44800000 # 1024.0f
const/4 v6, 0x0
.line 348
new-instance v1, Ljava/io/File;
invoke-direct {v1, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 350
const-string v0, ""
.line 351
invoke-virtual {v1}, Ljava/io/File;->isFile()Z
move-result v2
if-eqz v2, :cond_0
.line 352
invoke-virtual {v1}, Ljava/io/File;->length()J
move-result-wide v2
.line 353
const-wide/32 v4, 0x40000000
cmp-long v1, v2, v4
if-ltz v1, :cond_1
.line 354
long-to-float v0, v2
div-float/2addr v0, v9
invoke-static {v0}, Ljava/lang/String;->valueOf(F)Ljava/lang/String;
move-result-object v0
const-string v1, "."
invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I
move-result v0
.line 355
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
long-to-float v2, v2
div-float/2addr v2, v9
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, "000"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
add-int/lit8 v0, v0, 0x2
invoke-virtual {v2, v6, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "GB"
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
.line 366
:cond_0
:goto_0
return-object v0
.line 356
:cond_1
const-wide/32 v4, 0x100000
cmp-long v1, v2, v4
if-ltz v1, :cond_2
.line 357
long-to-float v0, v2
div-float/2addr v0, v8
invoke-static {v0}, Ljava/lang/String;->valueOf(F)Ljava/lang/String;
move-result-object v0
const-string v1, "."
invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I
move-result v0
.line 358
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
long-to-float v2, v2
div-float/2addr v2, v8
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, "000"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
add-int/lit8 v0, v0, 0x2
invoke-virtual {v2, v6, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "MB"
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
goto :goto_0
.line 359
:cond_2
cmp-long v1, v2, v10
if-ltz v1, :cond_3
.line 360
long-to-float v0, v2
div-float/2addr v0, v7
invoke-static {v0}, Ljava/lang/String;->valueOf(F)Ljava/lang/String;
move-result-object v0
const-string v1, "."
invoke-virtual {v0, v1}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I
move-result v0
.line 361
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
long-to-float v2, v2
div-float/2addr v2, v7
invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(F)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, "000"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
add-int/lit8 v0, v0, 0x2
invoke-virtual {v2, v6, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object v0
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "KB"
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
goto/16 :goto_0
.line 362
:cond_3
cmp-long v1, v2, v10
if-gez v1, :cond_0
.line 363
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-static {v2, v3}, Ljava/lang/String;->valueOf(J)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, "B"
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
goto/16 :goto_0
.end method
.method private handleIntent(Landroid/content/Intent;)Z
.locals 6
.prologue
const/4 v2, 0x1
const/4 v1, 0x0
.line 255
const-string v0, "share_only_key"
invoke-virtual {p1, v0, v1}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
iput-boolean v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mShareOnly:Z
.line 256
const-string v0, "share_weixin_key"
invoke-virtual {p1, v0, v1}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
iput-boolean v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mIsShare2Weixin:Z
.line 257
const-string v0, "share_facebook_key"
invoke-virtual {p1, v0, v1}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v0
iput-boolean v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mIsShare2Facebook:Z
.line 258
const-string v0, "FileInfo"
invoke-virtual {p1, v0}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;
move-result-object v0
check-cast v0, Lcom/viatech/gallery/FileInfo;
iput-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileInfo:Lcom/viatech/gallery/FileInfo;
.line 259
invoke-virtual {p1}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
.line 260
const-string v3, "android.intent.action.SEND"
invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_1
.line 261
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileList:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
.line 262
const-string v0, "android.intent.extra.STREAM"
invoke-virtual {p1, v0}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;
move-result-object v0
check-cast v0, Landroid/net/Uri;
.line 263
sget-object v3, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "uri = "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v3, v4}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 264
if-nez v0, :cond_0
.line 265
invoke-virtual {p0}, Lcom/viatech/gallery/SendPhotoActivity;->finish()V
move v0, v1
.line 290
:goto_0
return v0
.line 268
:cond_0
invoke-direct {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->processUri(Landroid/net/Uri;)V
move v0, v2
.line 269
goto :goto_0
.line 270
:cond_1
const-string v3, "android.intent.action.SEND_MULTIPLE"
invoke-virtual {v0, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_5
.line 271
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileList:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
.line 272
const-string v0, "android.intent.extra.STREAM"
invoke-virtual {p1, v0}, Landroid/content/Intent;->getParcelableArrayListExtra(Ljava/lang/String;)Ljava/util/ArrayList;
move-result-object v0
.line 273
if-nez v0, :cond_2
.line 274
sget-object v0, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
const-string v2, "can not get uris"
invoke-static {v0, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 275
invoke-virtual {p0}, Lcom/viatech/gallery/SendPhotoActivity;->finish()V
move v0, v1
.line 276
goto :goto_0
.line 278
:cond_2
invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v1
:cond_3
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_4
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/net/Uri;
.line 279
invoke-direct {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->processUri(Landroid/net/Uri;)V
.line 280
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileList:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->size()I
move-result v0
const/4 v3, 0x6
if-ne v0, v3, :cond_3
.line 281
const v0, 0x7f070114
invoke-static {v0}, Lcom/viatech/VPaiApplication;->b(I)V
:cond_4
move v0, v2
.line 285
goto :goto_0
.line 287
:cond_5
sget-object v0, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
const-string v2, "wrong action, finish"
invoke-static {v0, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 288
invoke-virtual {p0}, Lcom/viatech/gallery/SendPhotoActivity;->finish()V
move v0, v1
.line 290
goto :goto_0
.end method
.method private processUri(Landroid/net/Uri;)V
.locals 8
.prologue
const/4 v7, 0x1
const/4 v6, 0x0
.line 294
invoke-virtual {p1}, Landroid/net/Uri;->getScheme()Ljava/lang/String;
move-result-object v0
const-string v1, "file"
invoke-virtual {v0, v1}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I
move-result v0
if-nez v0, :cond_3
.line 295
invoke-virtual {p1}, Landroid/net/Uri;->toString()Ljava/lang/String;
move-result-object v0
const-string v1, "file://"
const-string v2, ""
invoke-virtual {v0, v1, v2}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
move-result-object v0
.line 296
sget-object v1, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "mFileName = "
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v2
invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 297
new-instance v1, Ljava/io/File;
invoke-direct {v1, v0}, Ljava/io/File;-><init>(Ljava/lang/String;)V
.line 298
invoke-virtual {v1}, Ljava/io/File;->exists()Z
move-result v2
if-eqz v2, :cond_2
.line 299
new-instance v2, Lcom/viatech/gallery/FileInfo;
invoke-virtual {v1}, Ljava/io/File;->getName()Ljava/lang/String;
move-result-object v3
invoke-direct {v2, v3, v6}, Lcom/viatech/gallery/FileInfo;-><init>(Ljava/lang/String;Z)V
.line 300
invoke-virtual {v1}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v3
invoke-direct {p0, v3}, Lcom/viatech/gallery/SendPhotoActivity;->fileSizeMsg(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
iput-object v3, v2, Lcom/viatech/gallery/FileInfo;->size:Ljava/lang/String;
.line 301
invoke-virtual {v1}, Ljava/io/File;->length()J
move-result-wide v4
iput-wide v4, v2, Lcom/viatech/gallery/FileInfo;->lsize:J
.line 302
invoke-virtual {v1}, Ljava/io/File;->lastModified()J
move-result-wide v4
iput-wide v4, v2, Lcom/viatech/gallery/FileInfo;->modifytime:J
.line 303
iput-boolean v6, v2, Lcom/viatech/gallery/FileInfo;->isDirectory:Z
.line 304
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v1}, Ljava/io/File;->getParent()Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
const-string v4, "/"
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v1}, Ljava/io/File;->getName()Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
iput-object v3, v2, Lcom/viatech/gallery/FileInfo;->path:Ljava/lang/String;
.line 305
invoke-virtual {v1}, Ljava/io/File;->getName()Ljava/lang/String;
move-result-object v1
invoke-static {v1}, Lcom/viatech/common/util/FileMediaType;->getMediaType(Ljava/lang/String;)I
move-result v1
iput v1, v2, Lcom/viatech/gallery/FileInfo;->fileType:I
.line 306
iget-object v1, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileInfo:Lcom/viatech/gallery/FileInfo;
if-eqz v1, :cond_0
.line 307
iget-object v1, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileInfo:Lcom/viatech/gallery/FileInfo;
iget-boolean v1, v1, Lcom/viatech/gallery/FileInfo;->isFromOtherPath:Z
iput-boolean v1, v2, Lcom/viatech/gallery/FileInfo;->isFromOtherPath:Z
.line 309
:cond_0
sget-object v1, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "fi = "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v2}, Lcom/viatech/gallery/FileInfo;->toString()Ljava/lang/String;
move-result-object v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v1, v3}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 310
iget v1, v2, Lcom/viatech/gallery/FileInfo;->fileType:I
if-ne v1, v7, :cond_1
.line 311
iget-object v1, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileList:Ljava/util/ArrayList;
invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 312
:cond_1
iget-boolean v1, v2, Lcom/viatech/gallery/FileInfo;->isFromOtherPath:Z
if-nez v1, :cond_2
.line 315
:try_start_0
new-instance v1, Landroid/graphics/BitmapFactory$Options;
invoke-direct {v1}, Landroid/graphics/BitmapFactory$Options;-><init>()V
.line 316
const/4 v2, 0x1
iput-boolean v2, v1, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z
.line 318
invoke-virtual {p0}, Lcom/viatech/gallery/SendPhotoActivity;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "r"
invoke-virtual {v2, p1, v3}, Landroid/content/ContentResolver;->openFileDescriptor(Landroid/net/Uri;Ljava/lang/String;)Landroid/os/ParcelFileDescriptor;
move-result-object v2
.line 319
invoke-virtual {v2}, Landroid/os/ParcelFileDescriptor;->getFileDescriptor()Ljava/io/FileDescriptor;
move-result-object v2
const/4 v3, 0x0
invoke-static {v2, v3, v1}, Landroid/graphics/BitmapFactory;->decodeFileDescriptor(Ljava/io/FileDescriptor;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
.line 320
iget v2, v1, Landroid/graphics/BitmapFactory$Options;->outWidth:I
.line 321
iget v1, v1, Landroid/graphics/BitmapFactory$Options;->outHeight:I
.line 322
new-instance v3, Lcom/via/vpailib/mediarecorder/JpegInsertTag;
invoke-direct {v3}, Lcom/via/vpailib/mediarecorder/JpegInsertTag;-><init>()V
.line 323
sget-object v4, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
new-instance v5, Ljava/lang/StringBuilder;
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V
const-string v6, "w and h :"
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v5
const-string v6, "..."
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v5
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v5
invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 324
invoke-virtual {v3, v0, v2, v1}, Lcom/via/vpailib/mediarecorder/JpegInsertTag;->repalcePanoTag(Ljava/lang/String;II)I
move-result v4
.line 325
sget-object v5, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
const-string v7, "repalcePanoTag...ret:"
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
invoke-static {v5, v6}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 326
const/4 v5, -0x3
if-ne v4, v5, :cond_2
.line 327
sget-object v4, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
const-string v5, "addPanoTag"
invoke-static {v4, v5}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 328
invoke-virtual {v3, v0, v2, v1}, Lcom/via/vpailib/mediarecorder/JpegInsertTag;->addPanoTag(Ljava/lang/String;II)Z
:try_end_0
.catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
.line 345
:cond_2
:goto_0
return-void
.line 330
:catch_0
move-exception v0
.line 331
invoke-virtual {v0}, Ljava/io/FileNotFoundException;->printStackTrace()V
goto :goto_0
.line 335
:cond_3
invoke-virtual {p1}, Landroid/net/Uri;->getScheme()Ljava/lang/String;
move-result-object v0
const-string v1, "http"
invoke-virtual {v0, v1}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I
move-result v0
if-eqz v0, :cond_4
invoke-virtual {p1}, Landroid/net/Uri;->getScheme()Ljava/lang/String;
move-result-object v0
const-string v1, "https"
invoke-virtual {v0, v1}, Ljava/lang/String;->compareTo(Ljava/lang/String;)I
move-result v0
if-nez v0, :cond_2
.line 336
:cond_4
invoke-virtual {p1}, Landroid/net/Uri;->toString()Ljava/lang/String;
move-result-object v0
.line 337
const-string v1, "/"
invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v1
.line 338
new-instance v2, Lcom/viatech/gallery/FileInfo;
array-length v3, v1
add-int/lit8 v3, v3, -0x1
aget-object v1, v1, v3
invoke-direct {v2, v1, v6}, Lcom/viatech/gallery/FileInfo;-><init>(Ljava/lang/String;Z)V
.line 339
iget-object v1, v2, Lcom/viatech/gallery/FileInfo;->name:Ljava/lang/String;
invoke-static {v1}, Lcom/viatech/common/util/FileMediaType;->getMediaType(Ljava/lang/String;)I
move-result v1
iput v1, v2, Lcom/viatech/gallery/FileInfo;->fileType:I
.line 340
iput-object v0, v2, Lcom/viatech/gallery/FileInfo;->url:Ljava/lang/String;
.line 341
sget-object v0, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "fi = "
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v2}, Lcom/viatech/gallery/FileInfo;->toString()Ljava/lang/String;
move-result-object v3
invoke-virtual {v1, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 342
iget v0, v2, Lcom/viatech/gallery/FileInfo;->fileType:I
if-ne v0, v7, :cond_2
.line 343
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileList:Ljava/util/ArrayList;
invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_0
.end method
.method private updateActionbar(Ljava/lang/String;)V
.locals 7
.prologue
const/4 v6, 0x0
const/4 v5, -0x2
const/4 v4, 0x1
.line 182
invoke-virtual {p0}, Lcom/viatech/gallery/SendPhotoActivity;->getActionBar()Landroid/app/ActionBar;
move-result-object v0
.line 183
if-eqz v0, :cond_1
.line 184
invoke-virtual {p0}, Lcom/viatech/gallery/SendPhotoActivity;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x7f02023d
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/app/ActionBar;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V
.line 185
invoke-virtual {v0, v4}, Landroid/app/ActionBar;->setDisplayHomeAsUpEnabled(Z)V
.line 186
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
const/16 v2, 0x12
if-lt v1, v2, :cond_0
.line 187
const v1, 0x7f020081
invoke-virtual {v0, v1}, Landroid/app/ActionBar;->setHomeAsUpIndicator(I)V
.line 189
:cond_0
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/app/ActionBar;->setTitle(Ljava/lang/CharSequence;)V
.line 190
invoke-virtual {v0, v4}, Landroid/app/ActionBar;->setDisplayShowTitleEnabled(Z)V
.line 191
invoke-virtual {v0, v6}, Landroid/app/ActionBar;->setDisplayShowHomeEnabled(Z)V
.line 192
new-instance v1, Landroid/widget/TextView;
invoke-direct {v1, p0}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V
.line 193
if-eqz p1, :cond_2
.line 194
invoke-virtual {v1, p1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
.line 199
:goto_0
const/4 v2, -0x1
invoke-virtual {v1, v2}, Landroid/widget/TextView;->setTextColor(I)V
.line 200
invoke-virtual {p0}, Lcom/viatech/gallery/SendPhotoActivity;->getResources()Landroid/content/res/Resources;
move-result-object v2
const v3, 0x7f0800c0
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDimension(I)F
move-result v2
invoke-virtual {v1, v6, v2}, Landroid/widget/TextView;->setTextSize(IF)V
.line 201
new-instance v2, Landroid/app/ActionBar$LayoutParams;
const/16 v3, 0x11
invoke-direct {v2, v5, v5, v3}, Landroid/app/ActionBar$LayoutParams;-><init>(III)V
invoke-virtual {v0, v1, v2}, Landroid/app/ActionBar;->setCustomView(Landroid/view/View;Landroid/app/ActionBar$LayoutParams;)V
.line 203
invoke-virtual {v0, v4}, Landroid/app/ActionBar;->setDisplayShowCustomEnabled(Z)V
.line 205
:cond_1
return-void
.line 196
:cond_2
const v2, 0x7f070171
invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(I)V
goto :goto_0
.end method
# virtual methods
.method public doUploadAndShare(I)V
.locals 4
.prologue
const/4 v3, 0x0
.line 208
new-instance v0, Landroid/content/Intent;
const-class v1, Lcom/viatech/gallery/SendActivity;
invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
.line 209
const-string v1, "Type"
invoke-virtual {v0, v1, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
.line 210
const-string v1, "ShareMsg"
iget-object v2, p0, Lcom/viatech/gallery/SendPhotoActivity;->mEditText:Landroid/widget/EditText;
invoke-virtual {v2}, Landroid/widget/EditText;->getText()Landroid/text/Editable;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;
move-result-object v2
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 211
const-string v1, "ShareOnly"
iget-boolean v2, p0, Lcom/viatech/gallery/SendPhotoActivity;->mShareOnly:Z
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;
.line 212
const-string v1, "ShareType"
invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
.line 213
const-string v1, "FileList"
iget-object v2, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileList:Ljava/util/ArrayList;
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;
.line 214
invoke-virtual {p0, v0, v3}, Lcom/viatech/gallery/SendPhotoActivity;->startActivityForResult(Landroid/content/Intent;I)V
.line 215
return-void
.end method
.method protected onActivityResult(IILandroid/content/Intent;)V
.locals 5
.prologue
const/16 v4, 0x3e8
.line 242
sget-object v0, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
const-string v2, "onActivityResult "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, ", "
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v1
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 243
sget-object v0, Lcom/facebook/internal/CallbackManagerImpl$RequestCodeOffset;->Login:Lcom/facebook/internal/CallbackManagerImpl$RequestCodeOffset;
invoke-virtual {v0}, Lcom/facebook/internal/CallbackManagerImpl$RequestCodeOffset;->toRequestCode()I
move-result v0
if-ne p1, v0, :cond_0
.line 244
const/4 v0, -0x1
if-ne p2, v0, :cond_0
.line 245
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFacebookCallbackManager:Lcom/facebook/CallbackManager;
invoke-interface {v0, p1, p2, p3}, Lcom/facebook/CallbackManager;->onActivityResult(IILandroid/content/Intent;)Z
.line 246
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mHandler:Landroid/os/Handler;
invoke-virtual {v0, v4}, Landroid/os/Handler;->removeMessages(I)V
.line 247
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mHandler:Landroid/os/Handler;
const-wide/16 v2, 0x7d0
invoke-virtual {v0, v4, v2, v3}, Landroid/os/Handler;->sendEmptyMessageDelayed(IJ)Z
.line 252
:goto_0
return-void
.line 251
:cond_0
invoke-virtual {p0}, Lcom/viatech/gallery/SendPhotoActivity;->finish()V
goto :goto_0
.end method
.method protected onCreate(Landroid/os/Bundle;)V
.locals 5
.annotation build Landroid/annotation/TargetApi;
value = 0x12
.end annotation
.prologue
const/4 v4, 0x1
.line 106
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 107
const v0, 0x7f03002f
invoke-virtual {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->setContentView(I)V
.line 108
invoke-static {}, Lcom/viatech/Config;->a()Lcom/viatech/Config;
move-result-object v0
invoke-virtual {v0, p0}, Lcom/viatech/Config;->a(Landroid/app/Activity;)V
.line 110
invoke-virtual {p0}, Lcom/viatech/gallery/SendPhotoActivity;->getIntent()Landroid/content/Intent;
move-result-object v0
invoke-direct {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->handleIntent(Landroid/content/Intent;)Z
.line 112
const/4 v0, 0x0
invoke-direct {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->updateActionbar(Ljava/lang/String;)V
.line 114
const v0, 0x7f0c0100
invoke-virtual {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/GridView;
.line 115
new-instance v1, Lcom/viatech/gallery/FileGridListAdapter;
iget-object v2, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileList:Ljava/util/ArrayList;
iget-boolean v3, p0, Lcom/viatech/gallery/SendPhotoActivity;->mShareOnly:Z
invoke-direct {v1, p0, v2, v3}, Lcom/viatech/gallery/FileGridListAdapter;-><init>(Landroid/content/Context;Ljava/util/List;Z)V
.line 116
invoke-virtual {v0, v1}, Landroid/widget/GridView;->setAdapter(Landroid/widget/ListAdapter;)V
.line 117
iget-object v1, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFileList:Ljava/util/ArrayList;
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
move-result v1
if-ne v1, v4, :cond_0
.line 118
invoke-virtual {v0, v4}, Landroid/widget/GridView;->setNumColumns(I)V
.line 121
:cond_0
const v0, 0x7f0c0102
invoke-virtual {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/TextView;
iput-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mNunberTextView:Landroid/widget/TextView;
.line 122
const v0, 0x7f0c0101
invoke-virtual {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/EditText;
iput-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mEditText:Landroid/widget/EditText;
.line 123
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mEditText:Landroid/widget/EditText;
new-instance v1, Lcom/viatech/gallery/SendPhotoActivity$3;
invoke-direct {v1, p0}, Lcom/viatech/gallery/SendPhotoActivity$3;-><init>(Lcom/viatech/gallery/SendPhotoActivity;)V
invoke-virtual {v0, v1}, Landroid/widget/EditText;->addTextChangedListener(Landroid/text/TextWatcher;)V
.line 151
iget-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mEditText:Landroid/widget/EditText;
invoke-virtual {v0}, Landroid/widget/EditText;->requestFocus()Z
.line 153
const v0, 0x7f0c0104
invoke-virtual {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
.line 154
new-instance v1, Lcom/viatech/gallery/SendPhotoActivity$4;
invoke-direct {v1, p0}, Lcom/viatech/gallery/SendPhotoActivity$4;-><init>(Lcom/viatech/gallery/SendPhotoActivity;)V
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 161
const v0, 0x7f0c0106
invoke-virtual {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Landroid/widget/ImageView;
.line 162
new-instance v1, Lcom/viatech/gallery/SendPhotoActivity$5;
invoke-direct {v1, p0}, Lcom/viatech/gallery/SendPhotoActivity$5;-><init>(Lcom/viatech/gallery/SendPhotoActivity;)V
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
.line 169
iget-boolean v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mIsShare2Weixin:Z
if-nez v0, :cond_1
.line 170
const v0, 0x7f0c0103
invoke-virtual {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->findViewById(I)Landroid/view/View;
move-result-object v0
.line 171
const/16 v1, 0x8
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
.line 174
:cond_1
iget-boolean v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mIsShare2Facebook:Z
if-eqz v0, :cond_2
.line 175
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const v1, 0x7f07017f
invoke-virtual {p0, v1}, Lcom/viatech/gallery/SendPhotoActivity;->getString(I)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, " Facebook"
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-direct {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->updateActionbar(Ljava/lang/String;)V
.line 176
invoke-static {}, Lcom/facebook/CallbackManager$Factory;->create()Lcom/facebook/CallbackManager;
move-result-object v0
iput-object v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFacebookCallbackManager:Lcom/facebook/CallbackManager;
.line 177
invoke-static {}, Lcom/facebook/login/LoginManager;->getInstance()Lcom/facebook/login/LoginManager;
move-result-object v0
iget-object v1, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFacebookCallbackManager:Lcom/facebook/CallbackManager;
iget-object v2, p0, Lcom/viatech/gallery/SendPhotoActivity;->mFacebookCallback:Lcom/facebook/FacebookCallback;
invoke-virtual {v0, v1, v2}, Lcom/facebook/login/LoginManager;->registerCallback(Lcom/facebook/CallbackManager;Lcom/facebook/FacebookCallback;)V
.line 179
:cond_2
return-void
.end method
.method public onCreateOptionsMenu(Landroid/view/Menu;)Z
.locals 2
.prologue
.line 219
sget-object v0, Lcom/viatech/gallery/SendPhotoActivity;->TAG:Ljava/lang/String;
const-string v1, "onCreateOptionsMenu"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 220
iget-boolean v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mIsShare2Weixin:Z
if-nez v0, :cond_0
.line 221
invoke-virtual {p0}, Lcom/viatech/gallery/SendPhotoActivity;->getMenuInflater()Landroid/view/MenuInflater;
move-result-object v0
const v1, 0x7f0e0005
invoke-virtual {v0, v1, p1}, Landroid/view/MenuInflater;->inflate(ILandroid/view/Menu;)V
.line 223
:cond_0
const/4 v0, 0x1
return v0
.end method
.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
.locals 2
.prologue
.line 228
invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I
move-result v0
const v1, 0x7f0c02f7
if-ne v0, v1, :cond_2
.line 229
iget-boolean v0, p0, Lcom/viatech/gallery/SendPhotoActivity;->mIsShare2Facebook:Z
if-eqz v0, :cond_1
.line 230
invoke-direct {p0}, Lcom/viatech/gallery/SendPhotoActivity;->doUpload2Facebook()V
.line 237
:cond_0
:goto_0
const/4 v0, 0x1
return v0
.line 232
:cond_1
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lcom/viatech/gallery/SendPhotoActivity;->doUploadAndShare(I)V
goto :goto_0
.line 234
:cond_2
invoke-interface {p1}, Landroid/view/MenuItem;->getItemId()I
move-result v0
const v1, 0x102002c
if-ne v0, v1, :cond_0
.line 235
invoke-virtual {p0}, Lcom/viatech/gallery/SendPhotoActivity;->onBackPressed()V
goto :goto_0
.end method