h$a.smali

.class Lcom/tencent/open/utils/h$a;
.super Ljava/lang/Object;
.source "ProGuard"

# interfaces
.implements Ljava/util/concurrent/Executor;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/tencent/open/utils/h;
.end annotation

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


# instance fields
.field final a:Ljava/util/Queue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Queue",
            "<",
            "Ljava/lang/Runnable;",
            ">;"
        }
    .end annotation
.end field

.field b:Ljava/lang/Runnable;


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

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

    .line 194
    new-instance v0, Ljava/util/LinkedList;

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

    iput-object v0, p0, Lcom/tencent/open/utils/h$a;->a:Ljava/util/Queue;

    return-void
.end method

.method synthetic constructor <init>(Lcom/tencent/open/utils/h$1;)V
    .registers 2

    .prologue
    .line 193
    invoke-direct {p0}, Lcom/tencent/open/utils/h$a;-><init>()V

    return-void
.end method


# virtual methods
.method protected declared-synchronized a()V
    .registers 3

    .prologue
    .line 213
    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lcom/tencent/open/utils/h$a;->a:Ljava/util/Queue;

    invoke-interface {v0}, Ljava/util/Queue;->poll()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Runnable;

    iput-object v0, p0, Lcom/tencent/open/utils/h$a;->b:Ljava/lang/Runnable;

    if-eqz v0, :cond_14

    .line 214
    sget-object v0, Lcom/tencent/open/utils/h;->a:Ljava/util/concurrent/Executor;

    iget-object v1, p0, Lcom/tencent/open/utils/h$a;->b:Ljava/lang/Runnable;

    invoke-interface {v0, v1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
    :try_end_14
    .catchall {:try_start_1 .. :try_end_14} :catchall_16

    .line 216
    :cond_14
    monitor-exit p0

    return-void

    .line 213
    :catchall_16
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public declared-synchronized execute(Ljava/lang/Runnable;)V
    .registers 4

    .prologue
    .line 198
    monitor-enter p0

    :try_start_1
    iget-object v0, p0, Lcom/tencent/open/utils/h$a;->a:Ljava/util/Queue;

    new-instance v1, Lcom/tencent/open/utils/h$a$1;

    invoke-direct {v1, p0, p1}, Lcom/tencent/open/utils/h$a$1;-><init>(Lcom/tencent/open/utils/h$a;Ljava/lang/Runnable;)V

    invoke-interface {v0, v1}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z

    .line 207
    iget-object v0, p0, Lcom/tencent/open/utils/h$a;->b:Ljava/lang/Runnable;

    if-nez v0, :cond_12

    .line 208
    invoke-virtual {p0}, Lcom/tencent/open/utils/h$a;->a()V
    :try_end_12
    .catchall {:try_start_1 .. :try_end_12} :catchall_14

    .line 210
    :cond_12
    monitor-exit p0

    return-void

    .line 198
    :catchall_14
    move-exception v0

    monitor-exit p0

    throw v0
.end method