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

1374 lines
36 KiB

.class public Lcom/viatech/gallery/ShareUtil;
.super Ljava/lang/Object;
.source "ShareUtil.java"
# static fields
.field private static final REQUEST_SHARE:I = 0x3e9
.field private static final TAG:Ljava/lang/String;
.field public static final TYPE_PHOTO:I = 0x0
.field public static final TYPE_VIDEO:I = 0x1
# direct methods
.method static constructor <clinit>()V
.locals 2
.prologue
.line 43
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
const-string v1, "Vpai_"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-class v1, Lcom/viatech/gallery/ShareUtil;
invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()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
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/viatech/gallery/ShareUtil;->TAG:Ljava/lang/String;
return-void
.end method
.method public constructor <init>()V
.locals 0
.prologue
.line 42
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method static synthetic access$000(Landroid/content/Context;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
.locals 1
.prologue
.line 42
invoke-static {p0, p1}, Lcom/viatech/gallery/ShareUtil;->thumbAddPlayIcon(Landroid/content/Context;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
move-result-object v0
return-object v0
.end method
.method public static onClickShareFacebook(Landroid/app/Activity;ZLcom/viatech/gallery/FileInfo;)V
.locals 1
.prologue
.line 280
if-nez p1, :cond_0
.line 281
iget-object v0, p2, Lcom/viatech/gallery/FileInfo;->shareUrl:Ljava/lang/String;
iput-object v0, p2, Lcom/viatech/gallery/FileInfo;->url:Ljava/lang/String;
.line 283
:cond_0
invoke-static {}, Lcom/viatech/util/SocialShareUtil;->instance()Lcom/viatech/util/SocialShareUtil;
move-result-object v0
invoke-virtual {v0, p0, p2, p1}, Lcom/viatech/util/SocialShareUtil;->shareLink2Facebook(Landroid/app/Activity;Lcom/viatech/gallery/FileInfo;Z)V
.line 284
return-void
.end method
.method public static shareOthers(Landroid/app/Activity;ILjava/lang/String;Lcom/viatech/gallery/FileInfo;)V
.locals 4
.prologue
.line 288
const/4 v0, 0x0
.line 289
if-nez p1, :cond_1
.line 290
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "\n"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {p3}, Lcom/viatech/gallery/FileInfo;->getSharePageUrl()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
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
.line 295
:cond_0
:goto_0
new-instance v1, Landroid/content/Intent;
invoke-direct {v1}, Landroid/content/Intent;-><init>()V
.line 296
const-string v2, "android.intent.action.SEND"
invoke-virtual {v1, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 297
const-string v2, "android.intent.extra.SUBJECT"
const-string v3, "Vpai"
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 298
const-string v2, "android.intent.extra.TEXT"
invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 299
const-string v0, "text/plain"
invoke-virtual {v1, v0}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;
.line 300
const v0, 0x7f07017f
invoke-virtual {p0, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;
move-result-object v0
invoke-static {v1, v0}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;
move-result-object v0
const/16 v1, 0x3e9
invoke-virtual {p0, v0, v1}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V
.line 301
return-void
.line 291
:cond_1
const/4 v1, 0x1
if-ne p1, v1, :cond_0
.line 292
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "\n"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {p3}, Lcom/viatech/gallery/FileInfo;->getSharePageUrl()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
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
goto :goto_0
.end method
.method public static shareOthers(Landroid/app/Activity;ILjava/lang/String;Ljava/lang/String;)V
.locals 4
.prologue
.line 305
const/4 v0, 0x0
.line 306
if-nez p1, :cond_1
.line 307
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "\n"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p3}, 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 312
:cond_0
:goto_0
new-instance v1, Landroid/content/Intent;
invoke-direct {v1}, Landroid/content/Intent;-><init>()V
.line 313
const-string v2, "android.intent.action.SEND"
invoke-virtual {v1, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 314
const-string v2, "android.intent.extra.SUBJECT"
const-string v3, "Vpai"
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 315
const-string v2, "android.intent.extra.TEXT"
invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 316
const-string v0, "text/plain"
invoke-virtual {v1, v0}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;
.line 317
const v0, 0x7f07017f
invoke-virtual {p0, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;
move-result-object v0
invoke-static {v1, v0}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;
move-result-object v0
const/16 v1, 0x3e9
invoke-virtual {p0, v0, v1}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V
.line 318
return-void
.line 308
:cond_1
const/4 v1, 0x1
if-ne p1, v1, :cond_0
.line 309
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "\n"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p3}, 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
.end method
.method public static sharePostWechat(Landroid/content/Context;ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
.locals 4
.prologue
.line 184
const v0, 0x7f070046
invoke-virtual {p0, v0}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v0
.line 185
sget-object v1, Lcom/viatech/gallery/ShareUtil;->TAG:Ljava/lang/String;
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
const-string v3, "sharePostWechat : sharePageUrl ="
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, "...thumbUrl:"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
const-string v3, "...shareMsg:"
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v2
invoke-virtual {v2, p4}, 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;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 186
new-instance v1, Lcom/viatech/gallery/ShareUtil$3;
invoke-direct {v1, p1, p2, v0, p4}, Lcom/viatech/gallery/ShareUtil$3;-><init>(ZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
invoke-static {p3, v1, p0}, Lcom/viatech/vpaiphoto/a/c;->a(Ljava/lang/String;Lcom/squareup/picasso/Target;Landroid/content/Context;)V
.line 204
return-void
.end method
.method public static shareQQ(Landroid/app/Activity;ILjava/lang/String;Ljava/lang/String;)V
.locals 4
.prologue
.line 232
const/4 v0, 0x0
.line 233
if-nez p1, :cond_1
.line 234
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "\n"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p3}, 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 239
:cond_0
:goto_0
new-instance v1, Landroid/content/Intent;
const-string v2, "android.intent.action.SEND"
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 240
const-string v2, "text/plain"
invoke-virtual {v1, v2}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;
.line 241
const-string v2, "android.intent.extra.SUBJECT"
const-string v3, "Vpai"
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 242
const-string v2, "android.intent.extra.TEXT"
invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 243
new-instance v0, Landroid/content/ComponentName;
const-string v2, "com.tencent.mobileqq"
const-string v3, "com.tencent.mobileqq.activity.JumpActivity"
invoke-direct {v0, v2, v3}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
invoke-virtual {v1, v0}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
.line 244
const v0, 0x7f07017f
invoke-virtual {p0, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;
move-result-object v0
invoke-static {v1, v0}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;
move-result-object v0
const/16 v1, 0x3e9
invoke-virtual {p0, v0, v1}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V
.line 245
return-void
.line 235
:cond_1
const/4 v1, 0x1
if-ne p1, v1, :cond_0
.line 236
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "\n"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p3}, 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
.end method
.method public static shareQQZone(Landroid/app/Activity;ILjava/lang/String;Ljava/lang/String;)V
.locals 4
.prologue
.line 248
const/4 v0, 0x0
.line 249
if-nez p1, :cond_1
.line 250
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "\n"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p3}, 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 255
:cond_0
:goto_0
new-instance v1, Landroid/content/Intent;
const-string v2, "android.intent.action.SEND"
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 256
const-string v2, "text/plain"
invoke-virtual {v1, v2}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;
.line 257
const-string v2, "android.intent.extra.SUBJECT"
const-string v3, "Vpai"
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 258
const-string v2, "android.intent.extra.TEXT"
invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 259
new-instance v0, Landroid/content/ComponentName;
const-string v2, "com.qzone"
const-string v3, "com.qzonex.module.operation.ui.QZonePublishMoodActivity"
invoke-direct {v0, v2, v3}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
invoke-virtual {v1, v0}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
.line 260
const v0, 0x7f07017f
invoke-virtual {p0, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;
move-result-object v0
invoke-static {v1, v0}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;
move-result-object v0
const/16 v1, 0x3e9
invoke-virtual {p0, v0, v1}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V
.line 261
return-void
.line 251
:cond_1
const/4 v1, 0x1
if-ne p1, v1, :cond_0
.line 252
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "\n"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p3}, 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
.end method
.method public static shareVpai(Landroid/content/Context;ILjava/lang/String;JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Lcom/via/vpaicloud/community/callback/CommunityHttpCallback;)V
.locals 7
.prologue
.line 49
if-nez p1, :cond_2
.line 51
invoke-static {}, Lcom/viatech/cloud/CloudConfig;->curUser()Lcom/viatech/cloud/CloudConfig$LoginUser;
move-result-object v0
.line 53
invoke-static {p0}, Lcom/viatech/community/b/a;->a(Landroid/content/Context;)Lcom/viatech/community/b/a;
move-result-object v1
.line 54
invoke-virtual {v1}, Lcom/viatech/community/b/a;->a()V
.line 55
if-nez v0, :cond_1
.line 56
const v0, 0x7f07010c
invoke-static {v0}, Lcom/viatech/VPaiApplication;->b(I)V
.line 101
:cond_0
:goto_0
return-void
.line 59
:cond_1
new-instance v2, Lcom/via/vpaicloud/community/respond/Post;
invoke-direct {v2}, Lcom/via/vpaicloud/community/respond/Post;-><init>()V
.line 60
new-instance v3, Lcom/via/vpaicloud/community/respond/Attachment;
invoke-direct {v3}, Lcom/via/vpaicloud/community/respond/Attachment;-><init>()V
.line 61
const/4 v4, 0x1
new-array v4, v4, [Lcom/via/vpaicloud/community/respond/Attachment;
const/4 v5, 0x0
aput-object v3, v4, v5
iput-object v4, v2, Lcom/via/vpaicloud/community/respond/Post;->atts:[Lcom/via/vpaicloud/community/respond/Attachment;
.line 62
const-wide/16 v4, 0x1
iput-wide v4, v2, Lcom/via/vpaicloud/community/respond/Post;->forumid:J
.line 63
iget-wide v4, v1, Lcom/viatech/community/b/a;->e:J
iput-wide v4, v2, Lcom/via/vpaicloud/community/respond/Post;->authorid:J
.line 64
iget-object v1, v0, Lcom/viatech/cloud/CloudConfig$LoginUser;->unionid:Ljava/lang/String;
iput-object v1, v2, Lcom/via/vpaicloud/community/respond/Post;->authoruid:Ljava/lang/String;
.line 65
iget-object v1, v0, Lcom/viatech/cloud/CloudConfig$LoginUser;->nickname:Ljava/lang/String;
iput-object v1, v2, Lcom/via/vpaicloud/community/respond/Post;->author:Ljava/lang/String;
.line 66
iget-object v0, v0, Lcom/viatech/cloud/CloudConfig$LoginUser;->imageurl:Ljava/lang/String;
iput-object v0, v2, Lcom/via/vpaicloud/community/respond/Post;->authorimg:Ljava/lang/String;
.line 67
iput-object p7, v2, Lcom/via/vpaicloud/community/respond/Post;->content:Ljava/lang/String;
.line 68
iput-object p6, v2, Lcom/via/vpaicloud/community/respond/Post;->thumburl:Ljava/lang/String;
.line 69
const/4 v0, 0x2
iput v0, v3, Lcom/via/vpaicloud/community/respond/Attachment;->type:I
.line 70
iput-object p2, v3, Lcom/via/vpaicloud/community/respond/Attachment;->name:Ljava/lang/String;
.line 71
iput-wide p3, v3, Lcom/via/vpaicloud/community/respond/Attachment;->size:J
.line 72
iput-object p5, v3, Lcom/via/vpaicloud/community/respond/Attachment;->url:Ljava/lang/String;
.line 73
invoke-static {}, Lcom/via/vpaicloud/community/CommunityClient;->getClient()Lcom/via/vpaicloud/community/CommunityClient;
move-result-object v0
invoke-virtual {v0, v2, p8}, Lcom/via/vpaicloud/community/CommunityClient;->requestPostAdd(Lcom/via/vpaicloud/community/respond/Post;Lcom/via/vpaicloud/community/callback/CommunityHttpCallback;)V
goto :goto_0
.line 74
:cond_2
const/4 v0, 0x1
if-ne p1, v0, :cond_0
.line 77
invoke-static {}, Lcom/viatech/cloud/CloudConfig;->curUser()Lcom/viatech/cloud/CloudConfig$LoginUser;
move-result-object v0
.line 79
invoke-static {p0}, Lcom/viatech/community/b/a;->a(Landroid/content/Context;)Lcom/viatech/community/b/a;
move-result-object v1
.line 80
invoke-virtual {v1}, Lcom/viatech/community/b/a;->a()V
.line 81
if-nez v0, :cond_3
.line 82
const v0, 0x7f07010c
invoke-static {v0}, Lcom/viatech/VPaiApplication;->b(I)V
goto :goto_0
.line 85
:cond_3
new-instance v2, Lcom/via/vpaicloud/community/respond/Post;
invoke-direct {v2}, Lcom/via/vpaicloud/community/respond/Post;-><init>()V
.line 86
new-instance v3, Lcom/via/vpaicloud/community/respond/Attachment;
invoke-direct {v3}, Lcom/via/vpaicloud/community/respond/Attachment;-><init>()V
.line 87
const/4 v4, 0x1
new-array v4, v4, [Lcom/via/vpaicloud/community/respond/Attachment;
const/4 v5, 0x0
aput-object v3, v4, v5
iput-object v4, v2, Lcom/via/vpaicloud/community/respond/Post;->atts:[Lcom/via/vpaicloud/community/respond/Attachment;
.line 88
const-wide/16 v4, 0x1
iput-wide v4, v2, Lcom/via/vpaicloud/community/respond/Post;->forumid:J
.line 89
iget-wide v4, v1, Lcom/viatech/community/b/a;->e:J
iput-wide v4, v2, Lcom/via/vpaicloud/community/respond/Post;->authorid:J
.line 90
iget-object v1, v0, Lcom/viatech/cloud/CloudConfig$LoginUser;->unionid:Ljava/lang/String;
iput-object v1, v2, Lcom/via/vpaicloud/community/respond/Post;->authoruid:Ljava/lang/String;
.line 91
iget-object v1, v0, Lcom/viatech/cloud/CloudConfig$LoginUser;->nickname:Ljava/lang/String;
iput-object v1, v2, Lcom/via/vpaicloud/community/respond/Post;->author:Ljava/lang/String;
.line 92
iget-object v0, v0, Lcom/viatech/cloud/CloudConfig$LoginUser;->imageurl:Ljava/lang/String;
iput-object v0, v2, Lcom/via/vpaicloud/community/respond/Post;->authorimg:Ljava/lang/String;
.line 93
iput-object p7, v2, Lcom/via/vpaicloud/community/respond/Post;->content:Ljava/lang/String;
.line 94
iput-object p6, v2, Lcom/via/vpaicloud/community/respond/Post;->thumburl:Ljava/lang/String;
.line 95
const/4 v0, 0x1
iput v0, v3, Lcom/via/vpaicloud/community/respond/Attachment;->type:I
.line 96
iput-object p2, v3, Lcom/via/vpaicloud/community/respond/Attachment;->name:Ljava/lang/String;
.line 97
iput-wide p3, v3, Lcom/via/vpaicloud/community/respond/Attachment;->size:J
.line 98
iput-object p5, v3, Lcom/via/vpaicloud/community/respond/Attachment;->url:Ljava/lang/String;
.line 99
invoke-static {}, Lcom/via/vpaicloud/community/CommunityClient;->getClient()Lcom/via/vpaicloud/community/CommunityClient;
move-result-object v0
invoke-virtual {v0, v2, p8}, Lcom/via/vpaicloud/community/CommunityClient;->requestPostAdd(Lcom/via/vpaicloud/community/respond/Post;Lcom/via/vpaicloud/community/callback/CommunityHttpCallback;)V
goto/16 :goto_0
.end method
.method public static shareWechat(Landroid/content/Context;IZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/String;)V
.locals 11
.prologue
.line 104
const/4 v1, 0x0
.line 105
const/4 v2, 0x0
.line 106
if-nez p1, :cond_3
.line 107
if-nez p7, :cond_2
.line 109
if-eqz p4, :cond_0
move-object/from16 p8, p4
.line 122
:cond_0
:goto_0
sget-object v1, Lcom/viatech/gallery/ShareUtil;->TAG:Ljava/lang/String;
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "shareContent : thumbBitmap filepath="
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
move-object/from16 v0, p8
invoke-virtual {v3, v0}, 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;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 123
const/4 v1, 0x1
if-ne p1, v1, :cond_6
if-eqz p9, :cond_6
if-nez p8, :cond_6
.line 125
:try_start_0
invoke-static/range {p6 .. p6}, Lcom/viatech/gallery/GalleryUtil;->createVideoThumbnail(Ljava/lang/String;)Landroid/graphics/Bitmap;
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
move-result-object v1
.line 129
:goto_1
if-nez v1, :cond_5
.line 130
sget-object v3, Lcom/viatech/gallery/GalleryUtil;->sNullBitmap:Landroid/graphics/Bitmap;
.line 141
:cond_1
:goto_2
sget-object v1, Lcom/viatech/gallery/ShareUtil;->TAG:Ljava/lang/String;
const-string v2, "sendToTimeline() "
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 143
const v1, 0x7f070046
invoke-virtual {p0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v9
.line 144
new-instance v2, Landroid/os/HandlerThread;
const-string v1, "thumb"
invoke-direct {v2, v1}, Landroid/os/HandlerThread;-><init>(Ljava/lang/String;)V
.line 145
invoke-virtual {v2}, Landroid/os/HandlerThread;->start()V
.line 146
new-instance v1, Lcom/viatech/gallery/ShareUtil$1;
invoke-virtual {v2}, Landroid/os/HandlerThread;->getLooper()Landroid/os/Looper;
move-result-object v2
move-object v4, p0
move-object v5, p4
move v6, p1
move v7, p2
move-object v8, p3
move-object/from16 v10, p10
invoke-direct/range {v1 .. v10}, Lcom/viatech/gallery/ShareUtil$1;-><init>(Landroid/os/Looper;Landroid/graphics/Bitmap;Landroid/content/Context;Ljava/lang/String;IZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
.line 172
new-instance v2, Lcom/viatech/gallery/ShareUtil$2;
invoke-direct {v2, v1}, Lcom/viatech/gallery/ShareUtil$2;-><init>(Landroid/os/Handler;)V
.line 179
invoke-virtual {v2}, Ljava/lang/Thread;->start()V
.line 181
return-void
:cond_2
move-object/from16 p8, p5
.line 113
goto :goto_0
.line 115
:cond_3
const/4 v3, 0x1
if-ne p1, v3, :cond_7
.line 116
if-eqz p9, :cond_4
.line 117
const/16 p8, 0x0
goto :goto_0
:cond_4
move-object/from16 p8, p6
.line 119
goto :goto_0
.line 126
:catch_0
move-exception v1
.line 127
sget-object v3, Lcom/viatech/gallery/ShareUtil;->TAG:Ljava/lang/String;
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "Exception : "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;
move-result-object v1
invoke-virtual {v4, v1}, 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 {v3, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
move-object v1, v2
goto :goto_1
.line 132
:cond_5
const/4 v2, 0x0
const/4 v3, 0x0
invoke-virtual {v1}, Landroid/graphics/Bitmap;->getWidth()I
move-result v4
div-int/lit8 v4, v4, 0x2
invoke-virtual {v1}, Landroid/graphics/Bitmap;->getHeight()I
move-result v5
div-int/lit8 v5, v5, 0x2
const/4 v6, 0x0
const/4 v7, 0x0
invoke-static/range {v1 .. v7}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;
move-result-object v3
goto :goto_2
.line 135
:cond_6
const/16 v1, 0x140
const/16 v2, 0x96
const/4 v3, 0x1
move-object/from16 v0, p8
invoke-static {v0, v1, v2, v3}, Lcom/viatech/util/weixin/WXUtil;->extractThumbNail(Ljava/lang/String;IIZ)Landroid/graphics/Bitmap;
move-result-object v3
.line 136
if-nez v3, :cond_1
.line 137
sget-object v3, Lcom/viatech/gallery/GalleryUtil;->sNullBitmap:Landroid/graphics/Bitmap;
goto/16 :goto_2
:cond_7
move-object/from16 p8, v1
goto/16 :goto_0
.end method
.method public static shareWeibo(Landroid/app/Activity;ILjava/lang/String;Ljava/lang/String;)V
.locals 4
.prologue
.line 264
const/4 v0, 0x0
.line 265
if-nez p1, :cond_1
.line 266
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "\n"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p3}, 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 270
:cond_0
:goto_0
new-instance v1, Landroid/content/Intent;
const-string v2, "android.intent.action.SEND"
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
.line 271
const-string v2, "text/plain"
invoke-virtual {v1, v2}, Landroid/content/Intent;->setType(Ljava/lang/String;)Landroid/content/Intent;
.line 272
const-string v2, "android.intent.extra.SUBJECT"
const-string v3, "Vpai"
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 273
const-string v2, "android.intent.extra.TEXT"
invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 274
new-instance v0, Landroid/content/ComponentName;
const-string v2, "com.sina.weibo"
const-string v3, "com.sina.weibo.composerinde.ComposerDispatchActivity"
invoke-direct {v0, v2, v3}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V
invoke-virtual {v1, v0}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;
.line 275
const v0, 0x7f07017f
invoke-virtual {p0, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;
move-result-object v0
invoke-static {v1, v0}, Landroid/content/Intent;->createChooser(Landroid/content/Intent;Ljava/lang/CharSequence;)Landroid/content/Intent;
move-result-object v0
const/16 v1, 0x3e9
invoke-virtual {p0, v0, v1}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V
.line 276
return-void
.line 267
:cond_1
const/4 v1, 0x1
if-ne p1, v1, :cond_0
.line 268
new-instance v0, Ljava/lang/StringBuilder;
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v1, "\n"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0, p3}, 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
.end method
.method private static thumbAddPlayIcon(Landroid/content/Context;Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;
.locals 8
.prologue
const/4 v6, 0x1
const/4 v1, 0x0
.line 207
if-nez p1, :cond_1
.line 228
:cond_0
:goto_0
return-object p1
.line 210
:cond_1
sget-object v0, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
invoke-virtual {p1, v0, v6}, Landroid/graphics/Bitmap;->copy(Landroid/graphics/Bitmap$Config;Z)Landroid/graphics/Bitmap;
move-result-object v7
.line 211
invoke-virtual {p0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
const v2, 0x7f02021b
invoke-static {v0, v2}, Landroid/graphics/BitmapFactory;->decodeResource(Landroid/content/res/Resources;I)Landroid/graphics/Bitmap;
move-result-object v0
sget-object v2, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
invoke-virtual {v0, v2, v6}, Landroid/graphics/Bitmap;->copy(Landroid/graphics/Bitmap$Config;Z)Landroid/graphics/Bitmap;
move-result-object v0
.line 212
if-eqz v0, :cond_0
.line 215
invoke-virtual {v7}, Landroid/graphics/Bitmap;->getWidth()I
move-result v2
int-to-float v2, v2
const/high16 v3, 0x40200000 # 2.5f
div-float/2addr v2, v3
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I
move-result v3
int-to-float v3, v3
div-float/2addr v2, v3
.line 216
const/high16 v3, 0x3f800000 # 1.0f
cmpg-float v3, v2, v3
if-gez v3, :cond_2
.line 217
new-instance v5, Landroid/graphics/Matrix;
invoke-direct {v5}, Landroid/graphics/Matrix;-><init>()V
.line 218
invoke-virtual {v5, v2, v2}, Landroid/graphics/Matrix;->postScale(FF)Z
.line 219
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I
move-result v3
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I
move-result v4
move v2, v1
invoke-static/range {v0 .. v6}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;
move-result-object v0
.line 221
:cond_2
invoke-virtual {v7}, Landroid/graphics/Bitmap;->getWidth()I
move-result v2
div-int/lit8 v2, v2, 0x2
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I
move-result v3
div-int/lit8 v3, v3, 0x2
sub-int/2addr v2, v3
invoke-static {v1, v2}, Ljava/lang/Math;->max(II)I
move-result v2
invoke-virtual {v7}, Landroid/graphics/Bitmap;->getHeight()I
move-result v3
div-int/lit8 v3, v3, 0x2
invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I
move-result v4
div-int/lit8 v4, v4, 0x2
sub-int/2addr v3, v4
invoke-static {v1, v3}, Ljava/lang/Math;->max(II)I
move-result v1
.line 222
new-instance v3, Landroid/graphics/Canvas;
invoke-direct {v3, v7}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V
.line 223
int-to-float v2, v2
int-to-float v1, v1
const/4 v4, 0x0
invoke-virtual {v3, v0, v2, v1, v4}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
.line 225
invoke-virtual {v3}, Landroid/graphics/Canvas;->save()I
.line 226
invoke-virtual {v3}, Landroid/graphics/Canvas;->restore()V
.line 227
invoke-virtual {v0}, Landroid/graphics/Bitmap;->recycle()V
move-object p1, v7
.line 228
goto :goto_0
.end method