ShareInternalUtility$8.smali
.class final Lcom/facebook/share/internal/ShareInternalUtility$8;
.super Ljava/lang/Object;
.source "ShareInternalUtility.java"
# interfaces
.implements Lcom/facebook/share/internal/OpenGraphJSONUtility$PhotoJSONProcessor;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/facebook/share/internal/ShareInternalUtility;->toJSONObjectForWeb(Lcom/facebook/share/model/ShareOpenGraphContent;)Lorg/json/JSONObject;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = null
.end annotation
# direct methods
.method constructor <init>()V
.registers 1
.line 445
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public toJSONObject(Lcom/facebook/share/model/SharePhoto;)Lorg/json/JSONObject;
.registers 4
.line 448
invoke-virtual {p1}, Lcom/facebook/share/model/SharePhoto;->getImageUrl()Landroid/net/Uri;
move-result-object p1
.line 449
invoke-static {p1}, Lcom/facebook/internal/Utility;->isWebUri(Landroid/net/Uri;)Z
move-result v0
if-eqz v0, :cond_23
.line 453
new-instance v0, Lorg/json/JSONObject;
invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V
:try_start_f
const-string/jumbo v1, "url"
.line 456
invoke-virtual {p1}, Landroid/net/Uri;->toString()Ljava/lang/String;
move-result-object p1
.line 455
invoke-virtual {v0, v1, p1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;
:try_end_19
.catch Lorg/json/JSONException; {:try_start_f .. :try_end_19} :catch_1a
return-object v0
:catch_1a
move-exception p1
.line 458
new-instance v0, Lcom/facebook/FacebookException;
const-string v1, "Unable to attach images"
invoke-direct {v0, v1, p1}, Lcom/facebook/FacebookException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
throw v0
.line 450
:cond_23
new-instance p1, Lcom/facebook/FacebookException;
const-string v0, "Only web images may be used in OG objects shared via the web dialog"
invoke-direct {p1, v0}, Lcom/facebook/FacebookException;-><init>(Ljava/lang/String;)V
throw p1
.end method