t$a.smali

.class public final Lio/reactivex/t$a;
.super Ljava/lang/Object;
.source "SourceFile"

# interfaces
.implements Lio/reactivex/disposables/b;
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lio/reactivex/t;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "a"
.end annotation


# instance fields
.field public final a:Ljava/lang/Runnable;

.field public final b:Lio/reactivex/t$c;

.field public c:Ljava/lang/Thread;


# direct methods
.method public constructor <init>(Ljava/lang/Runnable;Lio/reactivex/t$c;)V
    .registers 3

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

    .line 2
    iput-object p1, p0, Lio/reactivex/t$a;->a:Ljava/lang/Runnable;

    .line 3
    iput-object p2, p0, Lio/reactivex/t$a;->b:Lio/reactivex/t$c;

    return-void
.end method


# virtual methods
.method public final dispose()V
    .registers 3

    .line 1
    iget-object v0, p0, Lio/reactivex/t$a;->c:Ljava/lang/Thread;

    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v1

    if-ne v0, v1, :cond_1d

    iget-object v0, p0, Lio/reactivex/t$a;->b:Lio/reactivex/t$c;

    instance-of v1, v0, Lio/reactivex/internal/schedulers/h;

    if-eqz v1, :cond_1d

    .line 2
    check-cast v0, Lio/reactivex/internal/schedulers/h;

    .line 3
    iget-boolean v1, v0, Lio/reactivex/internal/schedulers/h;->b:Z

    if-nez v1, :cond_22

    const/4 v1, 0x1

    .line 4
    iput-boolean v1, v0, Lio/reactivex/internal/schedulers/h;->b:Z

    .line 5
    iget-object v0, v0, Lio/reactivex/internal/schedulers/h;->a:Ljava/util/concurrent/ScheduledExecutorService;

    invoke-interface {v0}, Ljava/util/concurrent/ExecutorService;->shutdown()V

    goto :goto_22

    .line 6
    :cond_1d
    iget-object v0, p0, Lio/reactivex/t$a;->b:Lio/reactivex/t$c;

    invoke-interface {v0}, Lio/reactivex/disposables/b;->dispose()V

    :cond_22
    :goto_22
    return-void
.end method

.method public final isDisposed()Z
    .registers 2

    iget-object v0, p0, Lio/reactivex/t$a;->b:Lio/reactivex/t$c;

    invoke-interface {v0}, Lio/reactivex/disposables/b;->isDisposed()Z

    move-result v0

    return v0
.end method

.method public final run()V
    .registers 7

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

    move-result-object v0

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

    move-result-object v1

    if-ne v0, v1, :cond_c

    const/4 v0, 0x1

    goto :goto_d

    :cond_c
    const/4 v0, 0x0

    :goto_d
    const-string v1, "runnable"

    const-string v2, "io/reactivex/Scheduler$DisposeTask"

    const-string v3, "run"

    if-eqz v0, :cond_18

    invoke-static {v3, v2, v1}, Lcom/shopee/monitor/trace/c;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    .line 1
    :cond_18
    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v4

    iput-object v4, p0, Lio/reactivex/t$a;->c:Ljava/lang/Thread;

    const/4 v4, 0x0

    .line 2
    :try_start_1f
    iget-object v5, p0, Lio/reactivex/t$a;->a:Ljava/lang/Runnable;

    invoke-interface {v5}, Ljava/lang/Runnable;->run()V
    :try_end_24
    .catchall {:try_start_1f .. :try_end_24} :catchall_2f

    .line 3
    invoke-virtual {p0}, Lio/reactivex/t$a;->dispose()V

    .line 4
    iput-object v4, p0, Lio/reactivex/t$a;->c:Ljava/lang/Thread;

    if-eqz v0, :cond_2e

    .line 5
    invoke-static {v3, v2, v1}, Lcom/shopee/monitor/trace/c;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_2e
    return-void

    :catchall_2f
    move-exception v5

    .line 6
    invoke-virtual {p0}, Lio/reactivex/t$a;->dispose()V

    .line 7
    iput-object v4, p0, Lio/reactivex/t$a;->c:Ljava/lang/Thread;

    if-eqz v0, :cond_3a

    invoke-static {v3, v2, v1}, Lcom/shopee/monitor/trace/c;->b(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_3a
    throw v5
.end method