232 lines
4.5 KiB
Smali
232 lines
4.5 KiB
Smali
.class public final Lrx/internal/util/SubscriptionList;
|
|
.super Ljava/lang/Object;
|
|
.source "SubscriptionList.java"
|
|
|
|
# interfaces
|
|
.implements Lrx/Subscription;
|
|
|
|
|
|
# instance fields
|
|
.field public d:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lrx/Subscription;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public volatile e:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lrx/Subscription;)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Ljava/util/LinkedList;
|
|
|
|
invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V
|
|
|
|
iput-object v0, p0, Lrx/internal/util/SubscriptionList;->d:Ljava/util/List;
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/LinkedList;->add(Ljava/lang/Object;)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public varargs constructor <init>([Lrx/Subscription;)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Ljava/util/LinkedList;
|
|
|
|
invoke-static {p1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/util/LinkedList;-><init>(Ljava/util/Collection;)V
|
|
|
|
iput-object v0, p0, Lrx/internal/util/SubscriptionList;->d:Ljava/util/List;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Lrx/Subscription;)V
|
|
.locals 1
|
|
|
|
invoke-interface {p1}, Lrx/Subscription;->isUnsubscribed()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-boolean v0, p0, Lrx/internal/util/SubscriptionList;->e:Z
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-boolean v0, p0, Lrx/internal/util/SubscriptionList;->e:Z
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-object v0, p0, Lrx/internal/util/SubscriptionList;->d:Ljava/util/List;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
new-instance v0, Ljava/util/LinkedList;
|
|
|
|
invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V
|
|
|
|
iput-object v0, p0, Lrx/internal/util/SubscriptionList;->d:Ljava/util/List;
|
|
|
|
:cond_1
|
|
invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
monitor-exit p0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw p1
|
|
|
|
:cond_3
|
|
:goto_0
|
|
invoke-interface {p1}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public isUnsubscribed()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lrx/internal/util/SubscriptionList;->e:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public unsubscribe()V
|
|
.locals 3
|
|
|
|
iget-boolean v0, p0, Lrx/internal/util/SubscriptionList;->e:Z
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
monitor-enter p0
|
|
|
|
:try_start_0
|
|
iget-boolean v0, p0, Lrx/internal/util/SubscriptionList;->e:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
monitor-exit p0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lrx/internal/util/SubscriptionList;->e:Z
|
|
|
|
iget-object v0, p0, Lrx/internal/util/SubscriptionList;->d:Ljava/util/List;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iput-object v1, p0, Lrx/internal/util/SubscriptionList;->d:Ljava/util/List;
|
|
|
|
monitor-exit p0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-interface {v0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lrx/Subscription;
|
|
|
|
:try_start_1
|
|
invoke-interface {v2}, Lrx/Subscription;->unsubscribe()V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v2
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
:cond_2
|
|
invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
invoke-static {v1}, Lc0/j/a;->W(Ljava/util/List;)V
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_1
|
|
move-exception v0
|
|
|
|
:try_start_2
|
|
monitor-exit p0
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_1
|
|
|
|
throw v0
|
|
|
|
:cond_4
|
|
:goto_1
|
|
return-void
|
|
.end method
|