2020-08-24 20:40:41 +00:00
|
|
|
.class public final Lcom/discord/stores/StoreConnectivity;
|
2020-05-17 12:40:10 +00:00
|
|
|
.super Landroid/content/BroadcastReceiver;
|
2020-08-24 20:40:41 +00:00
|
|
|
.source "StoreConnectivity.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/stores/StoreConnectivity$Companion;
|
|
|
|
}
|
|
|
|
.end annotation
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final CONNECTING_DELAY_AGGRESSIVE:J = 0xbb8L
|
|
|
|
|
|
|
|
.field public static final CONNECTING_DELAY_PASSIVE:J = 0x7530L
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.field public static final Companion:Lcom/discord/stores/StoreConnectivity$Companion;
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.field public static final RECENTLY_FOREGROUNDED_WINDOW:J = 0x7530L
|
|
|
|
|
|
|
|
.field public static final STATE_CONNECTING:I = 0x3
|
|
|
|
|
|
|
|
.field public static final STATE_OFFLINE:I = 0x2
|
|
|
|
|
|
|
|
.field public static final STATE_ONLINE:I = 0x1
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public connectingTransitionTimerSubscription:Lrx/Subscription;
|
|
|
|
|
|
|
|
.field public deviceNetworkOffline:Z
|
|
|
|
|
|
|
|
.field public optimisticallyConnected:Z
|
|
|
|
|
|
|
|
.field public recentlyForegrounded:Z
|
|
|
|
|
|
|
|
.field public recentlyForegroundedClearSubscription:Lrx/Subscription;
|
|
|
|
|
|
|
|
.field public state:I
|
|
|
|
|
|
|
|
.field public final statePublisher:Lrx/subjects/Subject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/Subject<",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public static constructor <clinit>()V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
new-instance v0, Lcom/discord/stores/StoreConnectivity$Companion;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/stores/StoreConnectivity$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreConnectivity;->Companion:Lcom/discord/stores/StoreConnectivity$Companion;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v0, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreConnectivity;->recentlyForegrounded:Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-instance v1, Lrx/subjects/SerializedSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {v0}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {v1, v0}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-object v1, p0, Lcom/discord/stores/StoreConnectivity;->statePublisher:Lrx/subjects/Subject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public static final synthetic access$clearRecentlyForegrounded(Lcom/discord/stores/StoreConnectivity;)V
|
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreConnectivity;->clearRecentlyForegrounded()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public static final synthetic access$getConnectingTransitionTimerSubscription$p(Lcom/discord/stores/StoreConnectivity;)Lrx/Subscription;
|
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreConnectivity;->connectingTransitionTimerSubscription:Lrx/Subscription;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
return-object p0
|
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public static final synthetic access$getRecentlyForegroundedClearSubscription$p(Lcom/discord/stores/StoreConnectivity;)Lrx/Subscription;
|
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreConnectivity;->recentlyForegroundedClearSubscription:Lrx/Subscription;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
return-object p0
|
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public static final synthetic access$setConnectingTransitionTimerSubscription$p(Lcom/discord/stores/StoreConnectivity;Lrx/Subscription;)V
|
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreConnectivity;->connectingTransitionTimerSubscription:Lrx/Subscription;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
2020-08-24 20:40:41 +00:00
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public static final synthetic access$setRecentlyForegroundedClearSubscription$p(Lcom/discord/stores/StoreConnectivity;Lrx/Subscription;)V
|
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreConnectivity;->recentlyForegroundedClearSubscription:Lrx/Subscription;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
return-void
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public static final synthetic access$setState(Lcom/discord/stores/StoreConnectivity;I)V
|
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreConnectivity;->setState(I)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method private final declared-synchronized clearRecentlyForegrounded()V
|
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-enter p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
:try_start_0
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreConnectivity;->recentlyForegrounded:Z
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
return-void
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
throw v0
|
|
|
|
.end method
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method private final declared-synchronized handleDeviceConnectivityChange(Z)V
|
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-enter p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
if-nez p1, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const/4 p1, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
:goto_0
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_start_0
|
2020-08-24 20:40:41 +00:00
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreConnectivity;->deviceNetworkOffline:Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreConnectivity;->updateConnectivityState()V
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method private final declared-synchronized setState(I)V
|
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-enter p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:try_start_0
|
2020-08-24 20:40:41 +00:00
|
|
|
iget v0, p0, Lcom/discord/stores/StoreConnectivity;->state:I
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
if-ne v0, p1, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
2020-08-24 20:40:41 +00:00
|
|
|
:try_start_1
|
2020-05-17 12:40:10 +00:00
|
|
|
iput p1, p0, Lcom/discord/stores/StoreConnectivity;->state:I
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreConnectivity;->statePublisher:Lrx/subjects/Subject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-interface {v0, p1}, Ls0/g;->onNext(Ljava/lang/Object;)V
|
2020-08-24 20:40:41 +00:00
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method private final transitioningFromRecentlyForegroundedTimer(Z)V
|
|
|
|
.locals 10
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreConnectivity;->recentlyForegroundedClearSubscription:Lrx/Subscription;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
:cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreConnectivity;->recentlyForegroundedClearSubscription:Lrx/Subscription;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-wide/16 v0, 0x7530
|
|
|
|
|
|
|
|
sget-object p1, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {v0, v1, p1}, Lrx/Observable;->Z(JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const-string v0, "Observable\n .time\u2026W, TimeUnit.MILLISECONDS)"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const-class v2, Lcom/discord/stores/StoreConnectivity;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const/4 v3, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
new-instance v4, Lcom/discord/stores/StoreConnectivity$transitioningFromRecentlyForegroundedTimer$1;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-direct {v4, p0}, Lcom/discord/stores/StoreConnectivity$transitioningFromRecentlyForegroundedTimer$1;-><init>(Lcom/discord/stores/StoreConnectivity;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const/4 v5, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const/4 v6, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
new-instance v7, Lcom/discord/stores/StoreConnectivity$transitioningFromRecentlyForegroundedTimer$2;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-direct {v7, p0}, Lcom/discord/stores/StoreConnectivity$transitioningFromRecentlyForegroundedTimer$2;-><init>(Lcom/discord/stores/StoreConnectivity;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const/16 v8, 0x1a
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const/4 v9, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-static/range {v1 .. v9}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method private final updateConnectivityState()V
|
|
|
|
.locals 11
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreConnectivity;->connectingTransitionTimerSubscription:Lrx/Subscription;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
:cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreConnectivity;->connectingTransitionTimerSubscription:Lrx/Subscription;
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreConnectivity;->deviceNetworkOffline:Z
|
|
|
|
|
|
|
|
const/4 v1, 0x2
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
invoke-direct {p0, v1}, Lcom/discord/stores/StoreConnectivity;->setState(I)V
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreConnectivity;->optimisticallyConnected:Z
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreConnectivity;->setState(I)V
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget v0, p0, Lcom/discord/stores/StoreConnectivity;->state:I
|
|
|
|
|
|
|
|
if-ne v0, v1, :cond_3
|
|
|
|
|
|
|
|
const/4 v0, 0x3
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/stores/StoreConnectivity;->setState(I)V
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreConnectivity;->recentlyForegrounded:Z
|
|
|
|
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
|
|
|
|
const-wide/16 v0, 0xbb8
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
const-wide/16 v0, 0x7530
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {v0, v1, v2}, Lrx/Observable;->Z(JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const-string v1, "Observable\n .\u2026ILLISECONDS\n )"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {v0, v1}, Lk0/o/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
move-result-object v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const-class v3, Lcom/discord/stores/StoreConnectivity;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const/4 v4, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
new-instance v5, Lcom/discord/stores/StoreConnectivity$updateConnectivityState$1;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-direct {v5, p0}, Lcom/discord/stores/StoreConnectivity$updateConnectivityState$1;-><init>(Lcom/discord/stores/StoreConnectivity;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const/4 v6, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const/4 v7, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
new-instance v8, Lcom/discord/stores/StoreConnectivity$updateConnectivityState$2;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-direct {v8, p0}, Lcom/discord/stores/StoreConnectivity$updateConnectivityState$2;-><init>(Lcom/discord/stores/StoreConnectivity;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const/16 v9, 0x1a
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const/4 v10, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-static/range {v2 .. v10}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:goto_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public final declared-synchronized handleBackgrounded(Z)V
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-enter p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreConnectivity;->transitioningFromRecentlyForegroundedTimer(Z)V
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreConnectivity;->recentlyForegrounded:Z
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreConnectivity;->updateConnectivityState()V
|
2020-08-24 20:40:41 +00:00
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public final declared-synchronized handleConnected(Z)V
|
|
|
|
.locals 0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-enter p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreConnectivity;->optimisticallyConnected:Z
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreConnectivity;->updateConnectivityState()V
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
2020-08-24 20:40:41 +00:00
|
|
|
move-exception p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
throw p1
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public final declared-synchronized handleConnectionReady(Z)V
|
|
|
|
.locals 1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-enter p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:try_start_0
|
2020-08-24 20:40:41 +00:00
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreConnectivity;->deviceNetworkOffline:Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
if-eqz v0, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreConnectivity;->deviceNetworkOffline:Z
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreConnectivity;->updateConnectivityState()V
|
2020-08-24 20:40:41 +00:00
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public final declared-synchronized init(Landroid/content/Context;)V
|
|
|
|
.locals 2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-enter p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:try_start_0
|
2020-08-24 20:40:41 +00:00
|
|
|
const-string v0, "context"
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
new-instance v0, Landroid/content/IntentFilter;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
const-string v1, "android.net.conn.CONNECTIVITY_CHANGE"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-direct {v0, v1}, Landroid/content/IntentFilter;-><init>(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
invoke-virtual {p1, p0, v0}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreConnectivity;->Companion:Lcom/discord/stores/StoreConnectivity$Companion;
|
|
|
|
|
|
|
|
invoke-static {v0, p1}, Lcom/discord/stores/StoreConnectivity$Companion;->access$isDeviceConnectedOrConnecting(Lcom/discord/stores/StoreConnectivity$Companion;Landroid/content/Context;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreConnectivity;->handleDeviceConnectivityChange(Z)V
|
2020-08-24 20:40:41 +00:00
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception p1
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
monitor-exit p0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
.method public final observeState()Lrx/Observable;
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreConnectivity;->statePublisher:Lrx/subjects/Subject;
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
|
2020-08-24 20:40:41 +00:00
|
|
|
.locals 1
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
const-string v0, "context"
|
2020-08-24 20:40:41 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const-string v0, "intent"
|
2020-08-24 20:40:41 +00:00
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {p2, v0}, Lk0/o/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-24 20:40:41 +00:00
|
|
|
sget-object p2, Lcom/discord/stores/StoreConnectivity;->Companion:Lcom/discord/stores/StoreConnectivity$Companion;
|
|
|
|
|
|
|
|
invoke-static {p2, p1}, Lcom/discord/stores/StoreConnectivity$Companion;->access$isDeviceConnectedOrConnecting(Lcom/discord/stores/StoreConnectivity$Companion;Landroid/content/Context;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreConnectivity;->handleDeviceConnectivityChange(Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|