UiThreadImmediateExecutorService.smali

.class public Lcom/facebook/common/executors/UiThreadImmediateExecutorService;
.super Lcom/facebook/common/executors/HandlerExecutorServiceImpl;
.source "SourceFile"


# static fields
.field private static sInstance:Lcom/facebook/common/executors/UiThreadImmediateExecutorService;


# direct methods
.method private constructor <init>()V
    .registers 3

    new-instance v0, Landroid/os/Handler;

    invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V

    invoke-direct {p0, v0}, Lcom/facebook/common/executors/HandlerExecutorServiceImpl;-><init>(Landroid/os/Handler;)V

    return-void
.end method

.method public static INVOKESPECIAL_com_facebook_common_executors_UiThreadImmediateExecutorService_com_shopee_app_asm_anr_threadpool_ExecutorProxy_executeThread(Lcom/facebook/common/executors/HandlerExecutorServiceImpl;Ljava/lang/Runnable;)V
    .registers 3

    .line 1
    invoke-static {p1, p0}, Lcom/shopee/app/asm/anr/threadpool/a;->a(Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_c

    .line 2
    sget-object p0, Lcom/shopee/app/asm/fix/threadpool/global/i;->e:Lcom/shopee/app/asm/fix/threadpool/global/j;

    .line 3
    invoke-virtual {p0, p1}, Lcom/shopee/app/asm/anr/threadpool/b;->execute(Ljava/lang/Runnable;)V

    return-void

    .line 4
    :cond_c
    # invokes: Lcom/facebook/common/executors/HandlerExecutorServiceImpl;->execute(Ljava/lang/Runnable;)V
    invoke-static {p0, p1}, Lcom/facebook/common/executors/UiThreadImmediateExecutorService;->access$000(Lcom/facebook/common/executors/HandlerExecutorServiceImpl;Ljava/lang/Runnable;)V

    return-void
.end method

.method public static synthetic access$000(Lcom/facebook/common/executors/HandlerExecutorServiceImpl;Ljava/lang/Runnable;)V
    .registers 2

    invoke-super {p0, p1}, Lcom/facebook/common/executors/HandlerExecutorServiceImpl;->execute(Ljava/lang/Runnable;)V

    return-void
.end method

.method public static getInstance()Lcom/facebook/common/executors/UiThreadImmediateExecutorService;
    .registers 1

    .line 1
    sget-object v0, Lcom/facebook/common/executors/UiThreadImmediateExecutorService;->sInstance:Lcom/facebook/common/executors/UiThreadImmediateExecutorService;

    if-nez v0, :cond_b

    .line 2
    new-instance v0, Lcom/facebook/common/executors/UiThreadImmediateExecutorService;

    invoke-direct {v0}, Lcom/facebook/common/executors/UiThreadImmediateExecutorService;-><init>()V

    sput-object v0, Lcom/facebook/common/executors/UiThreadImmediateExecutorService;->sInstance:Lcom/facebook/common/executors/UiThreadImmediateExecutorService;

    .line 3
    :cond_b
    sget-object v0, Lcom/facebook/common/executors/UiThreadImmediateExecutorService;->sInstance:Lcom/facebook/common/executors/UiThreadImmediateExecutorService;

    return-object v0
.end method


# virtual methods
.method public execute(Ljava/lang/Runnable;)V
    .registers 3

    .line 1
    invoke-virtual {p0}, Lcom/facebook/common/executors/HandlerExecutorServiceImpl;->isHandlerThread()Z

    move-result v0

    if-eqz v0, :cond_a

    .line 2
    invoke-interface {p1}, Ljava/lang/Runnable;->run()V

    goto :goto_d

    .line 3
    :cond_a
    invoke-static {p0, p1}, Lcom/facebook/common/executors/UiThreadImmediateExecutorService;->INVOKESPECIAL_com_facebook_common_executors_UiThreadImmediateExecutorService_com_shopee_app_asm_anr_threadpool_ExecutorProxy_executeThread(Lcom/facebook/common/executors/HandlerExecutorServiceImpl;Ljava/lang/Runnable;)V

    :goto_d
    return-void
.end method