a.smali

.class public final Lsg/bigo/spark/component/a/a;
.super Ljava/lang/Object;
.source "SourceFile"


# static fields
.field private static final a:Ljava/lang/Object;

.field private static b:Z


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

    .line 25
    new-instance v0, Ljava/lang/Object;

    invoke-direct {v0}, Ljava/lang/Object;-><init>()V

    sput-object v0, Lsg/bigo/spark/component/a/a;->a:Ljava/lang/Object;

    const/4 v0, 0x0

    .line 26
    sput-boolean v0, Lsg/bigo/spark/component/a/a;->b:Z

    return-void
.end method

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

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

    return-void
.end method

.method public static a(Landroid/content/Context;)V
    .registers 6

    .line 29
    sget-boolean v0, Lsg/bigo/spark/component/a/a;->b:Z

    if-eqz v0, :cond_5

    return-void

    .line 32
    :cond_5
    sget-object v0, Lsg/bigo/spark/component/a/a;->a:Ljava/lang/Object;

    monitor-enter v0

    .line 33
    :try_start_8
    sget-boolean v1, Lsg/bigo/spark/component/a/a;->b:Z

    if-eqz v1, :cond_e

    .line 34
    monitor-exit v0
    :try_end_d
    .catchall {:try_start_8 .. :try_end_d} :catchall_35

    return-void

    :cond_e
    const/4 v1, 0x1

    :try_start_f
    new-array v2, v1, [Lcom/facebook/nativeload/BaseNativeLoader;

    const/4 v3, 0x0

    .line 37
    sget-object v4, Lsg/bigo/spark/component/a/c;->a:Lcom/facebook/nativeload/BaseNativeLoader;

    aput-object v4, v2, v3

    invoke-static {p0, v2}, Lcom/facebook/nativeload/NativeLoader;->setup(Landroid/content/Context;[Lcom/facebook/nativeload/BaseNativeLoader;)V

    .line 38
    invoke-static {p0}, Lsg/bigo/spark/component/a/b;->a(Landroid/content/Context;)Lcom/facebook/imagepipeline/core/ImagePipelineConfig;

    move-result-object v2

    invoke-static {p0, v2}, Lcom/facebook/drawee/backends/pipeline/Fresco;->initialize(Landroid/content/Context;Lcom/facebook/imagepipeline/core/ImagePipelineConfig;)V
    :try_end_20
    .catch Ljava/lang/RuntimeException; {:try_start_f .. :try_end_20} :catch_33
    .catchall {:try_start_f .. :try_end_20} :catchall_35

    .line 42
    :try_start_20
    invoke-static {}, Lcom/facebook/imagepipeline/nativecode/ImagePipelineNativeLoader;->load()V
    :try_end_23
    .catch Ljava/lang/UnsatisfiedLinkError; {:try_start_20 .. :try_end_23} :catch_24
    .catch Ljava/lang/RuntimeException; {:try_start_20 .. :try_end_23} :catch_33
    .catchall {:try_start_20 .. :try_end_23} :catchall_35

    goto :goto_31

    :catch_24
    move-exception v2

    :try_start_25
    const-string v3, "imofresco"

    const-string v4, "load error"

    .line 44
    invoke-static {v3, v4, v2}, Lsg/bigo/spark/utils/i;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    const-string v2, "imagepipeline"

    .line 45
    invoke-static {p0, v2}, Lcom/getkeepsafe/relinker/b;->a(Landroid/content/Context;Ljava/lang/String;)V

    .line 47
    :goto_31
    sput-boolean v1, Lsg/bigo/spark/component/a/a;->b:Z
    :try_end_33
    .catch Ljava/lang/RuntimeException; {:try_start_25 .. :try_end_33} :catch_33
    .catchall {:try_start_25 .. :try_end_33} :catchall_35

    .line 51
    :catch_33
    :try_start_33
    monitor-exit v0

    return-void

    :catchall_35
    move-exception p0

    monitor-exit v0
    :try_end_37
    .catchall {:try_start_33 .. :try_end_37} :catchall_35

    throw p0
.end method

.method public static b(Landroid/content/Context;)V
    .registers 4

    .line 60
    sget-boolean v0, Lsg/bigo/spark/component/a/a;->b:Z

    if-eqz v0, :cond_5

    return-void

    .line 1051
    :cond_5
    invoke-static {}, Lsg/bigo/core/task/a$a;->a()Lsg/bigo/core/task/a;

    move-result-object v0

    .line 63
    sget-object v1, Lsg/bigo/core/task/b;->BACKGROUND:Lsg/bigo/core/task/b;

    new-instance v2, Lsg/bigo/spark/component/a/a$1;

    invoke-direct {v2, p0}, Lsg/bigo/spark/component/a/a$1;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, v1, v2}, Lsg/bigo/core/task/a;->a(Lsg/bigo/core/task/b;Ljava/lang/Runnable;)Lbolts/e;

    return-void
.end method