GifSupportStatus.smali

.class public Lcom/facebook/common/gif/GifSupportStatus;
.super Ljava/lang/Object;
.source "SourceFile"


# static fields
.field public static sGifBitmapFactory:Lcom/facebook/common/gif/GifBitmapFactory; = null

.field private static sWebpLibraryChecked:Z = false


# direct methods
.method static constructor <clinit>()V
    .registers 0

    return-void
.end method

.method public constructor <init>()V
    .registers 1

    .line 5
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static loadGifBitmapFactoryIfExists()Lcom/facebook/common/gif/GifBitmapFactory;
    .registers 2

    .line 14
    sget-boolean v0, Lcom/facebook/common/gif/GifSupportStatus;->sWebpLibraryChecked:Z

    if-eqz v0, :cond_7

    .line 15
    sget-object v0, Lcom/facebook/common/gif/GifSupportStatus;->sGifBitmapFactory:Lcom/facebook/common/gif/GifBitmapFactory;

    return-object v0

    :cond_7
    const/4 v0, 0x0

    :try_start_8
    const-string v1, "com.facebook.animated.gif.GifBitmapFactoryImpl"

    .line 20
    invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v1

    .line 21
    invoke-virtual {v1}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/facebook/common/gif/GifBitmapFactory;
    :try_end_14
    .catchall {:try_start_8 .. :try_end_14} :catchall_16

    move-object v0, v1

    goto :goto_17

    :catchall_16
    nop

    :goto_17
    const/4 v1, 0x1

    .line 25
    sput-boolean v1, Lcom/facebook/common/gif/GifSupportStatus;->sWebpLibraryChecked:Z

    .line 26
    sget-object v1, Lcom/facebook/common/gif/GifSupportStatus;->sGifBitmapFactory:Lcom/facebook/common/gif/GifBitmapFactory;

    if-nez v1, :cond_20

    .line 27
    sput-object v0, Lcom/facebook/common/gif/GifSupportStatus;->sGifBitmapFactory:Lcom/facebook/common/gif/GifBitmapFactory;

    :cond_20
    return-object v0
.end method