1452 lines
45 KiB
Smali
1452 lines
45 KiB
Smali
.class public final Lcom/discord/stores/StoreExperiments;
|
|
.super Ljava/lang/Object;
|
|
.source "StoreExperiments.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/stores/StoreExperiments$Experiment;,
|
|
Lcom/discord/stores/StoreExperiments$Triggered;,
|
|
Lcom/discord/stores/StoreExperiments$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/discord/stores/StoreExperiments$Companion;
|
|
|
|
.field public static final DEFAULT_CONTEXT_CALLBACK:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Lcom/discord/models/domain/ModelExperiment;",
|
|
"Lcom/discord/models/domain/ModelExperiment$Context;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public static final DISCORD_TESTERS_GUILD_ID:J = 0x2bc056ab0800006L
|
|
|
|
.field public static final UNINITIALIZED:Ljava/lang/String; = "UNINITIALIZED"
|
|
|
|
|
|
# instance fields
|
|
.field public authToken:Ljava/lang/String;
|
|
|
|
.field public final clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
.field public final experimentOverrides:Ljava/util/HashMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final experimentOverridesCache:Lcom/discord/utilities/persister/Persister;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final experimentsEligible:Ljava/util/HashMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreExperiments$Experiment;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final experimentsEligibleSubject:Lrx/subjects/SerializedSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/SerializedSubject<",
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreExperiments$Experiment;",
|
|
">;",
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreExperiments$Experiment;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final experimentsTriggered:Ljava/util/HashMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/String;",
|
|
"Lcom/discord/stores/StoreExperiments$Triggered;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final experimentsTriggeredCache:Lcom/discord/utilities/persister/Persister;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/persister/Persister<",
|
|
"Ljava/util/HashMap<",
|
|
"Ljava/lang/String;",
|
|
"Lcom/discord/stores/StoreExperiments$Triggered;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public fingerprint:Ljava/lang/String;
|
|
|
|
.field public initialized:Z
|
|
|
|
.field public final initializedSubject:Lrx/subjects/SerializedSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/SerializedSubject<",
|
|
"Ljava/lang/Boolean;",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public isDirty:Z
|
|
|
|
.field public final storeAuthentication:Lcom/discord/stores/StoreAuthentication;
|
|
|
|
.field public final storeGuilds:Lcom/discord/stores/StoreGuilds;
|
|
|
|
.field public final storeUser:Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreExperiments$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/stores/StoreExperiments$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreExperiments;->Companion:Lcom/discord/stores/StoreExperiments$Companion;
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreExperiments$Companion$DEFAULT_CONTEXT_CALLBACK$1;->INSTANCE:Lcom/discord/stores/StoreExperiments$Companion$DEFAULT_CONTEXT_CALLBACK$1;
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreExperiments;->DEFAULT_CONTEXT_CALLBACK:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/discord/utilities/time/Clock;Lcom/discord/stores/Dispatcher;Lcom/discord/stores/StoreUser;Lcom/discord/stores/StoreGuilds;Lcom/discord/stores/StoreAuthentication;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
if-eqz p2, :cond_3
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExperiments;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreExperiments;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
iput-object p3, p0, Lcom/discord/stores/StoreExperiments;->storeUser:Lcom/discord/stores/StoreUser;
|
|
|
|
iput-object p4, p0, Lcom/discord/stores/StoreExperiments;->storeGuilds:Lcom/discord/stores/StoreGuilds;
|
|
|
|
iput-object p5, p0, Lcom/discord/stores/StoreExperiments;->storeAuthentication:Lcom/discord/stores/StoreAuthentication;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreExperiments;->isDirty:Z
|
|
|
|
new-instance p1, Lrx/subjects/SerializedSubject;
|
|
|
|
iget-boolean p2, p0, Lcom/discord/stores/StoreExperiments;->initialized:Z
|
|
|
|
invoke-static {p2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExperiments;->initializedSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
const-string p1, "UNINITIALIZED"
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExperiments;->authToken:Ljava/lang/String;
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExperiments;->fingerprint:Ljava/lang/String;
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligible:Ljava/util/HashMap;
|
|
|
|
new-instance p1, Lrx/subjects/SerializedSubject;
|
|
|
|
new-instance p2, Ljava/util/HashMap;
|
|
|
|
iget-object p3, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligible:Ljava/util/HashMap;
|
|
|
|
invoke-direct {p2, p3}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
invoke-static {p2}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Lrx/subjects/SerializedSubject;-><init>(Lrx/subjects/Subject;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligibleSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExperiments;->experimentsTriggered:Ljava/util/HashMap;
|
|
|
|
new-instance p1, Ljava/util/HashMap;
|
|
|
|
invoke-direct {p1}, Ljava/util/HashMap;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExperiments;->experimentOverrides:Ljava/util/HashMap;
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p2, Ljava/util/HashMap;
|
|
|
|
iget-object p3, p0, Lcom/discord/stores/StoreExperiments;->experimentsTriggered:Ljava/util/HashMap;
|
|
|
|
invoke-direct {p2, p3}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
const-string p3, "TRIGGERED_EXPERIMENTS_V3"
|
|
|
|
invoke-direct {p1, p3, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExperiments;->experimentsTriggeredCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p1, Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance p2, Ljava/util/HashMap;
|
|
|
|
iget-object p3, p0, Lcom/discord/stores/StoreExperiments;->experimentOverrides:Ljava/util/HashMap;
|
|
|
|
invoke-direct {p2, p3}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
const-string p3, "CACHE_KEY_EXPERIMENT_OVERRIDES"
|
|
|
|
invoke-direct {p1, p3, p2}, Lcom/discord/utilities/persister/Persister;-><init>(Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExperiments;->experimentOverridesCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "storeAuthentication"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "storeGuilds"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "storeUser"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
const-string p1, "dispatcher"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_4
|
|
const-string p1, "clock"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getAndTriggerExperiment(Lcom/discord/stores/StoreExperiments;Ljava/util/Map;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreExperiments;->getAndTriggerExperiment(Ljava/util/Map;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getDispatcher$p(Lcom/discord/stores/StoreExperiments;)Lcom/discord/stores/Dispatcher;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreExperiments;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getExperimentOverrides$p(Lcom/discord/stores/StoreExperiments;)Ljava/util/HashMap;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreExperiments;->experimentOverrides:Ljava/util/HashMap;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getExperimentsEligible$p(Lcom/discord/stores/StoreExperiments;)Ljava/util/HashMap;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligible:Ljava/util/HashMap;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getInitialized$p(Lcom/discord/stores/StoreExperiments;)Z
|
|
.locals 0
|
|
|
|
iget-boolean p0, p0, Lcom/discord/stores/StoreExperiments;->initialized:Z
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getStoreAuthentication$p(Lcom/discord/stores/StoreExperiments;)Lcom/discord/stores/StoreAuthentication;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreExperiments;->storeAuthentication:Lcom/discord/stores/StoreAuthentication;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleLoadedExperiments(Lcom/discord/stores/StoreExperiments;Lcom/discord/models/domain/ModelExperiment$Experiments;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreExperiments;->handleLoadedExperiments(Lcom/discord/models/domain/ModelExperiment$Experiments;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$isDirty$p(Lcom/discord/stores/StoreExperiments;)Z
|
|
.locals 0
|
|
|
|
iget-boolean p0, p0, Lcom/discord/stores/StoreExperiments;->isDirty:Z
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$setDirty$p(Lcom/discord/stores/StoreExperiments;Z)V
|
|
.locals 0
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreExperiments;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$setInitialized$p(Lcom/discord/stores/StoreExperiments;Z)V
|
|
.locals 0
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreExperiments;->initialized:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$triggerExperiment(Lcom/discord/stores/StoreExperiments;Ljava/lang/String;Lcom/discord/models/domain/ModelExperiment;Lcom/discord/models/domain/ModelExperiment$Context;J)V
|
|
.locals 0
|
|
|
|
invoke-direct/range {p0 .. p5}, Lcom/discord/stores/StoreExperiments;->triggerExperiment(Ljava/lang/String;Lcom/discord/models/domain/ModelExperiment;Lcom/discord/models/domain/ModelExperiment$Context;J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$updateExperimentName(Lcom/discord/stores/StoreExperiments;JLjava/lang/String;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreExperiments;->updateExperimentName(JLjava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getAndTriggerExperiment(Ljava/util/Map;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
.locals 14
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreExperiments$Experiment;",
|
|
">;",
|
|
"Ljava/lang/String;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/discord/models/domain/ModelExperiment;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelExperiment$Context;",
|
|
">;)",
|
|
"Lcom/discord/stores/StoreExperiments$Experiment;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object v7, p0
|
|
|
|
invoke-direct/range {p0 .. p2}, Lcom/discord/stores/StoreExperiments;->getExperimentByName(Ljava/util/Map;Ljava/lang/String;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance v0, Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x4
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const-string v2, ""
|
|
|
|
move-object v1, v0
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/discord/stores/StoreExperiments$Experiment;-><init>(Ljava/lang/String;Lcom/discord/models/domain/ModelExperiment;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
:goto_0
|
|
move-object v8, v0
|
|
|
|
invoke-virtual {v8}, Lcom/discord/stores/StoreExperiments$Experiment;->getRawExperiment()Lcom/discord/models/domain/ModelExperiment;
|
|
|
|
move-result-object v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
move-object/from16 v0, p3
|
|
|
|
invoke-interface {v0, v3}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v4, v0
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelExperiment$Context;
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelExperiment$Context;->shouldTrigger()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, v7, Lcom/discord/stores/StoreExperiments;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
invoke-interface {v0}, Lcom/discord/utilities/time/Clock;->currentTimeMillis()J
|
|
|
|
move-result-wide v5
|
|
|
|
iget-object v9, v7, Lcom/discord/stores/StoreExperiments;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v10, Lcom/discord/stores/StoreExperiments$getAndTriggerExperiment$1;
|
|
|
|
move-object v0, v10
|
|
|
|
move-object v1, p0
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
invoke-direct/range {v0 .. v6}, Lcom/discord/stores/StoreExperiments$getAndTriggerExperiment$1;-><init>(Lcom/discord/stores/StoreExperiments;Ljava/lang/String;Lcom/discord/models/domain/ModelExperiment;Lcom/discord/models/domain/ModelExperiment$Context;J)V
|
|
|
|
invoke-virtual {v9, v10}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x5
|
|
|
|
const/4 v13, 0x0
|
|
|
|
invoke-static/range {v8 .. v13}, Lcom/discord/stores/StoreExperiments$Experiment;->copy$default(Lcom/discord/stores/StoreExperiments$Experiment;Ljava/lang/String;Lcom/discord/models/domain/ModelExperiment;Ljava/lang/Integer;ILjava/lang/Object;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
move-result-object v8
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return-object v8
|
|
.end method
|
|
|
|
.method public static synthetic getAndTriggerExperiment$default(Lcom/discord/stores/StoreExperiments;Ljava/util/Map;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
.locals 0
|
|
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
sget-object p3, Lcom/discord/stores/StoreExperiments;->DEFAULT_CONTEXT_CALLBACK:Lkotlin/jvm/functions/Function1;
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreExperiments;->getAndTriggerExperiment(Ljava/util/Map;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static synthetic getExperiment$default(Lcom/discord/stores/StoreExperiments;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lrx/Observable;
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
sget-object p2, Lcom/discord/stores/StoreExperiments;->DEFAULT_CONTEXT_CALLBACK:Lkotlin/jvm/functions/Function1;
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/stores/StoreExperiments;->getExperiment(Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final getExperimentByName(Ljava/util/Map;Ljava/lang/String;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreExperiments$Experiment;",
|
|
">;",
|
|
"Ljava/lang/String;",
|
|
")",
|
|
"Lcom/discord/stores/StoreExperiments$Experiment;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-static {p2}, Lcom/discord/models/domain/ModelExperiment;->createExperimentHash(Ljava/lang/CharSequence;)J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreExperiments;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v3, Lcom/discord/stores/StoreExperiments$getExperimentByName$1;
|
|
|
|
invoke-direct {v3, p0, v0, v1, p2}, Lcom/discord/stores/StoreExperiments$getExperimentByName$1;-><init>(Lcom/discord/stores/StoreExperiments;JLjava/lang/String;)V
|
|
|
|
invoke-virtual {v2, v3}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {p1, p2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static synthetic getExperimentSnapshot$app_productionDiscordExternalRelease$default(Lcom/discord/stores/StoreExperiments;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
.locals 0
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
sget-object p2, Lcom/discord/stores/StoreExperiments;->DEFAULT_CONTEXT_CALLBACK:Lkotlin/jvm/functions/Function1;
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/stores/StoreExperiments;->getExperimentSnapshot$app_productionDiscordExternalRelease(Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final handleExperimentReset()V
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->authToken:Ljava/lang/String;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentsTriggered:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v0}, Ljava/util/HashMap;->clear()V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligible:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v0}, Ljava/util/HashMap;->clear()V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentOverrides:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v0}, Ljava/util/HashMap;->clear()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreExperiments;->initialized:Z
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreExperiments;->isDirty:Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleLoadedExperiments(Lcom/discord/models/domain/ModelExperiment$Experiments;)V
|
|
.locals 10
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligible:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v0}, Ljava/util/HashMap;->clear()V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligible:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelExperiment$Experiments;->getExperiments()Ljava/util/Map;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "experiments.experiments"
|
|
|
|
invoke-static {p1, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v1, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->size()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v2}, Lf/n/a/k/a;->mapCapacity(I)I
|
|
|
|
move-result v2
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/LinkedHashMap;-><init>(I)V
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/util/Map$Entry;
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v6, v2
|
|
|
|
check-cast v6, Lcom/discord/models/domain/ModelExperiment;
|
|
|
|
new-instance v2, Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x4
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const-string v5, ""
|
|
|
|
move-object v4, v2
|
|
|
|
invoke-direct/range {v4 .. v9}, Lcom/discord/stores/StoreExperiments$Experiment;-><init>(Ljava/lang/String;Lcom/discord/models/domain/ModelExperiment;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
invoke-interface {v1, v3, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v0, v1}, Ljava/util/HashMap;->putAll(Ljava/util/Map;)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreExperiments;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic isExperimentalAlpha$annotations()V
|
|
.locals 0
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final triggerExperiment(Ljava/lang/String;Lcom/discord/models/domain/ModelExperiment;Lcom/discord/models/domain/ModelExperiment$Context;J)V
|
|
.locals 6
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
invoke-virtual {p2, p3}, Lcom/discord/models/domain/ModelExperiment;->getTriggerKey(Lcom/discord/models/domain/ModelExperiment$Context;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreExperiments;->experimentsTriggered:Ljava/util/HashMap;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/stores/StoreExperiments$Triggered;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {v1, p4, p5}, Lcom/discord/stores/StoreExperiments$Triggered;->isStale(J)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
:cond_0
|
|
invoke-virtual {p2, p3}, Lcom/discord/models/domain/ModelExperiment;->getExperimentHash(Lcom/discord/models/domain/ModelExperiment$Context;)J
|
|
|
|
move-result-wide v2
|
|
|
|
const/4 p3, 0x1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreExperiments$Triggered;->getExperimentHash()J
|
|
|
|
move-result-wide v4
|
|
|
|
cmp-long v1, v4, v2
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-nez v1, :cond_2
|
|
|
|
invoke-static {p2, p1}, Lcom/discord/utilities/analytics/AnalyticsTracker;->experimentTriggered(Lcom/discord/models/domain/ModelExperiment;Ljava/lang/String;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/stores/StoreExperiments;->experimentsTriggered:Ljava/util/HashMap;
|
|
|
|
const-string p2, "experimentTriggeredKey"
|
|
|
|
invoke-static {v0, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance p2, Lcom/discord/stores/StoreExperiments$Triggered;
|
|
|
|
invoke-direct {p2, p4, p5, v2, v3}, Lcom/discord/stores/StoreExperiments$Triggered;-><init>(JJ)V
|
|
|
|
invoke-interface {p1, v0, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iput-boolean p3, p0, Lcom/discord/stores/StoreExperiments;->isDirty:Z
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method private final tryInitializeExperiments()V
|
|
.locals 14
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreExperiments;->initialized:Z
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->authToken:Ljava/lang/String;
|
|
|
|
const-string v1, "UNINITIALIZED"
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->fingerprint:Ljava/lang/String;
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreExperiments;->initialized:Z
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreExperiments$tryInitializeExperiments$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/stores/StoreExperiments$tryInitializeExperiments$1;-><init>(Lcom/discord/stores/StoreExperiments;)V
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreExperiments;->authToken:Ljava/lang/String;
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreExperiments$tryInitializeExperiments$1;->invoke()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
sget-object v2, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/rest/RestAPI;->getExperiments()Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v2, v3, v0, v4}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-wide/16 v2, 0x7d0
|
|
|
|
sget-object v4, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {v0, v2, v3, v4}, Lrx/Observable;->Y(JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
|
|
|
move-result-object v5
|
|
|
|
const-string v0, "RestAPI\n .api\n \u20260, TimeUnit.MILLISECONDS)"
|
|
|
|
invoke-static {v5, v0}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-class v6, Lcom/discord/stores/StoreExperiments;
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
new-instance v11, Lcom/discord/stores/StoreExperiments$tryInitializeExperiments$2;
|
|
|
|
invoke-direct {v11, p0, v1}, Lcom/discord/stores/StoreExperiments$tryInitializeExperiments$2;-><init>(Lcom/discord/stores/StoreExperiments;Lcom/discord/stores/StoreExperiments$tryInitializeExperiments$1;)V
|
|
|
|
const/4 v10, 0x0
|
|
|
|
new-instance v9, Lcom/discord/stores/StoreExperiments$tryInitializeExperiments$3;
|
|
|
|
invoke-direct {v9, p0, v1}, Lcom/discord/stores/StoreExperiments$tryInitializeExperiments$3;-><init>(Lcom/discord/stores/StoreExperiments;Lcom/discord/stores/StoreExperiments$tryInitializeExperiments$1;)V
|
|
|
|
const/16 v12, 0x16
|
|
|
|
const/4 v13, 0x0
|
|
|
|
invoke-static/range {v5 .. v13}, 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
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final updateExperimentName(JLjava/lang/String;)V
|
|
.locals 8
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligible:Ljava/util/HashMap;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentOverrides:Ljava/util/HashMap;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Ljava/util/HashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v4, v0
|
|
|
|
check-cast v4, Ljava/lang/Integer;
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligible:Ljava/util/HashMap;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {p2, p3, v2, v4}, Lcom/discord/stores/StoreExperiments$Experiment;-><init>(Ljava/lang/String;Lcom/discord/models/domain/ModelExperiment;Ljava/lang/Integer;)V
|
|
|
|
invoke-interface {v1, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreExperiments;->isDirty:Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreExperiments$Experiment;->getDisplayName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v2, p3}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
xor-int/2addr v2, v0
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
iget-object v7, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligible:Ljava/util/HashMap;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v5, 0x2
|
|
|
|
const/4 v6, 0x0
|
|
|
|
move-object v2, p3
|
|
|
|
invoke-static/range {v1 .. v6}, Lcom/discord/stores/StoreExperiments$Experiment;->copy$default(Lcom/discord/stores/StoreExperiments$Experiment;Ljava/lang/String;Lcom/discord/models/domain/ModelExperiment;Ljava/lang/Integer;ILjava/lang/Object;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {v7, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreExperiments;->isDirty:Z
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getExperiment(Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/discord/models/domain/ModelExperiment;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelExperiment$Context;",
|
|
">;)",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/stores/StoreExperiments$Experiment;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligibleSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreExperiments$getExperiment$1;
|
|
|
|
invoke-direct {v1, p0, p1, p2}, Lcom/discord/stores/StoreExperiments$getExperiment$1;-><init>(Lcom/discord/stores/StoreExperiments;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->E(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Lcom/discord/stores/StoreExperiments$getExperiment$2;->INSTANCE:Lcom/discord/stores/StoreExperiments$getExperiment$2;
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->r(Lrx/functions/Func2;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "experimentsEligibleSubje\u2026.overrideBucket\n }"
|
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string p1, "contextCallback"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "name"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final getExperimentSnapshot$app_productionDiscordExternalRelease(Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Lcom/discord/models/domain/ModelExperiment;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelExperiment$Context;",
|
|
">;)",
|
|
"Lcom/discord/stores/StoreExperiments$Experiment;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligible:Ljava/util/HashMap;
|
|
|
|
invoke-direct {p0, v0, p1, p2}, Lcom/discord/stores/StoreExperiments;->getAndTriggerExperiment(Ljava/util/Map;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/discord/stores/StoreExperiments$Experiment;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string p1, "contextCallback"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "name"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final getExperimentalAlpha()Lrx/Observable;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->storeUser:Lcom/discord/stores/StoreUser;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUser;->observeMe()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreExperiments;->storeGuilds:Lcom/discord/stores/StoreGuilds;
|
|
|
|
const-wide v2, 0x2bc056ab0800006L
|
|
|
|
invoke-virtual {v1, v2, v3}, Lcom/discord/stores/StoreGuilds;->observeGuild(J)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/discord/stores/StoreExperiments$getExperimentalAlpha$1;->INSTANCE:Lcom/discord/stores/StoreExperiments$getExperimentalAlpha$1;
|
|
|
|
invoke-static {v0, v1, v2}, Lrx/Observable;->j(Lrx/Observable;Lrx/Observable;Lrx/functions/Func2;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Observable.combineLatest\u2026estersGuild != null\n }"
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getNameToExperimentMap$app_productionDiscordExternalRelease()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Lcom/discord/stores/StoreExperiments$Experiment;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligibleSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
sget-object v1, Lcom/discord/stores/StoreExperiments$getNameToExperimentMap$1;->INSTANCE:Lcom/discord/stores/StoreExperiments$getNameToExperimentMap$1;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->E(Lr0/k/b;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "experimentsEligibleSubje\u2026 .toMap()\n }"
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final handleAuthToken(Ljava/lang/String;)V
|
|
.locals 0
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExperiments;->authToken:Ljava/lang/String;
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreExperiments;->handleExperimentReset()V
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreExperiments;->tryInitializeExperiments()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getExperiments()Lcom/discord/models/domain/ModelExperiment$Experiments;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "payload.experiments"
|
|
|
|
invoke-static {p1, v0}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreExperiments;->handleLoadedExperiments(Lcom/discord/models/domain/ModelExperiment$Experiments;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "payload"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final handleFingerprint(Ljava/lang/String;)V
|
|
.locals 0
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreExperiments;->fingerprint:Ljava/lang/String;
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreExperiments;->tryInitializeExperiments()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final init()V
|
|
.locals 2
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentsTriggered:Ljava/util/HashMap;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreExperiments;->experimentsTriggeredCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/Map;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashMap;->putAll(Ljava/util/Map;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentOverrides:Ljava/util/HashMap;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreExperiments;->experimentOverridesCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/util/Map;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/HashMap;->putAll(Ljava/util/Map;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreExperiments;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final isExperimentalAlpha$app_productionDiscordExternalRelease()Z
|
|
.locals 4
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreExperiments;->initialized:Z
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->storeUser:Lcom/discord/stores/StoreUser;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUser;->getMeInternal$app_productionDiscordExternalRelease()Lcom/discord/models/domain/ModelUser$Me;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->isStaff()Z
|
|
|
|
move-result v0
|
|
|
|
if-eq v0, v1, :cond_2
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->storeGuilds:Lcom/discord/stores/StoreGuilds;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreGuilds;->getGuildsInternal$app_productionDiscordExternalRelease()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
const-wide v2, 0x2bc056ab0800006L
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v0, v2}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v1, 0x0
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return v1
|
|
.end method
|
|
|
|
.method public final isInitialized()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Ljava/lang/Boolean;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->initializedSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public onDispatchEnded()V
|
|
.locals 6
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreExperiments;->isDirty:Z
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->initializedSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
iget-boolean v1, p0, Lcom/discord/stores/StoreExperiments;->initialized:Z
|
|
|
|
invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v0, v0, Lrx/subjects/SerializedSubject;->e:Lr0/n/c;
|
|
|
|
invoke-virtual {v0, v1}, Lr0/n/c;->onNext(Ljava/lang/Object;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentsTriggeredCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreExperiments;->experimentsTriggered:Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x2
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v0, v1, v2, v3, v4}, Lcom/discord/utilities/persister/Persister;->set$default(Lcom/discord/utilities/persister/Persister;Ljava/lang/Object;ZILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentOverridesCache:Lcom/discord/utilities/persister/Persister;
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
iget-object v5, p0, Lcom/discord/stores/StoreExperiments;->experimentOverrides:Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1, v5}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
invoke-static {v0, v1, v2, v3, v4}, Lcom/discord/utilities/persister/Persister;->set$default(Lcom/discord/utilities/persister/Persister;Ljava/lang/Object;ZILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligibleSubject:Lrx/subjects/SerializedSubject;
|
|
|
|
new-instance v1, Ljava/util/HashMap;
|
|
|
|
iget-object v3, p0, Lcom/discord/stores/StoreExperiments;->experimentsEligible:Ljava/util/HashMap;
|
|
|
|
invoke-direct {v1, v3}, Ljava/util/HashMap;-><init>(Ljava/util/Map;)V
|
|
|
|
iget-object v0, v0, Lrx/subjects/SerializedSubject;->e:Lr0/n/c;
|
|
|
|
invoke-virtual {v0, v1}, Lr0/n/c;->onNext(Ljava/lang/Object;)V
|
|
|
|
iput-boolean v2, p0, Lcom/discord/stores/StoreExperiments;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setExperimentOverride(Ljava/lang/String;Ljava/lang/Integer;)V
|
|
.locals 2
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreExperiments;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreExperiments$setExperimentOverride$1;
|
|
|
|
invoke-direct {v1, p0, p1, p2}, Lcom/discord/stores/StoreExperiments$setExperimentOverride$1;-><init>(Lcom/discord/stores/StoreExperiments;Ljava/lang/String;Ljava/lang/Integer;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "name"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|