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

204 lines
4.9 KiB

.class Lcom/facebook/AccessTokenManager$2;
.super Ljava/lang/Object;
.source "AccessTokenManager.java"
# interfaces
.implements Lcom/facebook/GraphRequest$Callback;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/facebook/AccessTokenManager;->refreshCurrentAccessTokenImpl(Lcom/facebook/AccessToken$AccessTokenRefreshCallback;)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/facebook/AccessTokenManager;
.field final synthetic val$declinedPermissions:Ljava/util/Set;
.field final synthetic val$permissions:Ljava/util/Set;
.field final synthetic val$permissionsCallSucceeded:Ljava/util/concurrent/atomic/AtomicBoolean;
# direct methods
.method constructor <init>(Lcom/facebook/AccessTokenManager;Ljava/util/concurrent/atomic/AtomicBoolean;Ljava/util/Set;Ljava/util/Set;)V
.locals 0
.prologue
.line 237
iput-object p1, p0, Lcom/facebook/AccessTokenManager$2;->this$0:Lcom/facebook/AccessTokenManager;
iput-object p2, p0, Lcom/facebook/AccessTokenManager$2;->val$permissionsCallSucceeded:Ljava/util/concurrent/atomic/AtomicBoolean;
iput-object p3, p0, Lcom/facebook/AccessTokenManager$2;->val$permissions:Ljava/util/Set;
iput-object p4, p0, Lcom/facebook/AccessTokenManager$2;->val$declinedPermissions:Ljava/util/Set;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public onCompleted(Lcom/facebook/GraphResponse;)V
.locals 6
.prologue
.line 240
invoke-virtual {p1}, Lcom/facebook/GraphResponse;->getJSONObject()Lorg/json/JSONObject;
move-result-object v0
.line 241
if-nez v0, :cond_1
.line 268
:cond_0
return-void
.line 244
:cond_1
const-string v1, "data"
invoke-virtual {v0, v1}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;
move-result-object v1
.line 245
if-eqz v1, :cond_0
.line 248
iget-object v0, p0, Lcom/facebook/AccessTokenManager$2;->val$permissionsCallSucceeded:Ljava/util/concurrent/atomic/AtomicBoolean;
const/4 v2, 0x1
invoke-virtual {v0, v2}, Ljava/util/concurrent/atomic/AtomicBoolean;->set(Z)V
.line 249
const/4 v0, 0x0
:goto_0
invoke-virtual {v1}, Lorg/json/JSONArray;->length()I
move-result v2
if-ge v0, v2, :cond_0
.line 250
invoke-virtual {v1, v0}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;
move-result-object v2
.line 251
if-nez v2, :cond_3
.line 249
:cond_2
:goto_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
.line 254
:cond_3
const-string v3, "permission"
invoke-virtual {v2, v3}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v3
.line 255
const-string v4, "status"
invoke-virtual {v2, v4}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;
move-result-object v2
.line 256
invoke-static {v3}, Lcom/facebook/internal/Utility;->isNullOrEmpty(Ljava/lang/String;)Z
move-result v4
if-nez v4, :cond_2
.line 257
invoke-static {v2}, Lcom/facebook/internal/Utility;->isNullOrEmpty(Ljava/lang/String;)Z
move-result v4
if-nez v4, :cond_2
.line 258
sget-object v4, Ljava/util/Locale;->US:Ljava/util/Locale;
invoke-virtual {v2, v4}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
move-result-object v2
.line 259
const-string v4, "granted"
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_4
.line 260
iget-object v2, p0, Lcom/facebook/AccessTokenManager$2;->val$permissions:Ljava/util/Set;
invoke-interface {v2, v3}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
goto :goto_1
.line 261
:cond_4
const-string v4, "declined"
invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_5
.line 262
iget-object v2, p0, Lcom/facebook/AccessTokenManager$2;->val$declinedPermissions:Ljava/util/Set;
invoke-interface {v2, v3}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
goto :goto_1
.line 264
:cond_5
const-string v3, "AccessTokenManager"
new-instance v4, Ljava/lang/StringBuilder;
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
const-string v5, "Unexpected status: "
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4, v2}, 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 {v3, v2}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_1
.end method