105 lines
2.9 KiB
Smali
105 lines
2.9 KiB
Smali
.class final Lcom/discord/utilities/messagesend/MessageQueue$DrainListener;
|
|
.super Ljava/lang/Object;
|
|
.source "MessageQueue.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/utilities/messagesend/MessageQueue;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x18
|
|
name = "DrainListener"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private isCompleted:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
.field private final onCompleted:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Lcom/discord/utilities/messagesend/MessageResult;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lkotlin/jvm/functions/Function1;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/discord/utilities/messagesend/MessageResult;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "onCompleted"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/messagesend/MessageQueue$DrainListener;->onCompleted:Lkotlin/jvm/functions/Function1;
|
|
|
|
new-instance p1, Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-direct {p1, v0}, Ljava/util/concurrent/atomic/AtomicBoolean;-><init>(Z)V
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/messagesend/MessageQueue$DrainListener;->isCompleted:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final declared-synchronized complete(Lcom/discord/utilities/messagesend/MessageResult;)V
|
|
.locals 2
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
const-string v0, "result"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/messagesend/MessageQueue$DrainListener;->isCompleted:Ljava/util/concurrent/atomic/AtomicBoolean;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicBoolean;->getAndSet(Z)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/messagesend/MessageQueue$DrainListener;->onCompleted:Lkotlin/jvm/functions/Function1;
|
|
|
|
invoke-interface {v0, p1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:cond_0
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
|
|
throw p1
|
|
.end method
|