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

303 lines
7.9 KiB

.class public Lcom/facebook/share/DeviceShareDialog;
.super Lcom/facebook/internal/FacebookDialogBase;
.source "DeviceShareDialog.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/facebook/share/DeviceShareDialog$Result;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Lcom/facebook/internal/FacebookDialogBase",
"<",
"Lcom/facebook/share/model/ShareContent;",
"Lcom/facebook/share/DeviceShareDialog$Result;",
">;"
}
.end annotation
# static fields
.field private static final DEFAULT_REQUEST_CODE:I
# direct methods
.method static constructor <clinit>()V
.locals 1
.prologue
.line 55
sget-object v0, Lcom/facebook/internal/CallbackManagerImpl$RequestCodeOffset;->DeviceShare:Lcom/facebook/internal/CallbackManagerImpl$RequestCodeOffset;
.line 56
invoke-virtual {v0}, Lcom/facebook/internal/CallbackManagerImpl$RequestCodeOffset;->toRequestCode()I
move-result v0
sput v0, Lcom/facebook/share/DeviceShareDialog;->DEFAULT_REQUEST_CODE:I
.line 55
return-void
.end method
.method public constructor <init>(Landroid/app/Activity;)V
.locals 1
.prologue
.line 62
sget v0, Lcom/facebook/share/DeviceShareDialog;->DEFAULT_REQUEST_CODE:I
invoke-direct {p0, p1, v0}, Lcom/facebook/internal/FacebookDialogBase;-><init>(Landroid/app/Activity;I)V
.line 63
return-void
.end method
.method public constructor <init>(Landroid/app/Fragment;)V
.locals 2
.prologue
.line 69
new-instance v0, Lcom/facebook/internal/FragmentWrapper;
invoke-direct {v0, p1}, Lcom/facebook/internal/FragmentWrapper;-><init>(Landroid/app/Fragment;)V
sget v1, Lcom/facebook/share/DeviceShareDialog;->DEFAULT_REQUEST_CODE:I
invoke-direct {p0, v0, v1}, Lcom/facebook/internal/FacebookDialogBase;-><init>(Lcom/facebook/internal/FragmentWrapper;I)V
.line 70
return-void
.end method
.method public constructor <init>(Landroid/support/v4/app/Fragment;)V
.locals 2
.prologue
.line 76
new-instance v0, Lcom/facebook/internal/FragmentWrapper;
invoke-direct {v0, p1}, Lcom/facebook/internal/FragmentWrapper;-><init>(Landroid/support/v4/app/Fragment;)V
sget v1, Lcom/facebook/share/DeviceShareDialog;->DEFAULT_REQUEST_CODE:I
invoke-direct {p0, v0, v1}, Lcom/facebook/internal/FacebookDialogBase;-><init>(Lcom/facebook/internal/FragmentWrapper;I)V
.line 77
return-void
.end method
# virtual methods
.method protected canShowImpl(Lcom/facebook/share/model/ShareContent;Ljava/lang/Object;)Z
.locals 1
.prologue
.line 81
instance-of v0, p1, Lcom/facebook/share/model/ShareLinkContent;
if-nez v0, :cond_0
instance-of v0, p1, Lcom/facebook/share/model/ShareOpenGraphContent;
if-eqz v0, :cond_1
:cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method protected bridge synthetic canShowImpl(Ljava/lang/Object;Ljava/lang/Object;)Z
.locals 1
.prologue
.line 53
check-cast p1, Lcom/facebook/share/model/ShareContent;
invoke-virtual {p0, p1, p2}, Lcom/facebook/share/DeviceShareDialog;->canShowImpl(Lcom/facebook/share/model/ShareContent;Ljava/lang/Object;)Z
move-result v0
return v0
.end method
.method protected createBaseAppCall()Lcom/facebook/internal/AppCall;
.locals 1
.prologue
.line 110
const/4 v0, 0x0
return-object v0
.end method
.method protected getOrderedModeHandlers()Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List",
"<",
"Lcom/facebook/internal/FacebookDialogBase",
"<",
"Lcom/facebook/share/model/ShareContent;",
"Lcom/facebook/share/DeviceShareDialog$Result;",
">.ModeHandler;>;"
}
.end annotation
.prologue
.line 105
const/4 v0, 0x0
return-object v0
.end method
.method protected registerCallbackImpl(Lcom/facebook/internal/CallbackManagerImpl;Lcom/facebook/FacebookCallback;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/facebook/internal/CallbackManagerImpl;",
"Lcom/facebook/FacebookCallback",
"<",
"Lcom/facebook/share/DeviceShareDialog$Result;",
">;)V"
}
.end annotation
.prologue
.line 118
.line 119
invoke-virtual {p0}, Lcom/facebook/share/DeviceShareDialog;->getRequestCode()I
move-result v0
new-instance v1, Lcom/facebook/share/DeviceShareDialog$1;
invoke-direct {v1, p0, p2}, Lcom/facebook/share/DeviceShareDialog$1;-><init>(Lcom/facebook/share/DeviceShareDialog;Lcom/facebook/FacebookCallback;)V
.line 118
invoke-virtual {p1, v0, v1}, Lcom/facebook/internal/CallbackManagerImpl;->registerCallback(ILcom/facebook/internal/CallbackManagerImpl$Callback;)V
.line 132
return-void
.end method
.method protected showImpl(Lcom/facebook/share/model/ShareContent;Ljava/lang/Object;)V
.locals 3
.prologue
.line 87
if-nez p1, :cond_0
.line 88
new-instance v0, Lcom/facebook/FacebookException;
const-string v1, "Must provide non-null content to share"
invoke-direct {v0, v1}, Lcom/facebook/FacebookException;-><init>(Ljava/lang/String;)V
throw v0
.line 91
:cond_0
instance-of v0, p1, Lcom/facebook/share/model/ShareLinkContent;
if-nez v0, :cond_1
instance-of v0, p1, Lcom/facebook/share/model/ShareOpenGraphContent;
if-nez v0, :cond_1
.line 93
new-instance v0, Lcom/facebook/FacebookException;
new-instance v1, Ljava/lang/StringBuilder;
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object v2
invoke-virtual {v2}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v1
const-string v2, " only supports ShareLinkContent or ShareOpenGraphContent"
invoke-virtual {v1, v2}, 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-direct {v0, v1}, Lcom/facebook/FacebookException;-><init>(Ljava/lang/String;)V
throw v0
.line 96
:cond_1
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 97
invoke-static {}, Lcom/facebook/FacebookSdk;->getApplicationContext()Landroid/content/Context;
move-result-object v1
const-class v2, Lcom/facebook/FacebookActivity;
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;
.line 98
const-string v1, "DeviceShareDialogFragment"
invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 99
const-string v1, "content"
invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
.line 100
invoke-virtual {p0}, Lcom/facebook/share/DeviceShareDialog;->getRequestCode()I
move-result v1
invoke-virtual {p0, v0, v1}, Lcom/facebook/share/DeviceShareDialog;->startActivityForResult(Landroid/content/Intent;I)V
.line 101
return-void
.end method
.method protected bridge synthetic showImpl(Ljava/lang/Object;Ljava/lang/Object;)V
.locals 0
.prologue
.line 53
check-cast p1, Lcom/facebook/share/model/ShareContent;
invoke-virtual {p0, p1, p2}, Lcom/facebook/share/DeviceShareDialog;->showImpl(Lcom/facebook/share/model/ShareContent;Ljava/lang/Object;)V
return-void
.end method