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.
286 lines
7.9 KiB
286 lines
7.9 KiB
.class public Lcom/facebook/internal/WebDialog$Builder; |
|
.super Ljava/lang/Object; |
|
.source "WebDialog.java" |
|
|
|
|
|
# annotations |
|
.annotation system Ldalvik/annotation/EnclosingClass; |
|
value = Lcom/facebook/internal/WebDialog; |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/InnerClass; |
|
accessFlags = 0x9 |
|
name = "Builder" |
|
.end annotation |
|
|
|
|
|
# instance fields |
|
.field private accessToken:Lcom/facebook/AccessToken; |
|
|
|
.field private action:Ljava/lang/String; |
|
|
|
.field private applicationId:Ljava/lang/String; |
|
|
|
.field private context:Landroid/content/Context; |
|
|
|
.field private listener:Lcom/facebook/internal/WebDialog$OnCompleteListener; |
|
|
|
.field private parameters:Landroid/os/Bundle; |
|
|
|
.field private theme:I |
|
|
|
|
|
# direct methods |
|
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Landroid/os/Bundle;)V |
|
.locals 2 |
|
|
|
.prologue |
|
.line 601 |
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
.line 602 |
|
invoke-static {}, Lcom/facebook/AccessToken;->getCurrentAccessToken()Lcom/facebook/AccessToken; |
|
|
|
move-result-object v0 |
|
|
|
iput-object v0, p0, Lcom/facebook/internal/WebDialog$Builder;->accessToken:Lcom/facebook/AccessToken; |
|
|
|
.line 603 |
|
iget-object v0, p0, Lcom/facebook/internal/WebDialog$Builder;->accessToken:Lcom/facebook/AccessToken; |
|
|
|
if-nez v0, :cond_0 |
|
|
|
.line 604 |
|
invoke-static {p1}, Lcom/facebook/internal/Utility;->getMetadataApplicationId(Landroid/content/Context;)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
.line 605 |
|
if-eqz v0, :cond_1 |
|
|
|
.line 606 |
|
iput-object v0, p0, Lcom/facebook/internal/WebDialog$Builder;->applicationId:Ljava/lang/String; |
|
|
|
.line 613 |
|
:cond_0 |
|
invoke-direct {p0, p1, p2, p3}, Lcom/facebook/internal/WebDialog$Builder;->finishInit(Landroid/content/Context;Ljava/lang/String;Landroid/os/Bundle;)V |
|
|
|
.line 614 |
|
return-void |
|
|
|
.line 608 |
|
:cond_1 |
|
new-instance v0, Lcom/facebook/FacebookException; |
|
|
|
const-string v1, "Attempted to create a builder without a valid access token or a valid default Application ID." |
|
|
|
invoke-direct {v0, v1}, Lcom/facebook/FacebookException;-><init>(Ljava/lang/String;)V |
|
|
|
throw v0 |
|
.end method |
|
|
|
.method public constructor <init>(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 625 |
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
.line 626 |
|
if-nez p2, :cond_0 |
|
|
|
.line 627 |
|
invoke-static {p1}, Lcom/facebook/internal/Utility;->getMetadataApplicationId(Landroid/content/Context;)Ljava/lang/String; |
|
|
|
move-result-object p2 |
|
|
|
.line 629 |
|
:cond_0 |
|
const-string v0, "applicationId" |
|
|
|
invoke-static {p2, v0}, Lcom/facebook/internal/Validate;->notNullOrEmpty(Ljava/lang/String;Ljava/lang/String;)V |
|
|
|
.line 630 |
|
iput-object p2, p0, Lcom/facebook/internal/WebDialog$Builder;->applicationId:Ljava/lang/String; |
|
|
|
.line 632 |
|
invoke-direct {p0, p1, p3, p4}, Lcom/facebook/internal/WebDialog$Builder;->finishInit(Landroid/content/Context;Ljava/lang/String;Landroid/os/Bundle;)V |
|
|
|
.line 633 |
|
return-void |
|
.end method |
|
|
|
.method private finishInit(Landroid/content/Context;Ljava/lang/String;Landroid/os/Bundle;)V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 699 |
|
iput-object p1, p0, Lcom/facebook/internal/WebDialog$Builder;->context:Landroid/content/Context; |
|
|
|
.line 700 |
|
iput-object p2, p0, Lcom/facebook/internal/WebDialog$Builder;->action:Ljava/lang/String; |
|
|
|
.line 701 |
|
if-eqz p3, :cond_0 |
|
|
|
.line 702 |
|
iput-object p3, p0, Lcom/facebook/internal/WebDialog$Builder;->parameters:Landroid/os/Bundle; |
|
|
|
.line 706 |
|
:goto_0 |
|
return-void |
|
|
|
.line 704 |
|
:cond_0 |
|
new-instance v0, Landroid/os/Bundle; |
|
|
|
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V |
|
|
|
iput-object v0, p0, Lcom/facebook/internal/WebDialog$Builder;->parameters:Landroid/os/Bundle; |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public build()Lcom/facebook/internal/WebDialog; |
|
.locals 6 |
|
|
|
.prologue |
|
.line 664 |
|
iget-object v0, p0, Lcom/facebook/internal/WebDialog$Builder;->accessToken:Lcom/facebook/AccessToken; |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 665 |
|
iget-object v0, p0, Lcom/facebook/internal/WebDialog$Builder;->parameters:Landroid/os/Bundle; |
|
|
|
const-string v1, "app_id" |
|
|
|
iget-object v2, p0, Lcom/facebook/internal/WebDialog$Builder;->accessToken:Lcom/facebook/AccessToken; |
|
|
|
.line 667 |
|
invoke-virtual {v2}, Lcom/facebook/AccessToken;->getApplicationId()Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
.line 665 |
|
invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V |
|
|
|
.line 668 |
|
iget-object v0, p0, Lcom/facebook/internal/WebDialog$Builder;->parameters:Landroid/os/Bundle; |
|
|
|
const-string v1, "access_token" |
|
|
|
iget-object v2, p0, Lcom/facebook/internal/WebDialog$Builder;->accessToken:Lcom/facebook/AccessToken; |
|
|
|
.line 670 |
|
invoke-virtual {v2}, Lcom/facebook/AccessToken;->getToken()Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
.line 668 |
|
invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V |
|
|
|
.line 675 |
|
:goto_0 |
|
new-instance v0, Lcom/facebook/internal/WebDialog; |
|
|
|
iget-object v1, p0, Lcom/facebook/internal/WebDialog$Builder;->context:Landroid/content/Context; |
|
|
|
iget-object v2, p0, Lcom/facebook/internal/WebDialog$Builder;->action:Ljava/lang/String; |
|
|
|
iget-object v3, p0, Lcom/facebook/internal/WebDialog$Builder;->parameters:Landroid/os/Bundle; |
|
|
|
iget v4, p0, Lcom/facebook/internal/WebDialog$Builder;->theme:I |
|
|
|
iget-object v5, p0, Lcom/facebook/internal/WebDialog$Builder;->listener:Lcom/facebook/internal/WebDialog$OnCompleteListener; |
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/facebook/internal/WebDialog;-><init>(Landroid/content/Context;Ljava/lang/String;Landroid/os/Bundle;ILcom/facebook/internal/WebDialog$OnCompleteListener;)V |
|
|
|
return-object v0 |
|
|
|
.line 672 |
|
:cond_0 |
|
iget-object v0, p0, Lcom/facebook/internal/WebDialog$Builder;->parameters:Landroid/os/Bundle; |
|
|
|
const-string v1, "app_id" |
|
|
|
iget-object v2, p0, Lcom/facebook/internal/WebDialog$Builder;->applicationId:Ljava/lang/String; |
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method public getApplicationId()Ljava/lang/String; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 679 |
|
iget-object v0, p0, Lcom/facebook/internal/WebDialog$Builder;->applicationId:Ljava/lang/String; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public getContext()Landroid/content/Context; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 683 |
|
iget-object v0, p0, Lcom/facebook/internal/WebDialog$Builder;->context:Landroid/content/Context; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public getListener()Lcom/facebook/internal/WebDialog$OnCompleteListener; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 695 |
|
iget-object v0, p0, Lcom/facebook/internal/WebDialog$Builder;->listener:Lcom/facebook/internal/WebDialog$OnCompleteListener; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public getParameters()Landroid/os/Bundle; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 691 |
|
iget-object v0, p0, Lcom/facebook/internal/WebDialog$Builder;->parameters:Landroid/os/Bundle; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public getTheme()I |
|
.locals 1 |
|
|
|
.prologue |
|
.line 687 |
|
iget v0, p0, Lcom/facebook/internal/WebDialog$Builder;->theme:I |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public setOnCompleteListener(Lcom/facebook/internal/WebDialog$OnCompleteListener;)Lcom/facebook/internal/WebDialog$Builder; |
|
.locals 0 |
|
|
|
.prologue |
|
.line 653 |
|
iput-object p1, p0, Lcom/facebook/internal/WebDialog$Builder;->listener:Lcom/facebook/internal/WebDialog$OnCompleteListener; |
|
|
|
.line 654 |
|
return-object p0 |
|
.end method |
|
|
|
.method public setTheme(I)Lcom/facebook/internal/WebDialog$Builder; |
|
.locals 0 |
|
|
|
.prologue |
|
.line 642 |
|
iput p1, p0, Lcom/facebook/internal/WebDialog$Builder;->theme:I |
|
|
|
.line 643 |
|
return-object p0 |
|
.end method
|
|
|