.class public Lcom/facebook/FacebookContentProvider; .super Landroid/content/ContentProvider; .source "FacebookContentProvider.java" # static fields .field private static final ATTACHMENT_URL_BASE:Ljava/lang/String; = "content://com.facebook.app.FacebookContentProvider" .field private static final TAG:Ljava/lang/String; # direct methods .method static constructor ()V .locals 1 .prologue .line 56 const-class v0, Lcom/facebook/FacebookContentProvider; invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String; move-result-object v0 sput-object v0, Lcom/facebook/FacebookContentProvider;->TAG:Ljava/lang/String; return-void .end method .method public constructor ()V .locals 0 .prologue .line 60 invoke-direct {p0}, Landroid/content/ContentProvider;->()V .line 61 return-void .end method .method public static getAttachmentUrl(Ljava/lang/String;Ljava/util/UUID;Ljava/lang/String;)Ljava/lang/String; .locals 4 .prologue .line 72 const-string v0, "%s%s/%s/%s" const/4 v1, 0x4 new-array v1, v1, [Ljava/lang/Object; const/4 v2, 0x0 const-string v3, "content://com.facebook.app.FacebookContentProvider" aput-object v3, v1, v2 const/4 v2, 0x1 aput-object p0, v1, v2 const/4 v2, 0x2 .line 76 invoke-virtual {p1}, Ljava/util/UUID;->toString()Ljava/lang/String; move-result-object v3 aput-object v3, v1, v2 const/4 v2, 0x3 aput-object p2, v1, v2 .line 72 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 # virtual methods .method public delete(Landroid/net/Uri;Ljava/lang/String;[Ljava/lang/String;)I .locals 1 .prologue .line 102 const/4 v0, 0x0 return v0 .end method .method public getType(Landroid/net/Uri;)Ljava/lang/String; .locals 1 .prologue .line 92 const/4 v0, 0x0 return-object v0 .end method .method public insert(Landroid/net/Uri;Landroid/content/ContentValues;)Landroid/net/Uri; .locals 1 .prologue .line 97 const/4 v0, 0x0 return-object v0 .end method .method public onCreate()Z .locals 1 .prologue .line 82 const/4 v0, 0x1 return v0 .end method .method public openFile(Landroid/net/Uri;Ljava/lang/String;)Landroid/os/ParcelFileDescriptor; .locals 4 .prologue .line 114 invoke-virtual {p0, p1}, Lcom/facebook/FacebookContentProvider;->parseCallIdAndAttachmentName(Landroid/net/Uri;)Landroid/util/Pair; move-result-object v1 .line 115 if-nez v1, :cond_0 .line 116 new-instance v0, Ljava/io/FileNotFoundException; invoke-direct {v0}, Ljava/io/FileNotFoundException;->()V throw v0 .line 120 :cond_0 :try_start_0 iget-object v0, v1, Landroid/util/Pair;->first:Ljava/lang/Object; check-cast v0, Ljava/util/UUID; iget-object v1, v1, Landroid/util/Pair;->second:Ljava/lang/Object; check-cast v1, Ljava/lang/String; invoke-static {v0, v1}, Lcom/facebook/internal/NativeAppCallAttachmentStore;->openAttachment(Ljava/util/UUID;Ljava/lang/String;)Ljava/io/File; move-result-object v0 .line 124 const/high16 v1, 0x10000000 invoke-static {v0, v1}, Landroid/os/ParcelFileDescriptor;->open(Ljava/io/File;I)Landroid/os/ParcelFileDescriptor; :try_end_0 .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0 move-result-object v0 return-object v0 .line 125 :catch_0 move-exception v0 .line 126 sget-object v1, Lcom/facebook/FacebookContentProvider;->TAG:Ljava/lang/String; new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V const-string v3, "Got unexpected exception:" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v2 invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I .line 127 throw v0 .end method .method parseCallIdAndAttachmentName(Landroid/net/Uri;)Landroid/util/Pair; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroid/net/Uri;", ")", "Landroid/util/Pair", "<", "Ljava/util/UUID;", "Ljava/lang/String;", ">;" } .end annotation .prologue .line 136 :try_start_0 invoke-virtual {p1}, Landroid/net/Uri;->getPath()Ljava/lang/String; move-result-object v0 const/4 v1, 0x1 invoke-virtual {v0, v1}, Ljava/lang/String;->substring(I)Ljava/lang/String; move-result-object v0 .line 137 const-string v1, "/" invoke-virtual {v0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String; move-result-object v0 .line 139 const/4 v1, 0x0 aget-object v1, v0, v1 .line 140 const/4 v2, 0x1 aget-object v2, v0, v2 .line 141 invoke-static {v1}, Ljava/util/UUID;->fromString(Ljava/lang/String;)Ljava/util/UUID; move-result-object v1 .line 143 new-instance v0, Landroid/util/Pair; invoke-direct {v0, v1, v2}, Landroid/util/Pair;->(Ljava/lang/Object;Ljava/lang/Object;)V :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 .line 145 :goto_0 return-object v0 .line 144 :catch_0 move-exception v0 .line 145 const/4 v0, 0x0 goto :goto_0 .end method .method public query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor; .locals 1 .prologue .line 87 const/4 v0, 0x0 return-object v0 .end method .method public update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I .locals 1 .prologue .line 107 const/4 v0, 0x0 return v0 .end method