156 lines
4.6 KiB
Smali
156 lines
4.6 KiB
Smali
.class public final Lcom/discord/stores/StoreRtcRegion;
|
|
.super Ljava/lang/Object;
|
|
.source "StoreRtcRegion.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public cloudflareBestRegion:Ljava/lang/String;
|
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
.field public final restAPI:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/Dispatcher;Lcom/discord/utilities/rest/RestAPI;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreRtcRegion;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreRtcRegion;->restAPI:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "restAPI"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "dispatcher"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lcom/discord/stores/Dispatcher;Lcom/discord/utilities/rest/RestAPI;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
sget-object p2, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object p2
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/stores/StoreRtcRegion;-><init>(Lcom/discord/stores/Dispatcher;Lcom/discord/utilities/rest/RestAPI;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$updateCloudflareBestRegion(Lcom/discord/stores/StoreRtcRegion;Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreRtcRegion;->updateCloudflareBestRegion(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final fetchCloudflareBestRegion()V
|
|
.locals 13
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreRtcRegion;->restAPI:Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/rest/RestAPI;->getCloudflareBestRegion()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
const-class v5, Lcom/discord/stores/StoreRtcRegion;
|
|
|
|
new-instance v10, Lcom/discord/stores/StoreRtcRegion$fetchCloudflareBestRegion$1;
|
|
|
|
invoke-direct {v10, p0}, Lcom/discord/stores/StoreRtcRegion$fetchCloudflareBestRegion$1;-><init>(Lcom/discord/stores/StoreRtcRegion;)V
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/16 v11, 0x1e
|
|
|
|
const/4 v12, 0x0
|
|
|
|
invoke-static/range {v4 .. v12}, 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
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final updateCloudflareBestRegion(Ljava/lang/String;)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreRtcRegion;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreRtcRegion$updateCloudflareBestRegion$1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/stores/StoreRtcRegion$updateCloudflareBestRegion$1;-><init>(Lcom/discord/stores/StoreRtcRegion;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getCloudflareBestRegion$app_productionDiscordExternalRelease()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreRtcRegion;->cloudflareBestRegion:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final handleConnectionOpen$app_productionDiscordExternalRelease()V
|
|
.locals 0
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreRtcRegion;->fetchCloudflareBestRegion()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setCloudflareBestRegion$app_productionDiscordExternalRelease(Ljava/lang/String;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreRtcRegion;->cloudflareBestRegion:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|