.class public final Lcom/facebook/internal/Utility; .super Ljava/lang/Object; .source "Utility.java" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/facebook/internal/Utility$PermissionsPair;, Lcom/facebook/internal/Utility$GraphMeRequestWithCacheCallback;, Lcom/facebook/internal/Utility$Mapper;, Lcom/facebook/internal/Utility$Predicate; } .end annotation # static fields .field public static final DEFAULT_STREAM_BUFFER_SIZE:I = 0x2000 .field private static final EXTRA_APP_EVENTS_INFO_FORMAT_VERSION:Ljava/lang/String; = "a2" .field private static final GINGERBREAD_MR1:I = 0xa .field private static final HASH_ALGORITHM_MD5:Ljava/lang/String; = "MD5" .field private static final HASH_ALGORITHM_SHA1:Ljava/lang/String; = "SHA-1" .field static final LOG_TAG:Ljava/lang/String; = "FacebookSDK" .field private static final REFRESH_TIME_FOR_EXTENDED_DEVICE_INFO_MILLIS:I = 0x1b7740 .field private static final URL_SCHEME:Ljava/lang/String; = "https" .field private static final UTF8:Ljava/lang/String; = "UTF-8" .field private static availableExternalStorageGB:J = 0x0L .field private static carrierName:Ljava/lang/String; = null .field private static deviceTimeZoneName:Ljava/lang/String; = null .field private static deviceTimezoneAbbreviation:Ljava/lang/String; = null .field private static final noCarrierConstant:Ljava/lang/String; = "NoCarrier" .field private static numCPUCores:I .field private static timestampOfLastCheck:J .field private static totalExternalStorageGB:J # direct methods .method static constructor ()V .locals 4 .prologue const-wide/16 v2, -0x1 .line 114 const/4 v0, 0x0 sput v0, Lcom/facebook/internal/Utility;->numCPUCores:I .line 116 sput-wide v2, Lcom/facebook/internal/Utility;->timestampOfLastCheck:J .line 117 sput-wide v2, Lcom/facebook/internal/Utility;->totalExternalStorageGB:J .line 118 sput-wide v2, Lcom/facebook/internal/Utility;->availableExternalStorageGB:J .line 119 const-string v0, "" sput-object v0, Lcom/facebook/internal/Utility;->deviceTimezoneAbbreviation:Ljava/lang/String; .line 120 const-string v0, "" sput-object v0, Lcom/facebook/internal/Utility;->deviceTimeZoneName:Ljava/lang/String; .line 121 const-string v0, "NoCarrier" sput-object v0, Lcom/facebook/internal/Utility;->carrierName:Ljava/lang/String; return-void .end method .method public constructor ()V .locals 0 .prologue .line 94 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method public static areObjectsEqual(Ljava/lang/Object;Ljava/lang/Object;)Z .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(TT;TT;)Z" } .end annotation .prologue .line 594 if-nez p0, :cond_1 .line 595 if-nez p1, :cond_0 const/4 v0, 0x1 .line 597 :goto_0 return v0 .line 595 :cond_0 const/4 v0, 0x0 goto :goto_0 .line 597 :cond_1 invoke-virtual {p0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z move-result v0 goto :goto_0 .end method .method public static varargs arrayList([Ljava/lang/Object;)Ljava/util/ArrayList; .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "([TT;)", "Ljava/util/ArrayList", ";" } .end annotation .prologue .line 252 new-instance v1, Ljava/util/ArrayList; array-length v0, p0 invoke-direct {v1, v0}, Ljava/util/ArrayList;->(I)V .line 253 array-length v2, p0 const/4 v0, 0x0 :goto_0 if-ge v0, v2, :cond_0 aget-object v3, p0, v0 .line 254 invoke-virtual {v1, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z .line 253 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 256 :cond_0 return-object v1 .end method .method public static varargs asListNoNulls([Ljava/lang/Object;)Ljava/util/List; .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "([TT;)", "Ljava/util/List", ";" } .end annotation .prologue .line 648 new-instance v1, Ljava/util/ArrayList; invoke-direct {v1}, Ljava/util/ArrayList;->()V .line 649 array-length v2, p0 const/4 v0, 0x0 :goto_0 if-ge v0, v2, :cond_1 aget-object v3, p0, v0 .line 650 if-eqz v3, :cond_0 .line 651 invoke-virtual {v1, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z .line 649 :cond_0 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 654 :cond_1 return-object v1 .end method .method public static awaitGetGraphMeRequestWithCache(Ljava/lang/String;)Lorg/json/JSONObject; .locals 2 .prologue .line 989 invoke-static {p0}, Lcom/facebook/internal/ProfileInformationCache;->getProfileInformation(Ljava/lang/String;)Lorg/json/JSONObject; move-result-object v0 .line 990 if-eqz v0, :cond_0 .line 1000 :goto_0 return-object v0 .line 994 :cond_0 invoke-static {p0}, Lcom/facebook/internal/Utility;->getGraphMeRequestWithCache(Ljava/lang/String;)Lcom/facebook/GraphRequest; move-result-object v0 .line 995 invoke-virtual {v0}, Lcom/facebook/GraphRequest;->executeAndWait()Lcom/facebook/GraphResponse; move-result-object v0 .line 996 invoke-virtual {v0}, Lcom/facebook/GraphResponse;->getError()Lcom/facebook/FacebookRequestError; move-result-object v1 if-eqz v1, :cond_1 .line 997 const/4 v0, 0x0 goto :goto_0 .line 1000 :cond_1 invoke-virtual {v0}, Lcom/facebook/GraphResponse;->getJSONObject()Lorg/json/JSONObject; move-result-object v0 goto :goto_0 .end method .method public static buildUri(Ljava/lang/String;Ljava/lang/String;Landroid/os/Bundle;)Landroid/net/Uri; .locals 5 .prologue .line 305 new-instance v2, Landroid/net/Uri$Builder; invoke-direct {v2}, Landroid/net/Uri$Builder;->()V .line 306 const-string v0, "https" invoke-virtual {v2, v0}, Landroid/net/Uri$Builder;->scheme(Ljava/lang/String;)Landroid/net/Uri$Builder; .line 307 invoke-virtual {v2, p0}, Landroid/net/Uri$Builder;->authority(Ljava/lang/String;)Landroid/net/Uri$Builder; .line 308 invoke-virtual {v2, p1}, Landroid/net/Uri$Builder;->path(Ljava/lang/String;)Landroid/net/Uri$Builder; .line 309 if-eqz p2, :cond_1 .line 310 invoke-virtual {p2}, Landroid/os/Bundle;->keySet()Ljava/util/Set; move-result-object v0 invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object v3 :cond_0 :goto_0 invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_1 invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/lang/String; .line 311 invoke-virtual {p2, v0}, Landroid/os/Bundle;->get(Ljava/lang/String;)Ljava/lang/Object; move-result-object v1 .line 312 instance-of v4, v1, Ljava/lang/String; if-eqz v4, :cond_0 .line 313 check-cast v1, Ljava/lang/String; invoke-virtual {v2, v0, v1}, Landroid/net/Uri$Builder;->appendQueryParameter(Ljava/lang/String;Ljava/lang/String;)Landroid/net/Uri$Builder; goto :goto_0 .line 317 :cond_1 invoke-virtual {v2}, Landroid/net/Uri$Builder;->build()Landroid/net/Uri; move-result-object v0 return-object v0 .end method .method public static clearCaches(Landroid/content/Context;)V .locals 0 .prologue .line 628 invoke-static {p0}, Lcom/facebook/internal/ImageDownloader;->clearCache(Landroid/content/Context;)V .line 629 return-void .end method .method private static clearCookiesForDomain(Landroid/content/Context;Ljava/lang/String;)V .locals 7 .prologue const/4 v1, 0x0 .line 543 invoke-static {p0}, Landroid/webkit/CookieSyncManager;->createInstance(Landroid/content/Context;)Landroid/webkit/CookieSyncManager; move-result-object v0 .line 544 invoke-virtual {v0}, Landroid/webkit/CookieSyncManager;->sync()V .line 546 invoke-static {}, Landroid/webkit/CookieManager;->getInstance()Landroid/webkit/CookieManager; move-result-object v2 .line 548 invoke-virtual {v2, p1}, Landroid/webkit/CookieManager;->getCookie(Ljava/lang/String;)Ljava/lang/String; move-result-object v0 .line 549 if-nez v0, :cond_0 .line 563 :goto_0 return-void .line 553 :cond_0 const-string v3, ";" invoke-virtual {v0, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String; move-result-object v3 .line 554 array-length v4, v3 move v0, v1 :goto_1 if-ge v0, v4, :cond_2 aget-object v5, v3, v0 .line 555 const-string v6, "=" invoke-virtual {v5, v6}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String; move-result-object v5 .line 556 array-length v6, v5 if-lez v6, :cond_1 .line 557 new-instance v6, Ljava/lang/StringBuilder; invoke-direct {v6}, Ljava/lang/StringBuilder;->()V aget-object v5, v5, v1 invoke-virtual {v5}, Ljava/lang/String;->trim()Ljava/lang/String; move-result-object v5 invoke-virtual {v6, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v5 const-string v6, "=;expires=Sat, 1 Jan 2000 00:00:01 UTC;" invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v5 invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v5 .line 559 invoke-virtual {v2, p1, v5}, Landroid/webkit/CookieManager;->setCookie(Ljava/lang/String;Ljava/lang/String;)V .line 554 :cond_1 add-int/lit8 v0, v0, 0x1 goto :goto_1 .line 562 :cond_2 invoke-virtual {v2}, Landroid/webkit/CookieManager;->removeExpiredCookie()V goto :goto_0 .end method .method public static clearFacebookCookies(Landroid/content/Context;)V .locals 1 .prologue .line 569 const-string v0, "facebook.com" invoke-static {p0, v0}, Lcom/facebook/internal/Utility;->clearCookiesForDomain(Landroid/content/Context;Ljava/lang/String;)V .line 570 const-string v0, ".facebook.com" invoke-static {p0, v0}, Lcom/facebook/internal/Utility;->clearCookiesForDomain(Landroid/content/Context;Ljava/lang/String;)V .line 571 const-string v0, "https://facebook.com" invoke-static {p0, v0}, Lcom/facebook/internal/Utility;->clearCookiesForDomain(Landroid/content/Context;Ljava/lang/String;)V .line 572 const-string v0, "https://.facebook.com" invoke-static {p0, v0}, Lcom/facebook/internal/Utility;->clearCookiesForDomain(Landroid/content/Context;Ljava/lang/String;)V .line 573 return-void .end method .method public static closeQuietly(Ljava/io/Closeable;)V .locals 1 .prologue .line 406 if-eqz p0, :cond_0 .line 407 :try_start_0 invoke-interface {p0}, Ljava/io/Closeable;->close()V :try_end_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0 .line 412 :cond_0 :goto_0 return-void .line 409 :catch_0 move-exception v0 goto :goto_0 .end method .method public static coerceValueIfNullOrEmpty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; .locals 1 .prologue .line 240 invoke-static {p0}, Lcom/facebook/internal/Utility;->isNullOrEmpty(Ljava/lang/String;)Z move-result v0 if-eqz v0, :cond_0 .line 244 :goto_0 return-object p1 :cond_0 move-object p1, p0 goto :goto_0 .end method .method private static convertBytesToGB(D)J .locals 2 .prologue .line 1130 const-wide/high16 v0, 0x41d0000000000000L # 1.073741824E9 div-double v0, p0, v0 invoke-static {v0, v1}, Ljava/lang/Math;->round(D)J move-result-wide v0 return-wide v0 .end method .method static convertJSONObjectToHashMap(Lorg/json/JSONObject;)Ljava/util/Map; .locals 6 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lorg/json/JSONObject;", ")", "Ljava/util/Map", "<", "Ljava/lang/String;", "Ljava/lang/Object;", ">;" } .end annotation .prologue .line 429 new-instance v2, Ljava/util/HashMap; invoke-direct {v2}, Ljava/util/HashMap;->()V .line 430 invoke-virtual {p0}, Lorg/json/JSONObject;->names()Lorg/json/JSONArray; move-result-object v3 .line 431 const/4 v0, 0x0 move v1, v0 :goto_0 invoke-virtual {v3}, Lorg/json/JSONArray;->length()I move-result v0 if-ge v1, v0, :cond_1 .line 434 :try_start_0 invoke-virtual {v3, v1}, Lorg/json/JSONArray;->getString(I)Ljava/lang/String; move-result-object v4 .line 435 invoke-virtual {p0, v4}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object; move-result-object v0 .line 436 instance-of v5, v0, Lorg/json/JSONObject; if-eqz v5, :cond_0 .line 437 check-cast v0, Lorg/json/JSONObject; invoke-static {v0}, Lcom/facebook/internal/Utility;->convertJSONObjectToHashMap(Lorg/json/JSONObject;)Ljava/util/Map; move-result-object v0 .line 439 :cond_0 invoke-virtual {v2, v4, v0}, Ljava/util/HashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; :try_end_0 .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0 .line 431 :goto_1 add-int/lit8 v0, v1, 0x1 move v1, v0 goto :goto_0 .line 443 :cond_1 return-object v2 .line 440 :catch_0 move-exception v0 goto :goto_1 .end method .method public static copyAndCloseInputStream(Ljava/io/InputStream;Ljava/io/OutputStream;)I .locals 5 .prologue const/4 v0, 0x0 .line 501 const/4 v2, 0x0 .line 504 :try_start_0 new-instance v1, Ljava/io/BufferedInputStream; invoke-direct {v1, p0}, Ljava/io/BufferedInputStream;->(Ljava/io/InputStream;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 506 const/16 v2, 0x2000 :try_start_1 new-array v2, v2, [B .line 508 :goto_0 invoke-virtual {v1, v2}, Ljava/io/BufferedInputStream;->read([B)I move-result v3 const/4 v4, -0x1 if-eq v3, v4, :cond_0 .line 509 const/4 v4, 0x0 invoke-virtual {p1, v2, v4, v3}, Ljava/io/OutputStream;->write([BII)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_1 .line 510 add-int/2addr v0, v3 goto :goto_0 .line 513 :cond_0 if-eqz v1, :cond_1 .line 514 invoke-virtual {v1}, Ljava/io/BufferedInputStream;->close()V .line 516 :cond_1 if-eqz p0, :cond_2 .line 517 invoke-virtual {p0}, Ljava/io/InputStream;->close()V .line 521 :cond_2 return v0 .line 513 :catchall_0 move-exception v0 move-object v1, v2 :goto_1 if-eqz v1, :cond_3 .line 514 invoke-virtual {v1}, Ljava/io/BufferedInputStream;->close()V .line 516 :cond_3 if-eqz p0, :cond_4 .line 517 invoke-virtual {p0}, Ljava/io/InputStream;->close()V :cond_4 throw v0 .line 513 :catchall_1 move-exception v0 goto :goto_1 .end method .method public static deleteDirectory(Ljava/io/File;)V .locals 4 .prologue .line 632 invoke-virtual {p0}, Ljava/io/File;->exists()Z move-result v0 if-nez v0, :cond_0 .line 645 :goto_0 return-void .line 636 :cond_0 invoke-virtual {p0}, Ljava/io/File;->isDirectory()Z move-result v0 if-eqz v0, :cond_1 .line 637 invoke-virtual {p0}, Ljava/io/File;->listFiles()[Ljava/io/File; move-result-object v1 .line 638 if-eqz v1, :cond_1 .line 639 array-length v2, v1 const/4 v0, 0x0 :goto_1 if-ge v0, v2, :cond_1 aget-object v3, v1, v0 .line 640 invoke-static {v3}, Lcom/facebook/internal/Utility;->deleteDirectory(Ljava/io/File;)V .line 639 add-int/lit8 v0, v0, 0x1 goto :goto_1 .line 644 :cond_1 invoke-virtual {p0}, Ljava/io/File;->delete()Z goto :goto_0 .end method .method public static disconnectQuietly(Ljava/net/URLConnection;)V .locals 1 .prologue .line 415 if-eqz p0, :cond_0 instance-of v0, p0, Ljava/net/HttpURLConnection; if-eqz v0, :cond_0 .line 416 check-cast p0, Ljava/net/HttpURLConnection; invoke-virtual {p0}, Ljava/net/HttpURLConnection;->disconnect()V .line 418 :cond_0 return-void .end method .method private static externalStorageExists()Z .locals 2 .prologue .line 1094 const-string v0, "mounted" invoke-static {}, Landroid/os/Environment;->getExternalStorageState()Ljava/lang/String; move-result-object v1 invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 return v0 .end method .method public static filter(Ljava/util/List;Lcom/facebook/internal/Utility$Predicate;)Ljava/util/List; .locals 5 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List", ";", "Lcom/facebook/internal/Utility$Predicate", ";)", "Ljava/util/List", ";" } .end annotation .prologue const/4 v0, 0x0 .line 831 if-nez p0, :cond_1 .line 840 :cond_0 :goto_0 return-object v0 .line 834 :cond_1 new-instance v1, Ljava/util/ArrayList; invoke-direct {v1}, Ljava/util/ArrayList;->()V .line 835 invoke-interface {p0}, Ljava/util/List;->iterator()Ljava/util/Iterator; move-result-object v2 :cond_2 :goto_1 invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z move-result v3 if-eqz v3, :cond_3 invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v3 .line 836 invoke-interface {p1, v3}, Lcom/facebook/internal/Utility$Predicate;->apply(Ljava/lang/Object;)Z move-result v4 if-eqz v4, :cond_2 .line 837 invoke-interface {v1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z goto :goto_1 .line 840 :cond_3 invoke-interface {v1}, Ljava/util/List;->size()I move-result v2 if-eqz v2, :cond_0 move-object v0, v1 goto :goto_0 .end method .method public static generateRandomString(I)Ljava/lang/String; .locals 3 .prologue .line 1186 new-instance v0, Ljava/util/Random; invoke-direct {v0}, Ljava/util/Random;->()V .line 1187 new-instance v1, Ljava/math/BigInteger; mul-int/lit8 v2, p0, 0x5 invoke-direct {v1, v2, v0}, Ljava/math/BigInteger;->(ILjava/util/Random;)V const/16 v0, 0x20 invoke-virtual {v1, v0}, Ljava/math/BigInteger;->toString(I)Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public static getActivityName(Landroid/content/Context;)Ljava/lang/String; .locals 1 .prologue .line 817 if-nez p0, :cond_0 .line 818 const-string v0, "null" .line 822 :goto_0 return-object v0 .line 819 :cond_0 invoke-virtual {p0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context; move-result-object v0 if-ne p0, v0, :cond_1 .line 820 const-string v0, "unknown" goto :goto_0 .line 822 :cond_1 invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String; move-result-object v0 goto :goto_0 .end method .method public static getBundleLongAsDate(Landroid/os/Bundle;Ljava/lang/String;Ljava/util/Date;)Ljava/util/Date; .locals 8 .prologue const/4 v1, 0x0 .line 899 if-nez p0, :cond_0 move-object v0, v1 .line 921 :goto_0 return-object v0 .line 905 :cond_0 invoke-virtual {p0, p1}, Landroid/os/Bundle;->get(Ljava/lang/String;)Ljava/lang/Object; move-result-object v0 .line 906 instance-of v2, v0, Ljava/lang/Long; if-eqz v2, :cond_1 .line 907 check-cast v0, Ljava/lang/Long; invoke-virtual {v0}, Ljava/lang/Long;->longValue()J move-result-wide v0 move-wide v2, v0 .line 918 :goto_1 const-wide/16 v0, 0x0 cmp-long v0, v2, v0 if-nez v0, :cond_3 .line 919 new-instance v0, Ljava/util/Date; const-wide v2, 0x7fffffffffffffffL invoke-direct {v0, v2, v3}, Ljava/util/Date;->(J)V goto :goto_0 .line 908 :cond_1 instance-of v2, v0, Ljava/lang/String; if-eqz v2, :cond_2 .line 910 :try_start_0 check-cast v0, Ljava/lang/String; invoke-static {v0}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J :try_end_0 .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0 move-result-wide v0 move-wide v2, v0 .line 913 goto :goto_1 .line 911 :catch_0 move-exception v0 move-object v0, v1 .line 912 goto :goto_0 :cond_2 move-object v0, v1 .line 915 goto :goto_0 .line 921 :cond_3 new-instance v0, Ljava/util/Date; invoke-virtual {p2}, Ljava/util/Date;->getTime()J move-result-wide v4 const-wide/16 v6, 0x3e8 mul-long/2addr v2, v6 add-long/2addr v2, v4 invoke-direct {v0, v2, v3}, Ljava/util/Date;->(J)V goto :goto_0 .end method .method public static getContentSize(Landroid/net/Uri;)J .locals 7 .prologue const/4 v6, 0x0 .line 881 .line 884 :try_start_0 invoke-static {}, Lcom/facebook/FacebookSdk;->getApplicationContext()Landroid/content/Context; move-result-object v0 .line 885 invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver; move-result-object v0 const/4 v2, 0x0 const/4 v3, 0x0 const/4 v4, 0x0 const/4 v5, 0x0 move-object v1, p0 .line 886 invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 move-result-object v1 .line 887 :try_start_1 const-string v0, "_size" invoke-interface {v1, v0}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I move-result v0 .line 889 invoke-interface {v1}, Landroid/database/Cursor;->moveToFirst()Z .line 890 invoke-interface {v1, v0}, Landroid/database/Cursor;->getLong(I)J :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_1 move-result-wide v2 .line 892 if-eqz v1, :cond_0 .line 893 invoke-interface {v1}, Landroid/database/Cursor;->close()V .line 890 :cond_0 return-wide v2 .line 892 :catchall_0 move-exception v0 move-object v1, v6 :goto_0 if-eqz v1, :cond_1 .line 893 invoke-interface {v1}, Landroid/database/Cursor;->close()V :cond_1 throw v0 .line 892 :catchall_1 move-exception v0 goto :goto_0 .end method .method private static getGraphMeRequestWithCache(Ljava/lang/String;)Lcom/facebook/GraphRequest; .locals 6 .prologue const/4 v1, 0x0 .line 1005 new-instance v3, Landroid/os/Bundle; invoke-direct {v3}, Landroid/os/Bundle;->()V .line 1006 const-string v0, "fields" const-string v2, "id,name,first_name,middle_name,last_name,link" invoke-virtual {v3, v0, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V .line 1007 const-string v0, "access_token" invoke-virtual {v3, v0, p0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V .line 1008 new-instance v0, Lcom/facebook/GraphRequest; const-string v2, "me" sget-object v4, Lcom/facebook/HttpMethod;->GET:Lcom/facebook/HttpMethod; move-object v5, v1 invoke-direct/range {v0 .. v5}, Lcom/facebook/GraphRequest;->(Lcom/facebook/AccessToken;Ljava/lang/String;Landroid/os/Bundle;Lcom/facebook/HttpMethod;Lcom/facebook/GraphRequest$Callback;)V .line 1014 return-object v0 .end method .method public static getGraphMeRequestWithCacheAsync(Ljava/lang/String;Lcom/facebook/internal/Utility$GraphMeRequestWithCacheCallback;)V .locals 2 .prologue .line 963 invoke-static {p0}, Lcom/facebook/internal/ProfileInformationCache;->getProfileInformation(Ljava/lang/String;)Lorg/json/JSONObject; move-result-object v0 .line 964 if-eqz v0, :cond_0 .line 965 invoke-interface {p1, v0}, Lcom/facebook/internal/Utility$GraphMeRequestWithCacheCallback;->onSuccess(Lorg/json/JSONObject;)V .line 985 :goto_0 return-void .line 969 :cond_0 new-instance v0, Lcom/facebook/internal/Utility$1; invoke-direct {v0, p1, p0}, Lcom/facebook/internal/Utility$1;->(Lcom/facebook/internal/Utility$GraphMeRequestWithCacheCallback;Ljava/lang/String;)V .line 982 invoke-static {p0}, Lcom/facebook/internal/Utility;->getGraphMeRequestWithCache(Ljava/lang/String;)Lcom/facebook/GraphRequest; move-result-object v1 .line 983 invoke-virtual {v1, v0}, Lcom/facebook/GraphRequest;->setCallback(Lcom/facebook/GraphRequest$Callback;)V .line 984 invoke-virtual {v1}, Lcom/facebook/GraphRequest;->executeAsync()Lcom/facebook/GraphRequestAsyncTask; goto :goto_0 .end method .method public static getMetadataApplicationId(Landroid/content/Context;)Ljava/lang/String; .locals 1 .prologue .line 421 const-string v0, "context" invoke-static {p0, v0}, Lcom/facebook/internal/Validate;->notNull(Ljava/lang/Object;Ljava/lang/String;)V .line 423 invoke-static {p0}, Lcom/facebook/FacebookSdk;->sdkInitialize(Landroid/content/Context;)V .line 425 invoke-static {}, Lcom/facebook/FacebookSdk;->getApplicationId()Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public static varargs getMethodQuietly(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/Class", "<*>;", "Ljava/lang/String;", "[", "Ljava/lang/Class", "<*>;)", "Ljava/lang/reflect/Method;" } .end annotation .prologue .line 784 :try_start_0 invoke-virtual {p0, p1, p2}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; :try_end_0 .catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0 move-result-object v0 .line 786 :goto_0 return-object v0 .line 785 :catch_0 move-exception v0 .line 786 const/4 v0, 0x0 goto :goto_0 .end method .method public static varargs getMethodQuietly(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/String;", "Ljava/lang/String;", "[", "Ljava/lang/Class", "<*>;)", "Ljava/lang/reflect/Method;" } .end annotation .prologue .line 795 :try_start_0 invoke-static {p0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class; move-result-object v0 .line 796 invoke-static {v0, p1, p2}, Lcom/facebook/internal/Utility;->getMethodQuietly(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; :try_end_0 .catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_0} :catch_0 move-result-object v0 .line 798 :goto_0 return-object v0 .line 797 :catch_0 move-exception v0 .line 798 const/4 v0, 0x0 goto :goto_0 .end method .method public static getStringPropertyAsJSON(Lorg/json/JSONObject;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; .locals 2 .prologue .line 453 invoke-virtual {p0, p1}, Lorg/json/JSONObject;->opt(Ljava/lang/String;)Ljava/lang/Object; move-result-object v0 .line 454 if-eqz v0, :cond_2 instance-of v1, v0, Ljava/lang/String; if-eqz v1, :cond_2 .line 455 new-instance v1, Lorg/json/JSONTokener; check-cast v0, Ljava/lang/String; invoke-direct {v1, v0}, Lorg/json/JSONTokener;->(Ljava/lang/String;)V .line 456 invoke-virtual {v1}, Lorg/json/JSONTokener;->nextValue()Ljava/lang/Object; move-result-object v0 move-object v1, v0 .line 459 :goto_0 if-eqz v1, :cond_1 instance-of v0, v1, Lorg/json/JSONObject; if-nez v0, :cond_1 instance-of v0, v1, Lorg/json/JSONArray; if-nez v0, :cond_1 .line 460 if-eqz p2, :cond_0 .line 465 new-instance v0, Lorg/json/JSONObject; invoke-direct {v0}, Lorg/json/JSONObject;->()V .line 466 invoke-virtual {v0, p2, v1}, Lorg/json/JSONObject;->putOpt(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject; .line 473 :goto_1 return-object v0 .line 469 :cond_0 new-instance v0, Lcom/facebook/FacebookException; const-string v1, "Got an unexpected non-JSON object." invoke-direct {v0, v1}, Lcom/facebook/FacebookException;->(Ljava/lang/String;)V throw v0 :cond_1 move-object v0, v1 .line 473 goto :goto_1 :cond_2 move-object v1, v0 goto :goto_0 .end method .method public static getUriString(Landroid/net/Uri;)Ljava/lang/String; .locals 1 .prologue .line 862 if-nez p0, :cond_0 const/4 v0, 0x0 :goto_0 return-object v0 :cond_0 invoke-virtual {p0}, Landroid/net/Uri;->toString()Ljava/lang/String; move-result-object v0 goto :goto_0 .end method .method public static handlePermissionResponse(Lorg/json/JSONObject;)Lcom/facebook/internal/Utility$PermissionsPair; .locals 7 .prologue .line 1158 const-string v0, "permissions" invoke-virtual {p0, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject; move-result-object v0 .line 1160 const-string v1, "data" invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray; move-result-object v1 .line 1161 new-instance v2, Ljava/util/ArrayList; invoke-virtual {v1}, Lorg/json/JSONArray;->length()I move-result v0 invoke-direct {v2, v0}, Ljava/util/ArrayList;->(I)V .line 1162 new-instance v3, Ljava/util/ArrayList; invoke-virtual {v1}, Lorg/json/JSONArray;->length()I move-result v0 invoke-direct {v3, v0}, Ljava/util/ArrayList;->(I)V .line 1164 const/4 v0, 0x0 :goto_0 invoke-virtual {v1}, Lorg/json/JSONArray;->length()I move-result v4 if-ge v0, v4, :cond_3 .line 1165 invoke-virtual {v1, v0}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject; move-result-object v4 .line 1166 const-string v5, "permission" invoke-virtual {v4, v5}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String; move-result-object v5 .line 1167 if-eqz v5, :cond_0 const-string v6, "installed" invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v6 if-eqz v6, :cond_1 .line 1164 :cond_0 :goto_1 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 1170 :cond_1 const-string v6, "status" invoke-virtual {v4, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String; move-result-object v4 .line 1171 if-eqz v4, :cond_0 .line 1175 const-string v6, "granted" invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v6 if-eqz v6, :cond_2 .line 1176 invoke-interface {v2, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z goto :goto_1 .line 1177 :cond_2 const-string v6, "declined" invoke-virtual {v4, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v4 if-eqz v4, :cond_0 .line 1178 invoke-interface {v3, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z goto :goto_1 .line 1182 :cond_3 new-instance v0, Lcom/facebook/internal/Utility$PermissionsPair; invoke-direct {v0, v2, v3}, Lcom/facebook/internal/Utility$PermissionsPair;->(Ljava/util/List;Ljava/util/List;)V return-object v0 .end method .method public static hasSameId(Lorg/json/JSONObject;Lorg/json/JSONObject;)Z .locals 3 .prologue const/4 v0, 0x0 .line 601 if-eqz p0, :cond_0 if-eqz p1, :cond_0 const-string v1, "id" invoke-virtual {p0, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z move-result v1 if-eqz v1, :cond_0 const-string v1, "id" invoke-virtual {p1, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z move-result v1 if-nez v1, :cond_1 .line 612 :cond_0 :goto_0 return v0 .line 604 :cond_1 invoke-virtual {p0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_2 .line 605 const/4 v0, 0x1 goto :goto_0 .line 607 :cond_2 const-string v1, "id" invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String; move-result-object v1 .line 608 const-string v2, "id" invoke-virtual {p1, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String; move-result-object v2 .line 609 if-eqz v1, :cond_0 if-eqz v2, :cond_0 .line 612 invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 goto :goto_0 .end method .method private static hashBytes(Ljava/security/MessageDigest;[B)Ljava/lang/String; .locals 6 .prologue .line 294 invoke-virtual {p0, p1}, Ljava/security/MessageDigest;->update([B)V .line 295 invoke-virtual {p0}, Ljava/security/MessageDigest;->digest()[B move-result-object v1 .line 296 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V .line 297 array-length v3, v1 const/4 v0, 0x0 :goto_0 if-ge v0, v3, :cond_0 aget-byte v4, v1, v0 .line 298 shr-int/lit8 v5, v4, 0x4 and-int/lit8 v5, v5, 0xf invoke-static {v5}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String; move-result-object v5 invoke-virtual {v2, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; .line 299 shr-int/lit8 v4, v4, 0x0 and-int/lit8 v4, v4, 0xf invoke-static {v4}, Ljava/lang/Integer;->toHexString(I)Ljava/lang/String; move-result-object v4 invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; .line 297 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 301 :cond_0 invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public static varargs hashSet([Ljava/lang/Object;)Ljava/util/HashSet; .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "([TT;)", "Ljava/util/HashSet", ";" } .end annotation .prologue .line 260 new-instance v1, Ljava/util/HashSet; array-length v0, p0 invoke-direct {v1, v0}, Ljava/util/HashSet;->(I)V .line 261 array-length v2, p0 const/4 v0, 0x0 :goto_0 if-ge v0, v2, :cond_0 aget-object v3, p0, v0 .line 262 invoke-virtual {v1, v3}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z .line 261 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 264 :cond_0 return-object v1 .end method .method private static hashWithAlgorithm(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; .locals 1 .prologue .line 280 invoke-virtual {p1}, Ljava/lang/String;->getBytes()[B move-result-object v0 invoke-static {p0, v0}, Lcom/facebook/internal/Utility;->hashWithAlgorithm(Ljava/lang/String;[B)Ljava/lang/String; move-result-object v0 return-object v0 .end method .method private static hashWithAlgorithm(Ljava/lang/String;[B)Ljava/lang/String; .locals 1 .prologue .line 286 :try_start_0 invoke-static {p0}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest; :try_end_0 .catch Ljava/security/NoSuchAlgorithmException; {:try_start_0 .. :try_end_0} :catch_0 move-result-object v0 .line 290 invoke-static {v0, p1}, Lcom/facebook/internal/Utility;->hashBytes(Ljava/security/MessageDigest;[B)Ljava/lang/String; move-result-object v0 :goto_0 return-object v0 .line 287 :catch_0 move-exception v0 .line 288 const/4 v0, 0x0 goto :goto_0 .end method .method public static intersectRanges([I[I)[I .locals 10 .prologue const/high16 v7, -0x80000000 const/4 v0, 0x0 const v4, 0x7fffffff .line 138 if-nez p0, :cond_0 .line 202 :goto_0 return-object p1 .line 140 :cond_0 if-nez p1, :cond_1 move-object p1, p0 .line 141 goto :goto_0 .line 144 :cond_1 array-length v1, p0 array-length v2, p1 add-int/2addr v1, v2 new-array v9, v1, [I move v1, v0 move v2, v0 .line 148 :cond_2 :goto_1 array-length v3, p0 if-ge v1, v3, :cond_9 array-length v3, p1 if-ge v0, v3, :cond_9 .line 150 aget v8, p0, v1 .line 153 aget v6, p1, v0 .line 156 array-length v3, p0 add-int/lit8 v3, v3, -0x1 if-ge v1, v3, :cond_b .line 157 add-int/lit8 v3, v1, 0x1 aget v3, p0, v3 .line 159 :goto_2 array-length v5, p1 add-int/lit8 v5, v5, -0x1 if-ge v0, v5, :cond_a .line 160 add-int/lit8 v5, v0, 0x1 aget v5, p1, v5 .line 163 :goto_3 if-ge v8, v6, :cond_5 .line 164 if-le v3, v6, :cond_4 .line 166 if-le v3, v5, :cond_3 .line 168 add-int/lit8 v0, v0, 0x2 .line 191 :goto_4 if-eq v6, v7, :cond_2 .line 192 add-int/lit8 v3, v2, 0x1 aput v6, v9, v2 .line 193 if-eq v5, v4, :cond_8 .line 194 add-int/lit8 v2, v3, 0x1 aput v5, v9, v3 goto :goto_1 .line 171 :cond_3 add-int/lit8 v1, v1, 0x2 move v5, v3 goto :goto_4 .line 174 :cond_4 add-int/lit8 v1, v1, 0x2 move v5, v4 move v6, v7 goto :goto_4 .line 177 :cond_5 if-le v5, v8, :cond_7 .line 179 if-le v5, v3, :cond_6 .line 181 add-int/lit8 v1, v1, 0x2 move v5, v3 move v6, v8 goto :goto_4 .line 184 :cond_6 add-int/lit8 v0, v0, 0x2 move v6, v8 goto :goto_4 .line 187 :cond_7 add-int/lit8 v0, v0, 0x2 move v5, v4 move v6, v7 goto :goto_4 :cond_8 move v2, v3 .line 202 :cond_9 invoke-static {v9, v2}, Ljava/util/Arrays;->copyOf([II)[I move-result-object p1 goto :goto_0 :cond_a move v5, v4 goto :goto_3 :cond_b move v3, v4 goto :goto_2 .end method .method public static varargs invokeMethodQuietly(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; .locals 2 .prologue const/4 v0, 0x0 .line 804 :try_start_0 invoke-virtual {p1, p0, p2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; :try_end_0 .catch Ljava/lang/IllegalAccessException; {:try_start_0 .. :try_end_0} :catch_0 .catch Ljava/lang/reflect/InvocationTargetException; {:try_start_0 .. :try_end_0} :catch_1 move-result-object v0 .line 808 :goto_0 return-object v0 .line 805 :catch_0 move-exception v1 goto :goto_0 .line 807 :catch_1 move-exception v1 goto :goto_0 .end method .method public static isContentUri(Landroid/net/Uri;)Z .locals 2 .prologue .line 873 if-eqz p0, :cond_0 const-string v0, "content" invoke-virtual {p0}, Landroid/net/Uri;->getScheme()Ljava/lang/String; move-result-object v1 invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z move-result v0 if-eqz v0, :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method public static isCurrentAccessToken(Lcom/facebook/AccessToken;)Z .locals 1 .prologue .line 951 if-eqz p0, :cond_0 invoke-static {}, Lcom/facebook/AccessToken;->getCurrentAccessToken()Lcom/facebook/AccessToken; move-result-object v0 invoke-virtual {p0, v0}, Lcom/facebook/AccessToken;->equals(Ljava/lang/Object;)Z move-result v0 :goto_0 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method public static isFileUri(Landroid/net/Uri;)Z .locals 2 .prologue .line 877 if-eqz p0, :cond_0 const-string v0, "file" invoke-virtual {p0}, Landroid/net/Uri;->getScheme()Ljava/lang/String; move-result-object v1 invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z move-result v0 if-eqz v0, :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method public static isNullOrEmpty(Ljava/lang/String;)Z .locals 1 .prologue .line 227 if-eqz p0, :cond_0 invoke-virtual {p0}, Ljava/lang/String;->length()I move-result v0 if-nez v0, :cond_1 :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_1 const/4 v0, 0x0 goto :goto_0 .end method .method public static isNullOrEmpty(Ljava/util/Collection;)Z .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", ";)Z" } .end annotation .prologue .line 223 if-eqz p0, :cond_0 invoke-interface {p0}, Ljava/util/Collection;->size()I move-result v0 if-nez v0, :cond_1 :cond_0 const/4 v0, 0x1 :goto_0 return v0 :cond_1 const/4 v0, 0x0 goto :goto_0 .end method .method public static isSubset(Ljava/util/Collection;Ljava/util/Collection;)Z .locals 5 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Collection", ";", "Ljava/util/Collection", ";)Z" } .end annotation .prologue const/4 v1, 0x1 const/4 v0, 0x0 .line 209 if-eqz p1, :cond_0 invoke-interface {p1}, Ljava/util/Collection;->size()I move-result v2 if-nez v2, :cond_3 .line 210 :cond_0 if-eqz p0, :cond_1 invoke-interface {p0}, Ljava/util/Collection;->size()I move-result v2 if-nez v2, :cond_2 :cond_1 move v0, v1 .line 219 :cond_2 :goto_0 return v0 .line 213 :cond_3 new-instance v2, Ljava/util/HashSet; invoke-direct {v2, p1}, Ljava/util/HashSet;->(Ljava/util/Collection;)V .line 214 invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object v3 :cond_4 invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z move-result v4 if-eqz v4, :cond_5 invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v4 .line 215 invoke-virtual {v2, v4}, Ljava/util/HashSet;->contains(Ljava/lang/Object;)Z move-result v4 if-nez v4, :cond_4 goto :goto_0 :cond_5 move v0, v1 .line 219 goto :goto_0 .end method .method public static isWebUri(Landroid/net/Uri;)Z .locals 2 .prologue .line 866 if-eqz p0, :cond_1 const-string v0, "http" .line 867 invoke-virtual {p0}, Landroid/net/Uri;->getScheme()Ljava/lang/String; move-result-object v1 invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z move-result v0 if-nez v0, :cond_0 const-string v0, "https" .line 868 invoke-virtual {p0}, Landroid/net/Uri;->getScheme()Ljava/lang/String; move-result-object v1 invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z move-result v0 if-nez v0, :cond_0 const-string v0, "fbstaging" .line 869 invoke-virtual {p0}, Landroid/net/Uri;->getScheme()Ljava/lang/String; move-result-object v1 invoke-virtual {v0, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z move-result v0 if-eqz v0, :cond_1 :cond_0 const/4 v0, 0x1 .line 866 :goto_0 return v0 .line 869 :cond_1 const/4 v0, 0x0 goto :goto_0 .end method .method public static jsonArrayToSet(Lorg/json/JSONArray;)Ljava/util/Set; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lorg/json/JSONArray;", ")", "Ljava/util/Set", "<", "Ljava/lang/String;", ">;" } .end annotation .prologue .line 668 new-instance v1, Ljava/util/HashSet; invoke-direct {v1}, Ljava/util/HashSet;->()V .line 669 const/4 v0, 0x0 :goto_0 invoke-virtual {p0}, Lorg/json/JSONArray;->length()I move-result v2 if-ge v0, v2, :cond_0 .line 670 invoke-virtual {p0, v0}, Lorg/json/JSONArray;->getString(I)Ljava/lang/String; move-result-object v2 invoke-interface {v1, v2}, Ljava/util/Set;->add(Ljava/lang/Object;)Z .line 669 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 673 :cond_0 return-object v1 .end method .method public static jsonArrayToStringList(Lorg/json/JSONArray;)Ljava/util/List; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lorg/json/JSONArray;", ")", "Ljava/util/List", "<", "Ljava/lang/String;", ">;" } .end annotation .prologue .line 658 new-instance v1, Ljava/util/ArrayList; invoke-direct {v1}, Ljava/util/ArrayList;->()V .line 660 const/4 v0, 0x0 :goto_0 invoke-virtual {p0}, Lorg/json/JSONArray;->length()I move-result v2 if-ge v0, v2, :cond_0 .line 661 invoke-virtual {p0, v0}, Lorg/json/JSONArray;->getString(I)Ljava/lang/String; move-result-object v2 invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z .line 660 add-int/lit8 v0, v0, 0x1 goto :goto_0 .line 664 :cond_0 return-object v1 .end method .method public static logd(Ljava/lang/String;Ljava/lang/Exception;)V .locals 2 .prologue .line 576 invoke-static {}, Lcom/facebook/FacebookSdk;->isDebugEnabled()Z move-result v0 if-eqz v0, :cond_0 if-eqz p0, :cond_0 if-eqz p1, :cond_0 .line 577 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class; move-result-object v1 invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String; move-result-object v1 invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 const-string v1, ": " invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {p1}, Ljava/lang/Exception;->getMessage()Ljava/lang/String; move-result-object v1 invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 invoke-static {p0, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 579 :cond_0 return-void .end method .method public static logd(Ljava/lang/String;Ljava/lang/String;)V .locals 1 .prologue .line 582 invoke-static {}, Lcom/facebook/FacebookSdk;->isDebugEnabled()Z move-result v0 if-eqz v0, :cond_0 if-eqz p0, :cond_0 if-eqz p1, :cond_0 .line 583 invoke-static {p0, p1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I .line 585 :cond_0 return-void .end method .method public static logd(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V .locals 1 .prologue .line 588 invoke-static {}, Lcom/facebook/FacebookSdk;->isDebugEnabled()Z move-result v0 if-eqz v0, :cond_0 invoke-static {p0}, Lcom/facebook/internal/Utility;->isNullOrEmpty(Ljava/lang/String;)Z move-result v0 if-nez v0, :cond_0 .line 589 invoke-static {p0, p1, p2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I .line 591 :cond_0 return-void .end method .method public static map(Ljava/util/List;Lcom/facebook/internal/Utility$Mapper;)Ljava/util/List; .locals 4 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/List", ";", "Lcom/facebook/internal/Utility$Mapper", ";)", "Ljava/util/List", ";" } .end annotation .prologue const/4 v0, 0x0 .line 848 if-nez p0, :cond_1 .line 858 :cond_0 :goto_0 return-object v0 .line 851 :cond_1 new-instance v1, Ljava/util/ArrayList; invoke-direct {v1}, Ljava/util/ArrayList;->()V .line 852 invoke-interface {p0}, Ljava/util/List;->iterator()Ljava/util/Iterator; move-result-object v2 :cond_2 :goto_1 invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z move-result v3 if-eqz v3, :cond_3 invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v3 .line 853 invoke-interface {p1, v3}, Lcom/facebook/internal/Utility$Mapper;->apply(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v3 .line 854 if-eqz v3, :cond_2 .line 855 invoke-interface {v1, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z goto :goto_1 .line 858 :cond_3 invoke-interface {v1}, Ljava/util/List;->size()I move-result v2 if-eqz v2, :cond_0 move-object v0, v1 goto :goto_0 .end method .method public static md5hash(Ljava/lang/String;)Ljava/lang/String; .locals 1 .prologue .line 268 const-string v0, "MD5" invoke-static {v0, p0}, Lcom/facebook/internal/Utility;->hashWithAlgorithm(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public static parseUrlQueryString(Ljava/lang/String;)Landroid/os/Bundle; .locals 8 .prologue const/4 v7, 0x1 const/4 v0, 0x0 .line 321 new-instance v2, Landroid/os/Bundle; invoke-direct {v2}, Landroid/os/Bundle;->()V .line 322 invoke-static {p0}, Lcom/facebook/internal/Utility;->isNullOrEmpty(Ljava/lang/String;)Z move-result v1 if-nez v1, :cond_2 .line 323 const-string v1, "&" invoke-virtual {p0, v1}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String; move-result-object v3 .line 324 array-length v4, v3 move v1, v0 :goto_0 if-ge v1, v4, :cond_2 aget-object v0, v3, v1 .line 325 const-string v5, "=" invoke-virtual {v0, v5}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String; move-result-object v0 .line 328 :try_start_0 array-length v5, v0 const/4 v6, 0x2 if-ne v5, v6, :cond_1 .line 329 const/4 v5, 0x0 aget-object v5, v0, v5 const-string v6, "UTF-8" .line 330 invoke-static {v5, v6}, Ljava/net/URLDecoder;->decode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v5 const/4 v6, 0x1 aget-object v0, v0, v6 const-string v6, "UTF-8" .line 331 invoke-static {v0, v6}, Ljava/net/URLDecoder;->decode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 .line 329 invoke-virtual {v2, v5, v0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V .line 324 :cond_0 :goto_1 add-int/lit8 v0, v1, 0x1 move v1, v0 goto :goto_0 .line 332 :cond_1 array-length v5, v0 if-ne v5, v7, :cond_0 .line 333 const/4 v5, 0x0 aget-object v0, v0, v5 const-string v5, "UTF-8" .line 334 invoke-static {v0, v5}, Ljava/net/URLDecoder;->decode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 const-string v5, "" .line 333 invoke-virtual {v2, v0, v5}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V :try_end_0 .catch Ljava/io/UnsupportedEncodingException; {:try_start_0 .. :try_end_0} :catch_0 goto :goto_1 .line 337 :catch_0 move-exception v0 .line 339 const-string v5, "FacebookSDK" invoke-static {v5, v0}, Lcom/facebook/internal/Utility;->logd(Ljava/lang/String;Ljava/lang/Exception;)V goto :goto_1 .line 343 :cond_2 return-object v2 .end method .method public static putCommaSeparatedStringList(Landroid/os/Bundle;Ljava/lang/String;Ljava/util/List;)V .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroid/os/Bundle;", "Ljava/lang/String;", "Ljava/util/List", "<", "Ljava/lang/String;", ">;)V" } .end annotation .prologue .line 353 if-eqz p2, :cond_2 .line 354 new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V .line 355 invoke-interface {p2}, Ljava/util/List;->iterator()Ljava/util/Iterator; move-result-object v2 :goto_0 invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_0 invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/lang/String; .line 356 invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; .line 357 const-string v0, "," invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; goto :goto_0 .line 359 :cond_0 const-string v0, "" .line 360 invoke-virtual {v1}, Ljava/lang/StringBuilder;->length()I move-result v2 if-lez v2, :cond_1 .line 361 const/4 v0, 0x0 invoke-virtual {v1}, Ljava/lang/StringBuilder;->length()I move-result v2 add-int/lit8 v2, v2, -0x1 invoke-virtual {v1, v0, v2}, Ljava/lang/StringBuilder;->substring(II)Ljava/lang/String; move-result-object v0 .line 363 :cond_1 invoke-virtual {p0, p1, v0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V .line 365 :cond_2 return-void .end method .method public static putJSONValueInBundle(Landroid/os/Bundle;Ljava/lang/String;Ljava/lang/Object;)Z .locals 2 .prologue .line 374 if-nez p2, :cond_0 .line 375 invoke-virtual {p0, p1}, Landroid/os/Bundle;->remove(Ljava/lang/String;)V .line 401 :goto_0 const/4 v0, 0x1 :goto_1 return v0 .line 376 :cond_0 instance-of v0, p2, Ljava/lang/Boolean; if-eqz v0, :cond_1 .line 377 check-cast p2, Ljava/lang/Boolean; invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z move-result v0 invoke-virtual {p0, p1, v0}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V goto :goto_0 .line 378 :cond_1 instance-of v0, p2, [Z if-eqz v0, :cond_2 .line 379 check-cast p2, [Z check-cast p2, [Z invoke-virtual {p0, p1, p2}, Landroid/os/Bundle;->putBooleanArray(Ljava/lang/String;[Z)V goto :goto_0 .line 380 :cond_2 instance-of v0, p2, Ljava/lang/Double; if-eqz v0, :cond_3 .line 381 check-cast p2, Ljava/lang/Double; invoke-virtual {p2}, Ljava/lang/Double;->doubleValue()D move-result-wide v0 invoke-virtual {p0, p1, v0, v1}, Landroid/os/Bundle;->putDouble(Ljava/lang/String;D)V goto :goto_0 .line 382 :cond_3 instance-of v0, p2, [D if-eqz v0, :cond_4 .line 383 check-cast p2, [D check-cast p2, [D invoke-virtual {p0, p1, p2}, Landroid/os/Bundle;->putDoubleArray(Ljava/lang/String;[D)V goto :goto_0 .line 384 :cond_4 instance-of v0, p2, Ljava/lang/Integer; if-eqz v0, :cond_5 .line 385 check-cast p2, Ljava/lang/Integer; invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I move-result v0 invoke-virtual {p0, p1, v0}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V goto :goto_0 .line 386 :cond_5 instance-of v0, p2, [I if-eqz v0, :cond_6 .line 387 check-cast p2, [I check-cast p2, [I invoke-virtual {p0, p1, p2}, Landroid/os/Bundle;->putIntArray(Ljava/lang/String;[I)V goto :goto_0 .line 388 :cond_6 instance-of v0, p2, Ljava/lang/Long; if-eqz v0, :cond_7 .line 389 check-cast p2, Ljava/lang/Long; invoke-virtual {p2}, Ljava/lang/Long;->longValue()J move-result-wide v0 invoke-virtual {p0, p1, v0, v1}, Landroid/os/Bundle;->putLong(Ljava/lang/String;J)V goto :goto_0 .line 390 :cond_7 instance-of v0, p2, [J if-eqz v0, :cond_8 .line 391 check-cast p2, [J check-cast p2, [J invoke-virtual {p0, p1, p2}, Landroid/os/Bundle;->putLongArray(Ljava/lang/String;[J)V goto :goto_0 .line 392 :cond_8 instance-of v0, p2, Ljava/lang/String; if-eqz v0, :cond_9 .line 393 check-cast p2, Ljava/lang/String; invoke-virtual {p0, p1, p2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V goto :goto_0 .line 394 :cond_9 instance-of v0, p2, Lorg/json/JSONArray; if-eqz v0, :cond_a .line 395 invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object v0 invoke-virtual {p0, p1, v0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V goto :goto_0 .line 396 :cond_a instance-of v0, p2, Lorg/json/JSONObject; if-eqz v0, :cond_b .line 397 invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object v0 invoke-virtual {p0, p1, v0}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V goto/16 :goto_0 .line 399 :cond_b const/4 v0, 0x0 goto/16 :goto_1 .end method .method public static putNonEmptyString(Landroid/os/Bundle;Ljava/lang/String;Ljava/lang/String;)V .locals 1 .prologue .line 347 invoke-static {p2}, Lcom/facebook/internal/Utility;->isNullOrEmpty(Ljava/lang/String;)Z move-result v0 if-nez v0, :cond_0 .line 348 invoke-virtual {p0, p1, p2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V .line 350 :cond_0 return-void .end method .method public static putUri(Landroid/os/Bundle;Ljava/lang/String;Landroid/net/Uri;)V .locals 1 .prologue .line 368 if-eqz p2, :cond_0 .line 369 invoke-virtual {p2}, Landroid/net/Uri;->toString()Ljava/lang/String; move-result-object v0 invoke-static {p0, p1, v0}, Lcom/facebook/internal/Utility;->putNonEmptyString(Landroid/os/Bundle;Ljava/lang/String;Ljava/lang/String;)V .line 371 :cond_0 return-void .end method .method public static readStreamToString(Ljava/io/InputStream;)Ljava/lang/String; .locals 6 .prologue const/4 v2, 0x0 .line 478 .line 481 :try_start_0 new-instance v3, Ljava/io/BufferedInputStream; invoke-direct {v3, p0}, Ljava/io/BufferedInputStream;->(Ljava/io/InputStream;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_1 .line 482 :try_start_1 new-instance v1, Ljava/io/InputStreamReader; invoke-direct {v1, v3}, Ljava/io/InputStreamReader;->(Ljava/io/InputStream;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_2 .line 483 :try_start_2 new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V .line 486 const/16 v2, 0x800 new-array v2, v2, [C .line 488 :goto_0 invoke-virtual {v1, v2}, Ljava/io/InputStreamReader;->read([C)I move-result v4 const/4 v5, -0x1 if-eq v4, v5, :cond_0 .line 489 const/4 v5, 0x0 invoke-virtual {v0, v2, v5, v4}, Ljava/lang/StringBuilder;->append([CII)Ljava/lang/StringBuilder; :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_0 goto :goto_0 .line 494 :catchall_0 move-exception v0 move-object v2, v3 :goto_1 invoke-static {v2}, Lcom/facebook/internal/Utility;->closeQuietly(Ljava/io/Closeable;)V .line 495 invoke-static {v1}, Lcom/facebook/internal/Utility;->closeQuietly(Ljava/io/Closeable;)V throw v0 .line 492 :cond_0 :try_start_3 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; :try_end_3 .catchall {:try_start_3 .. :try_end_3} :catchall_0 move-result-object v0 .line 494 invoke-static {v3}, Lcom/facebook/internal/Utility;->closeQuietly(Ljava/io/Closeable;)V .line 495 invoke-static {v1}, Lcom/facebook/internal/Utility;->closeQuietly(Ljava/io/Closeable;)V .line 492 return-object v0 .line 494 :catchall_1 move-exception v0 move-object v1, v2 goto :goto_1 :catchall_2 move-exception v0 move-object v1, v2 move-object v2, v3 goto :goto_1 .end method .method public static readStringMapFromParcel(Landroid/os/Parcel;)Ljava/util/Map; .locals 5 .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroid/os/Parcel;", ")", "Ljava/util/Map", "<", "Ljava/lang/String;", "Ljava/lang/String;", ">;" } .end annotation .prologue .line 939 invoke-virtual {p0}, Landroid/os/Parcel;->readInt()I move-result v2 .line 940 if-gez v2, :cond_1 .line 941 const/4 v0, 0x0 .line 947 :cond_0 return-object v0 .line 943 :cond_1 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V .line 944 const/4 v1, 0x0 :goto_0 if-ge v1, v2, :cond_0 .line 945 invoke-virtual {p0}, Landroid/os/Parcel;->readString()Ljava/lang/String; move-result-object v3 invoke-virtual {p0}, Landroid/os/Parcel;->readString()Ljava/lang/String; move-result-object v4 invoke-interface {v0, v3, v4}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; .line 944 add-int/lit8 v1, v1, 0x1 goto :goto_0 .end method .method private static refreshAvailableExternalStorage()V .locals 4 .prologue .line 1101 :try_start_0 invoke-static {}, Lcom/facebook/internal/Utility;->externalStorageExists()Z move-result v0 if-eqz v0, :cond_0 .line 1102 invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File; move-result-object v0 .line 1103 new-instance v1, Landroid/os/StatFs; invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String; move-result-object v0 invoke-direct {v1, v0}, Landroid/os/StatFs;->(Ljava/lang/String;)V .line 1105 invoke-virtual {v1}, Landroid/os/StatFs;->getAvailableBlocks()I move-result v0 int-to-long v2, v0 invoke-virtual {v1}, Landroid/os/StatFs;->getBlockSize()I move-result v0 int-to-long v0, v0 mul-long/2addr v0, v2 sput-wide v0, Lcom/facebook/internal/Utility;->availableExternalStorageGB:J .line 1107 :cond_0 sget-wide v0, Lcom/facebook/internal/Utility;->availableExternalStorageGB:J long-to-double v0, v0 .line 1108 invoke-static {v0, v1}, Lcom/facebook/internal/Utility;->convertBytesToGB(D)J move-result-wide v0 sput-wide v0, Lcom/facebook/internal/Utility;->availableExternalStorageGB:J :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 .line 1112 :goto_0 return-void .line 1109 :catch_0 move-exception v0 goto :goto_0 .end method .method private static refreshBestGuessNumberOfCPUCores()I .locals 2 .prologue .line 1023 sget v0, Lcom/facebook/internal/Utility;->numCPUCores:I if-lez v0, :cond_0 .line 1024 sget v0, Lcom/facebook/internal/Utility;->numCPUCores:I .line 1048 :goto_0 return v0 .line 1029 :cond_0 :try_start_0 new-instance v0, Ljava/io/File; const-string v1, "/sys/devices/system/cpu/" invoke-direct {v0, v1}, Ljava/io/File;->(Ljava/lang/String;)V .line 1030 new-instance v1, Lcom/facebook/internal/Utility$2; invoke-direct {v1}, Lcom/facebook/internal/Utility$2;->()V invoke-virtual {v0, v1}, Ljava/io/File;->listFiles(Ljava/io/FilenameFilter;)[Ljava/io/File; move-result-object v0 .line 1037 if-eqz v0, :cond_1 .line 1038 array-length v0, v0 sput v0, Lcom/facebook/internal/Utility;->numCPUCores:I :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 .line 1045 :cond_1 :goto_1 sget v0, Lcom/facebook/internal/Utility;->numCPUCores:I if-gtz v0, :cond_2 .line 1046 invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Runtime;->availableProcessors()I move-result v0 const/4 v1, 0x1 invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I move-result v0 sput v0, Lcom/facebook/internal/Utility;->numCPUCores:I .line 1048 :cond_2 sget v0, Lcom/facebook/internal/Utility;->numCPUCores:I goto :goto_0 .line 1040 :catch_0 move-exception v0 goto :goto_1 .end method .method private static refreshCarrierName(Landroid/content/Context;)V .locals 2 .prologue .line 1080 sget-object v0, Lcom/facebook/internal/Utility;->carrierName:Ljava/lang/String; const-string v1, "NoCarrier" invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_0 .line 1082 :try_start_0 const-string v0, "phone" .line 1083 invoke-virtual {p0, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/telephony/TelephonyManager; .line 1084 invoke-virtual {v0}, Landroid/telephony/TelephonyManager;->getNetworkOperatorName()Ljava/lang/String; move-result-object v0 sput-object v0, Lcom/facebook/internal/Utility;->carrierName:Ljava/lang/String; :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 .line 1088 :cond_0 :goto_0 return-void .line 1085 :catch_0 move-exception v0 goto :goto_0 .end method .method private static refreshPeriodicExtendedDeviceInfo(Landroid/content/Context;)V .locals 4 .prologue .line 1052 sget-wide v0, Lcom/facebook/internal/Utility;->timestampOfLastCheck:J const-wide/16 v2, -0x1 cmp-long v0, v0, v2 if-eqz v0, :cond_0 .line 1053 invoke-static {}, Ljava/lang/System;->currentTimeMillis()J move-result-wide v0 sget-wide v2, Lcom/facebook/internal/Utility;->timestampOfLastCheck:J sub-long/2addr v0, v2 const-wide/32 v2, 0x1b7740 cmp-long v0, v0, v2 if-ltz v0, :cond_1 .line 1055 :cond_0 invoke-static {}, Ljava/lang/System;->currentTimeMillis()J move-result-wide v0 sput-wide v0, Lcom/facebook/internal/Utility;->timestampOfLastCheck:J .line 1056 invoke-static {}, Lcom/facebook/internal/Utility;->refreshTimezone()V .line 1057 invoke-static {p0}, Lcom/facebook/internal/Utility;->refreshCarrierName(Landroid/content/Context;)V .line 1058 invoke-static {}, Lcom/facebook/internal/Utility;->refreshTotalExternalStorage()V .line 1059 invoke-static {}, Lcom/facebook/internal/Utility;->refreshAvailableExternalStorage()V .line 1061 :cond_1 return-void .end method .method private static refreshTimezone()V .locals 3 .prologue .line 1065 :try_start_0 invoke-static {}, Ljava/util/TimeZone;->getDefault()Ljava/util/TimeZone; move-result-object v0 .line 1066 new-instance v1, Ljava/util/Date; invoke-direct {v1}, Ljava/util/Date;->()V .line 1067 invoke-virtual {v0, v1}, Ljava/util/TimeZone;->inDaylightTime(Ljava/util/Date;)Z move-result v1 const/4 v2, 0x0 .line 1066 invoke-virtual {v0, v1, v2}, Ljava/util/TimeZone;->getDisplayName(ZI)Ljava/lang/String; move-result-object v1 sput-object v1, Lcom/facebook/internal/Utility;->deviceTimezoneAbbreviation:Ljava/lang/String; .line 1070 invoke-virtual {v0}, Ljava/util/TimeZone;->getID()Ljava/lang/String; move-result-object v0 sput-object v0, Lcom/facebook/internal/Utility;->deviceTimeZoneName:Ljava/lang/String; :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 .line 1073 :goto_0 return-void .line 1071 :catch_0 move-exception v0 goto :goto_0 .end method .method private static refreshTotalExternalStorage()V .locals 4 .prologue .line 1118 :try_start_0 invoke-static {}, Lcom/facebook/internal/Utility;->externalStorageExists()Z move-result v0 if-eqz v0, :cond_0 .line 1119 invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File; move-result-object v0 .line 1120 new-instance v1, Landroid/os/StatFs; invoke-virtual {v0}, Ljava/io/File;->getPath()Ljava/lang/String; move-result-object v0 invoke-direct {v1, v0}, Landroid/os/StatFs;->(Ljava/lang/String;)V .line 1121 invoke-virtual {v1}, Landroid/os/StatFs;->getBlockCount()I move-result v0 int-to-long v2, v0 invoke-virtual {v1}, Landroid/os/StatFs;->getBlockSize()I move-result v0 int-to-long v0, v0 mul-long/2addr v0, v2 sput-wide v0, Lcom/facebook/internal/Utility;->totalExternalStorageGB:J .line 1123 :cond_0 sget-wide v0, Lcom/facebook/internal/Utility;->totalExternalStorageGB:J long-to-double v0, v0 invoke-static {v0, v1}, Lcom/facebook/internal/Utility;->convertBytesToGB(D)J move-result-wide v0 sput-wide v0, Lcom/facebook/internal/Utility;->totalExternalStorageGB:J :try_end_0 .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 .line 1127 :goto_0 return-void .line 1124 :catch_0 move-exception v0 goto :goto_0 .end method .method public static safeGetStringFromResponse(Lorg/json/JSONObject;Ljava/lang/String;)Ljava/lang/String; .locals 1 .prologue .line 616 if-eqz p0, :cond_0 const-string v0, "" invoke-virtual {p0, p1, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 :goto_0 return-object v0 :cond_0 const-string v0, "" goto :goto_0 .end method .method public static setAppEventAttributionParameters(Lorg/json/JSONObject;Lcom/facebook/internal/AttributionIdentifiers;Ljava/lang/String;Z)V .locals 4 .prologue const/4 v1, 0x1 const/4 v2, 0x0 .line 681 if-eqz p1, :cond_0 invoke-virtual {p1}, Lcom/facebook/internal/AttributionIdentifiers;->getAttributionId()Ljava/lang/String; move-result-object v0 if-eqz v0, :cond_0 .line 682 const-string v0, "attribution" invoke-virtual {p1}, Lcom/facebook/internal/AttributionIdentifiers;->getAttributionId()Ljava/lang/String; move-result-object v3 invoke-virtual {p0, v0, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject; .line 685 :cond_0 if-eqz p1, :cond_1 .line 686 invoke-virtual {p1}, Lcom/facebook/internal/AttributionIdentifiers;->getAndroidAdvertiserId()Ljava/lang/String; move-result-object v0 if-eqz v0, :cond_1 .line 687 const-string v0, "advertiser_id" invoke-virtual {p1}, Lcom/facebook/internal/AttributionIdentifiers;->getAndroidAdvertiserId()Ljava/lang/String; move-result-object v3 invoke-virtual {p0, v0, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject; .line 688 const-string v3, "advertiser_tracking_enabled" invoke-virtual {p1}, Lcom/facebook/internal/AttributionIdentifiers;->isTrackingLimited()Z move-result v0 if-nez v0, :cond_3 move v0, v1 :goto_0 invoke-virtual {p0, v3, v0}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject; .line 691 :cond_1 if-eqz p1, :cond_2 .line 692 invoke-virtual {p1}, Lcom/facebook/internal/AttributionIdentifiers;->getAndroidInstallerPackage()Ljava/lang/String; move-result-object v0 if-eqz v0, :cond_2 .line 693 const-string v0, "installer_package" invoke-virtual {p1}, Lcom/facebook/internal/AttributionIdentifiers;->getAndroidInstallerPackage()Ljava/lang/String; move-result-object v3 invoke-virtual {p0, v0, v3}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject; .line 696 :cond_2 const-string v0, "anon_id" invoke-virtual {p0, v0, p2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject; .line 697 const-string v0, "application_tracking_enabled" if-nez p3, :cond_4 :goto_1 invoke-virtual {p0, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Z)Lorg/json/JSONObject; .line 698 return-void :cond_3 move v0, v2 .line 688 goto :goto_0 :cond_4 move v1, v2 .line 697 goto :goto_1 .end method .method public static setAppEventExtendedDeviceInfoParameters(Lorg/json/JSONObject;Landroid/content/Context;)V .locals 10 .prologue const/4 v5, 0x0 .line 704 new-instance v7, Lorg/json/JSONArray; invoke-direct {v7}, Lorg/json/JSONArray;->()V .line 705 const-string v0, "a2" invoke-virtual {v7, v0}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray; .line 707 invoke-static {p1}, Lcom/facebook/internal/Utility;->refreshPeriodicExtendedDeviceInfo(Landroid/content/Context;)V .line 710 invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String; move-result-object v2 .line 711 const/4 v1, -0x1 .line 712 const-string v0, "" .line 715 :try_start_0 invoke-virtual {p1}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager; move-result-object v3 const/4 v4, 0x0 invoke-virtual {v3, v2, v4}, Landroid/content/pm/PackageManager;->getPackageInfo(Ljava/lang/String;I)Landroid/content/pm/PackageInfo; move-result-object v3 .line 716 iget v1, v3, Landroid/content/pm/PackageInfo;->versionCode:I .line 717 iget-object v0, v3, Landroid/content/pm/PackageInfo;->versionName:Ljava/lang/String; :try_end_0 .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_4 .line 723 :goto_0 invoke-virtual {v7, v2}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray; .line 724 invoke-virtual {v7, v1}, Lorg/json/JSONArray;->put(I)Lorg/json/JSONArray; .line 725 invoke-virtual {v7, v0}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray; .line 728 sget-object v0, Landroid/os/Build$VERSION;->RELEASE:Ljava/lang/String; invoke-virtual {v7, v0}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray; .line 729 sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String; invoke-virtual {v7, v0}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray; .line 734 :try_start_1 invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources; move-result-object v0 invoke-virtual {v0}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration; move-result-object v0 iget-object v0, v0, Landroid/content/res/Configuration;->locale:Ljava/util/Locale; :try_end_1 .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0 .line 738 :goto_1 new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V invoke-virtual {v0}, Ljava/util/Locale;->getLanguage()Ljava/lang/String; move-result-object v2 invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, "_" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v0}, Ljava/util/Locale;->getCountry()Ljava/lang/String; move-result-object v0 invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 invoke-virtual {v7, v0}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray; .line 741 sget-object v0, Lcom/facebook/internal/Utility;->deviceTimezoneAbbreviation:Ljava/lang/String; invoke-virtual {v7, v0}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray; .line 744 sget-object v0, Lcom/facebook/internal/Utility;->carrierName:Ljava/lang/String; invoke-virtual {v7, v0}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray; .line 749 const-wide/16 v2, 0x0 .line 751 :try_start_2 const-string v0, "window" invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object; move-result-object v0 check-cast v0, Landroid/view/WindowManager; .line 752 if-eqz v0, :cond_0 .line 753 invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display; move-result-object v0 .line 754 new-instance v1, Landroid/util/DisplayMetrics; invoke-direct {v1}, Landroid/util/DisplayMetrics;->()V .line 755 invoke-virtual {v0, v1}, Landroid/view/Display;->getMetrics(Landroid/util/DisplayMetrics;)V .line 756 iget v6, v1, Landroid/util/DisplayMetrics;->widthPixels:I :try_end_2 .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_1 .line 757 :try_start_3 iget v4, v1, Landroid/util/DisplayMetrics;->heightPixels:I :try_end_3 .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_2 .line 758 :try_start_4 iget v0, v1, Landroid/util/DisplayMetrics;->density:F :try_end_4 .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_3 float-to-double v0, v0 move v2, v4 move v3, v6 .line 763 :goto_2 invoke-virtual {v7, v3}, Lorg/json/JSONArray;->put(I)Lorg/json/JSONArray; .line 764 invoke-virtual {v7, v2}, Lorg/json/JSONArray;->put(I)Lorg/json/JSONArray; .line 765 const-string v2, "%.2f" const/4 v3, 0x1 new-array v3, v3, [Ljava/lang/Object; invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double; move-result-object v0 aput-object v0, v3, v5 invoke-static {v2, v3}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; move-result-object v0 invoke-virtual {v7, v0}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray; .line 768 invoke-static {}, Lcom/facebook/internal/Utility;->refreshBestGuessNumberOfCPUCores()I move-result v0 invoke-virtual {v7, v0}, Lorg/json/JSONArray;->put(I)Lorg/json/JSONArray; .line 771 sget-wide v0, Lcom/facebook/internal/Utility;->totalExternalStorageGB:J invoke-virtual {v7, v0, v1}, Lorg/json/JSONArray;->put(J)Lorg/json/JSONArray; .line 772 sget-wide v0, Lcom/facebook/internal/Utility;->availableExternalStorageGB:J invoke-virtual {v7, v0, v1}, Lorg/json/JSONArray;->put(J)Lorg/json/JSONArray; .line 774 sget-object v0, Lcom/facebook/internal/Utility;->deviceTimeZoneName:Ljava/lang/String; invoke-virtual {v7, v0}, Lorg/json/JSONArray;->put(Ljava/lang/Object;)Lorg/json/JSONArray; .line 776 const-string v0, "extinfo" invoke-virtual {v7}, Lorg/json/JSONArray;->toString()Ljava/lang/String; move-result-object v1 invoke-virtual {p0, v0, v1}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject; .line 777 return-void .line 735 :catch_0 move-exception v0 .line 736 invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale; move-result-object v0 goto/16 :goto_1 .line 760 :catch_1 move-exception v0 move v0, v5 move v1, v5 :goto_3 move-wide v8, v2 move v2, v0 move v3, v1 move-wide v0, v8 goto :goto_2 :catch_2 move-exception v0 move v0, v5 move v1, v6 goto :goto_3 :catch_3 move-exception v0 move v0, v4 move v1, v6 goto :goto_3 .line 718 :catch_4 move-exception v3 goto/16 :goto_0 :cond_0 move-wide v0, v2 move v2, v5 move v3, v5 goto :goto_2 .end method .method public static sha1hash(Ljava/lang/String;)Ljava/lang/String; .locals 1 .prologue .line 272 const-string v0, "SHA-1" invoke-static {v0, p0}, Lcom/facebook/internal/Utility;->hashWithAlgorithm(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public static sha1hash([B)Ljava/lang/String; .locals 1 .prologue .line 276 const-string v0, "SHA-1" invoke-static {v0, p0}, Lcom/facebook/internal/Utility;->hashWithAlgorithm(Ljava/lang/String;[B)Ljava/lang/String; move-result-object v0 return-object v0 .end method .method public static stringsEqualOrEmpty(Ljava/lang/String;Ljava/lang/String;)Z .locals 2 .prologue .line 525 invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z move-result v0 .line 526 invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z move-result v1 .line 528 if-eqz v0, :cond_0 if-eqz v1, :cond_0 .line 530 const/4 v0, 0x1 .line 537 :goto_0 return v0 .line 532 :cond_0 if-nez v0, :cond_1 if-nez v1, :cond_1 .line 534 invoke-virtual {p0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 goto :goto_0 .line 537 :cond_1 const/4 v0, 0x0 goto :goto_0 .end method .method public static tryGetJSONArrayFromResponse(Lorg/json/JSONObject;Ljava/lang/String;)Lorg/json/JSONArray; .locals 1 .prologue .line 624 if-eqz p0, :cond_0 invoke-virtual {p0, p1}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray; move-result-object v0 :goto_0 return-object v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method public static tryGetJSONObjectFromResponse(Lorg/json/JSONObject;Ljava/lang/String;)Lorg/json/JSONObject; .locals 1 .prologue .line 620 if-eqz p0, :cond_0 invoke-virtual {p0, p1}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject; move-result-object v0 :goto_0 return-object v0 :cond_0 const/4 v0, 0x0 goto :goto_0 .end method .method public static varargs unmodifiableCollection([Ljava/lang/Object;)Ljava/util/Collection; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "([TT;)", "Ljava/util/Collection", ";" } .end annotation .prologue .line 248 invoke-static {p0}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List; move-result-object v0 invoke-static {v0}, Ljava/util/Collections;->unmodifiableCollection(Ljava/util/Collection;)Ljava/util/Collection; move-result-object v0 return-object v0 .end method .method public static writeStringMapToParcel(Landroid/os/Parcel;Ljava/util/Map;)V .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroid/os/Parcel;", "Ljava/util/Map", "<", "Ljava/lang/String;", "Ljava/lang/String;", ">;)V" } .end annotation .prologue .line 926 if-nez p1, :cond_1 .line 928 const/4 v0, -0x1 invoke-virtual {p0, v0}, Landroid/os/Parcel;->writeInt(I)V .line 936 :cond_0 return-void .line 930 :cond_1 invoke-interface {p1}, Ljava/util/Map;->size()I move-result v0 invoke-virtual {p0, v0}, Landroid/os/Parcel;->writeInt(I)V .line 931 invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set; move-result-object v0 invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object v2 :goto_0 invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_0 invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/Map$Entry; .line 932 invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object; move-result-object v1 check-cast v1, Ljava/lang/String; invoke-virtual {p0, v1}, Landroid/os/Parcel;->writeString(Ljava/lang/String;)V .line 933 invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/lang/String; invoke-virtual {p0, v0}, Landroid/os/Parcel;->writeString(Ljava/lang/String;)V goto :goto_0 .end method