168 lines
5.3 KiB
Smali
168 lines
5.3 KiB
Smali
.class public final Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetHome.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/home/WidgetHome;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "BackBehaviorFeatureFlag"
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final INSTANCE:Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;
|
|
|
|
.field public static isEnabled:Z
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
new-instance v0, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;
|
|
|
|
invoke-direct {v0}, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;-><init>()V
|
|
|
|
sput-object v0, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;->INSTANCE:Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;
|
|
|
|
sget-object v0, Lcom/discord/utilities/cache/SharedPreferencesProvider;->INSTANCE:Lcom/discord/utilities/cache/SharedPreferencesProvider;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/cache/SharedPreferencesProvider;->get()Landroid/content/SharedPreferences;
|
|
|
|
move-result-object v0
|
|
|
|
sget-boolean v1, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;->isEnabled:Z
|
|
|
|
const-string v2, "CACHE_KEY_BACK_BEHAVIOR_EXPERIMENT_BUCKET"
|
|
|
|
invoke-interface {v0, v2, v1}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
|
|
|
move-result v0
|
|
|
|
sput-boolean v0, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;->isEnabled:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleExperiment(Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;Lcom/discord/models/experiments/domain/Experiment;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;->handleExperiment(Lcom/discord/models/experiments/domain/Experiment;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleExperiment(Lcom/discord/models/experiments/domain/Experiment;)V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/experiments/domain/Experiment;->getBucket()I
|
|
|
|
move-result p1
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
sget-boolean p1, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;->isEnabled:Z
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
sget-object p1, Lcom/discord/utilities/cache/SharedPreferencesProvider;->INSTANCE:Lcom/discord/utilities/cache/SharedPreferencesProvider;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/cache/SharedPreferencesProvider;->get()Landroid/content/SharedPreferences;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag$handleExperiment$1;
|
|
|
|
invoke-direct {v1, v0}, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag$handleExperiment$1;-><init>(Z)V
|
|
|
|
invoke-static {p1, v1}, Lcom/discord/utilities/cache/SharedPreferenceExtensionsKt;->edit(Landroid/content/SharedPreferences;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final isEnabled()Z
|
|
.locals 1
|
|
|
|
sget-boolean v0, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;->isEnabled:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final observeExperiment(Lcom/discord/app/AppFragment;)V
|
|
.locals 12
|
|
|
|
const-string v0, "fragment"
|
|
|
|
invoke-static {p1, v0}, Lb0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getExperiments()Lcom/discord/stores/StoreExperiments;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "2020-06_android_back_button_behavior_v01"
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/stores/StoreExperiments;->observeUserExperiment(Ljava/lang/String;Z)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x2
|
|
|
|
invoke-static {v0, p1, v1, v2, v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
move-result-object v3
|
|
|
|
const-class v4, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;
|
|
|
|
new-instance v9, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag$observeExperiment$1;
|
|
|
|
invoke-direct {v9, p0}, Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag$observeExperiment$1;-><init>(Lcom/discord/widgets/home/WidgetHome$BackBehaviorFeatureFlag;)V
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/16 v10, 0x1e
|
|
|
|
const/4 v11, 0x0
|
|
|
|
invoke-static/range {v3 .. v11}, 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
|