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.
412 lines
11 KiB
412 lines
11 KiB
.class public final Lcom/facebook/internal/ServerProtocol; |
|
.super Ljava/lang/Object; |
|
.source "ServerProtocol.java" |
|
|
|
|
|
# static fields |
|
.field private static final DIALOG_AUTHORITY_FORMAT:Ljava/lang/String; = "m.%s" |
|
|
|
.field public static final DIALOG_CANCEL_URI:Ljava/lang/String; = "fbconnect://cancel" |
|
|
|
.field public static final DIALOG_PARAM_ACCESS_TOKEN:Ljava/lang/String; = "access_token" |
|
|
|
.field public static final DIALOG_PARAM_APP_ID:Ljava/lang/String; = "app_id" |
|
|
|
.field public static final DIALOG_PARAM_AUTH_TYPE:Ljava/lang/String; = "auth_type" |
|
|
|
.field public static final DIALOG_PARAM_CLIENT_ID:Ljava/lang/String; = "client_id" |
|
|
|
.field public static final DIALOG_PARAM_DEFAULT_AUDIENCE:Ljava/lang/String; = "default_audience" |
|
|
|
.field public static final DIALOG_PARAM_DISPLAY:Ljava/lang/String; = "display" |
|
|
|
.field public static final DIALOG_PARAM_DISPLAY_TOUCH:Ljava/lang/String; = "touch" |
|
|
|
.field public static final DIALOG_PARAM_E2E:Ljava/lang/String; = "e2e" |
|
|
|
.field public static final DIALOG_PARAM_LEGACY_OVERRIDE:Ljava/lang/String; = "legacy_override" |
|
|
|
.field public static final DIALOG_PARAM_REDIRECT_URI:Ljava/lang/String; = "redirect_uri" |
|
|
|
.field public static final DIALOG_PARAM_RESPONSE_TYPE:Ljava/lang/String; = "response_type" |
|
|
|
.field public static final DIALOG_PARAM_RETURN_SCOPES:Ljava/lang/String; = "return_scopes" |
|
|
|
.field public static final DIALOG_PARAM_SCOPE:Ljava/lang/String; = "scope" |
|
|
|
.field public static final DIALOG_PARAM_SDK_VERSION:Ljava/lang/String; = "sdk" |
|
|
|
.field public static final DIALOG_PARAM_SSO_DEVICE:Ljava/lang/String; = "sso" |
|
|
|
.field public static final DIALOG_PARAM_STATE:Ljava/lang/String; = "state" |
|
|
|
.field public static final DIALOG_PATH:Ljava/lang/String; = "dialog/" |
|
|
|
.field public static final DIALOG_REDIRECT_URI:Ljava/lang/String; = "fbconnect://success" |
|
|
|
.field public static final DIALOG_REREQUEST_AUTH_TYPE:Ljava/lang/String; = "rerequest" |
|
|
|
.field public static final DIALOG_RESPONSE_TYPE_TOKEN_AND_SIGNED_REQUEST:Ljava/lang/String; = "token,signed_request" |
|
|
|
.field public static final DIALOG_RETURN_SCOPES_TRUE:Ljava/lang/String; = "true" |
|
|
|
.field public static final FALLBACK_DIALOG_DISPLAY_VALUE_TOUCH:Ljava/lang/String; = "touch" |
|
|
|
.field public static final FALLBACK_DIALOG_PARAM_APP_ID:Ljava/lang/String; = "app_id" |
|
|
|
.field public static final FALLBACK_DIALOG_PARAM_BRIDGE_ARGS:Ljava/lang/String; = "bridge_args" |
|
|
|
.field public static final FALLBACK_DIALOG_PARAM_KEY_HASH:Ljava/lang/String; = "android_key_hash" |
|
|
|
.field public static final FALLBACK_DIALOG_PARAM_METHOD_ARGS:Ljava/lang/String; = "method_args" |
|
|
|
.field public static final FALLBACK_DIALOG_PARAM_METHOD_RESULTS:Ljava/lang/String; = "method_results" |
|
|
|
.field public static final FALLBACK_DIALOG_PARAM_VERSION:Ljava/lang/String; = "version" |
|
|
|
.field private static final GRAPH_API_VERSION:Ljava/lang/String; = "v2.9" |
|
|
|
.field private static final GRAPH_URL_FORMAT:Ljava/lang/String; = "https://graph.%s" |
|
|
|
.field private static final GRAPH_VIDEO_URL_FORMAT:Ljava/lang/String; = "https://graph-video.%s" |
|
|
|
.field private static final TAG:Ljava/lang/String; |
|
|
|
.field public static final errorConnectionFailure:Ljava/lang/String; = "CONNECTION_FAILURE" |
|
|
|
.field public static final errorsProxyAuthDisabled:Ljava/util/Collection; |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"Ljava/util/Collection", |
|
"<", |
|
"Ljava/lang/String;", |
|
">;" |
|
} |
|
.end annotation |
|
.end field |
|
|
|
.field public static final errorsUserCanceled:Ljava/util/Collection; |
|
.annotation system Ldalvik/annotation/Signature; |
|
value = { |
|
"Ljava/util/Collection", |
|
"<", |
|
"Ljava/lang/String;", |
|
">;" |
|
} |
|
.end annotation |
|
.end field |
|
|
|
|
|
# direct methods |
|
.method static constructor <clinit>()V |
|
.locals 5 |
|
|
|
.prologue |
|
const/4 v4, 0x2 |
|
|
|
const/4 v3, 0x1 |
|
|
|
const/4 v2, 0x0 |
|
|
|
.line 41 |
|
const-class v0, Lcom/facebook/internal/ServerProtocol; |
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
sput-object v0, Lcom/facebook/internal/ServerProtocol;->TAG:Ljava/lang/String; |
|
|
|
.line 81 |
|
new-array v0, v4, [Ljava/lang/String; |
|
|
|
const-string v1, "service_disabled" |
|
|
|
aput-object v1, v0, v2 |
|
|
|
const-string v1, "AndroidAuthKillSwitchException" |
|
|
|
aput-object v1, v0, v3 |
|
|
|
.line 82 |
|
invoke-static {v0}, Lcom/facebook/internal/Utility;->unmodifiableCollection([Ljava/lang/Object;)Ljava/util/Collection; |
|
|
|
move-result-object v0 |
|
|
|
sput-object v0, Lcom/facebook/internal/ServerProtocol;->errorsProxyAuthDisabled:Ljava/util/Collection; |
|
|
|
.line 83 |
|
new-array v0, v4, [Ljava/lang/String; |
|
|
|
const-string v1, "access_denied" |
|
|
|
aput-object v1, v0, v2 |
|
|
|
const-string v1, "OAuthAccessDeniedException" |
|
|
|
aput-object v1, v0, v3 |
|
|
|
.line 84 |
|
invoke-static {v0}, Lcom/facebook/internal/Utility;->unmodifiableCollection([Ljava/lang/Object;)Ljava/util/Collection; |
|
|
|
move-result-object v0 |
|
|
|
sput-object v0, Lcom/facebook/internal/ServerProtocol;->errorsUserCanceled:Ljava/util/Collection; |
|
|
|
.line 83 |
|
return-void |
|
.end method |
|
|
|
.method public constructor <init>()V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 40 |
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
return-void |
|
.end method |
|
|
|
.method public static final getDefaultAPIVersion()Ljava/lang/String; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 100 |
|
const-string v0, "v2.9" |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static final getDialogAuthority()Ljava/lang/String; |
|
.locals 4 |
|
|
|
.prologue |
|
.line 88 |
|
const-string v0, "m.%s" |
|
|
|
const/4 v1, 0x1 |
|
|
|
new-array v1, v1, [Ljava/lang/Object; |
|
|
|
const/4 v2, 0x0 |
|
|
|
invoke-static {}, Lcom/facebook/FacebookSdk;->getFacebookDomain()Ljava/lang/String; |
|
|
|
move-result-object v3 |
|
|
|
aput-object v3, v1, v2 |
|
|
|
invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static final getGraphUrlBase()Ljava/lang/String; |
|
.locals 4 |
|
|
|
.prologue |
|
.line 92 |
|
const-string v0, "https://graph.%s" |
|
|
|
const/4 v1, 0x1 |
|
|
|
new-array v1, v1, [Ljava/lang/Object; |
|
|
|
const/4 v2, 0x0 |
|
|
|
invoke-static {}, Lcom/facebook/FacebookSdk;->getFacebookDomain()Ljava/lang/String; |
|
|
|
move-result-object v3 |
|
|
|
aput-object v3, v1, v2 |
|
|
|
invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static final getGraphVideoUrlBase()Ljava/lang/String; |
|
.locals 4 |
|
|
|
.prologue |
|
.line 96 |
|
const-string v0, "https://graph-video.%s" |
|
|
|
const/4 v1, 0x1 |
|
|
|
new-array v1, v1, [Ljava/lang/Object; |
|
|
|
const/4 v2, 0x0 |
|
|
|
invoke-static {}, Lcom/facebook/FacebookSdk;->getFacebookDomain()Ljava/lang/String; |
|
|
|
move-result-object v3 |
|
|
|
aput-object v3, v1, v2 |
|
|
|
invoke-static {v0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public static getQueryParamsForPlatformActivityIntentWebFallback(Ljava/lang/String;ILandroid/os/Bundle;)Landroid/os/Bundle; |
|
.locals 7 |
|
|
|
.prologue |
|
const/4 v1, 0x0 |
|
|
|
.line 108 |
|
invoke-static {}, Lcom/facebook/FacebookSdk;->getApplicationContext()Landroid/content/Context; |
|
|
|
move-result-object v0 |
|
|
|
.line 109 |
|
invoke-static {v0}, Lcom/facebook/FacebookSdk;->getApplicationSignature(Landroid/content/Context;)Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
.line 110 |
|
invoke-static {v2}, Lcom/facebook/internal/Utility;->isNullOrEmpty(Ljava/lang/String;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_1 |
|
|
|
.line 142 |
|
:cond_0 |
|
:goto_0 |
|
return-object v1 |
|
|
|
.line 114 |
|
:cond_1 |
|
new-instance v0, Landroid/os/Bundle; |
|
|
|
invoke-direct {v0}, Landroid/os/Bundle;-><init>()V |
|
|
|
.line 116 |
|
const-string v3, "android_key_hash" |
|
|
|
invoke-virtual {v0, v3, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V |
|
|
|
.line 117 |
|
const-string v2, "app_id" |
|
|
|
invoke-static {}, Lcom/facebook/FacebookSdk;->getApplicationId()Ljava/lang/String; |
|
|
|
move-result-object v3 |
|
|
|
invoke-virtual {v0, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V |
|
|
|
.line 118 |
|
const-string v2, "version" |
|
|
|
invoke-virtual {v0, v2, p1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V |
|
|
|
.line 119 |
|
const-string v2, "display" |
|
|
|
const-string v3, "touch" |
|
|
|
invoke-virtual {v0, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V |
|
|
|
.line 121 |
|
new-instance v2, Landroid/os/Bundle; |
|
|
|
invoke-direct {v2}, Landroid/os/Bundle;-><init>()V |
|
|
|
.line 122 |
|
const-string v3, "action_id" |
|
|
|
invoke-virtual {v2, v3, p0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V |
|
|
|
.line 124 |
|
if-nez p2, :cond_2 |
|
|
|
new-instance p2, Landroid/os/Bundle; |
|
|
|
invoke-direct {p2}, Landroid/os/Bundle;-><init>()V |
|
|
|
.line 127 |
|
:cond_2 |
|
:try_start_0 |
|
invoke-static {v2}, Lcom/facebook/internal/BundleJSONConverter;->convertToJSON(Landroid/os/Bundle;)Lorg/json/JSONObject; |
|
|
|
move-result-object v2 |
|
|
|
.line 128 |
|
invoke-static {p2}, Lcom/facebook/internal/BundleJSONConverter;->convertToJSON(Landroid/os/Bundle;)Lorg/json/JSONObject; |
|
|
|
move-result-object v3 |
|
|
|
.line 130 |
|
if-eqz v2, :cond_0 |
|
|
|
if-eqz v3, :cond_0 |
|
|
|
.line 134 |
|
const-string v4, "bridge_args" |
|
|
|
invoke-virtual {v2}, Lorg/json/JSONObject;->toString()Ljava/lang/String; |
|
|
|
move-result-object v2 |
|
|
|
invoke-virtual {v0, v4, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V |
|
|
|
.line 135 |
|
const-string v2, "method_args" |
|
|
|
invoke-virtual {v3}, Lorg/json/JSONObject;->toString()Ljava/lang/String; |
|
|
|
move-result-object v3 |
|
|
|
invoke-virtual {v0, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V |
|
:try_end_0 |
|
.catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0 |
|
|
|
:goto_1 |
|
move-object v1, v0 |
|
|
|
.line 142 |
|
goto :goto_0 |
|
|
|
.line 136 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 138 |
|
sget-object v2, Lcom/facebook/LoggingBehavior;->DEVELOPER_ERRORS:Lcom/facebook/LoggingBehavior; |
|
|
|
const/4 v3, 0x6 |
|
|
|
sget-object v4, Lcom/facebook/internal/ServerProtocol;->TAG:Ljava/lang/String; |
|
|
|
new-instance v5, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v6, "Error creating Url -- " |
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v5 |
|
|
|
invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
invoke-static {v2, v3, v4, v0}, Lcom/facebook/internal/Logger;->log(Lcom/facebook/LoggingBehavior;ILjava/lang/String;Ljava/lang/String;)V |
|
|
|
move-object v0, v1 |
|
|
|
goto :goto_1 |
|
.end method
|
|
|