diff --git a/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaKenyaModule.kt b/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaKenyaModule.kt index 68910e6ee08..9213fcc5a7f 100644 --- a/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaKenyaModule.kt +++ b/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaKenyaModule.kt @@ -17,6 +17,7 @@ import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAU import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY_DEFAULT_VALUE +import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2 import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE @@ -326,9 +327,12 @@ class PlatformParameterAlphaKenyaModule { @Provides @EnableOnboardingFlowV2 - fun provideEnableNewOnboardingUi(): PlatformParameterValue { - return PlatformParameterValue.createDefaultParameter( - ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE - ) + fun provideEnableOnboardingFlowV2( + platformParameterSingleton: PlatformParameterSingleton + ): PlatformParameterValue { + return platformParameterSingleton.getBooleanPlatformParameter(ENABLE_ONBOARDING_FLOW_V2) + ?: PlatformParameterValue.createDefaultParameter( + ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE + ) } } diff --git a/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaModule.kt b/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaModule.kt index fe41b3d2f98..e453cf5d94e 100644 --- a/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaModule.kt +++ b/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterAlphaModule.kt @@ -17,6 +17,7 @@ import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAU import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY_DEFAULT_VALUE +import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2 import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE @@ -321,9 +322,12 @@ class PlatformParameterAlphaModule { @Provides @EnableOnboardingFlowV2 - fun provideEnableNewOnboardingUi(): PlatformParameterValue { - return PlatformParameterValue.createDefaultParameter( - ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE - ) + fun provideEnableOnboardingFlowV2( + platformParameterSingleton: PlatformParameterSingleton + ): PlatformParameterValue { + return platformParameterSingleton.getBooleanPlatformParameter(ENABLE_ONBOARDING_FLOW_V2) + ?: PlatformParameterValue.createDefaultParameter( + ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE + ) } } diff --git a/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterModule.kt b/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterModule.kt index ff967a1a869..6bf45843564 100644 --- a/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterModule.kt +++ b/domain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterModule.kt @@ -17,6 +17,7 @@ import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAU import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY import org.oppia.android.util.platformparameter.ENABLE_NPS_SURVEY_DEFAULT_VALUE +import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2 import org.oppia.android.util.platformparameter.ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE @@ -323,9 +324,12 @@ class PlatformParameterModule { @Provides @EnableOnboardingFlowV2 - fun provideEnableNewOnboardingUi(): PlatformParameterValue { - return PlatformParameterValue.createDefaultParameter( - ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE - ) + fun provideEnableOnboardingFlowV2( + platformParameterSingleton: PlatformParameterSingleton + ): PlatformParameterValue { + return platformParameterSingleton.getBooleanPlatformParameter(ENABLE_ONBOARDING_FLOW_V2) + ?: PlatformParameterValue.createDefaultParameter( + ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE + ) } } diff --git a/testing/src/main/java/org/oppia/android/testing/platformparameter/TestPlatformParameterModule.kt b/testing/src/main/java/org/oppia/android/testing/platformparameter/TestPlatformParameterModule.kt index 237b15d82d5..604eaf727e4 100644 --- a/testing/src/main/java/org/oppia/android/testing/platformparameter/TestPlatformParameterModule.kt +++ b/testing/src/main/java/org/oppia/android/testing/platformparameter/TestPlatformParameterModule.kt @@ -275,7 +275,7 @@ class TestPlatformParameterModule { @Provides @EnableOnboardingFlowV2 - fun provideEnableNewOnboardingUi(): PlatformParameterValue { + fun provideEnableOnboardingFlowV2(): PlatformParameterValue { return PlatformParameterValue.createDefaultParameter(enableOnboardingFlowV2) } diff --git a/utility/src/main/java/org/oppia/android/util/platformparameter/FeatureFlagConstants.kt b/utility/src/main/java/org/oppia/android/util/platformparameter/FeatureFlagConstants.kt index e69e34696dd..ba9dafdb620 100644 --- a/utility/src/main/java/org/oppia/android/util/platformparameter/FeatureFlagConstants.kt +++ b/utility/src/main/java/org/oppia/android/util/platformparameter/FeatureFlagConstants.kt @@ -166,3 +166,13 @@ const val ENABLE_NPS_SURVEY = "enable_nps_survey" /** Default value of the feature flag corresponding to [EnableNpsSurvey]. */ const val ENABLE_NPS_SURVEY_DEFAULT_VALUE = false + +/** Qualifier for the feature flag that toggles the new onboarding flow. */ +@Qualifier +annotation class EnableOnboardingFlowV2 + +/** Name of the feature flag that toggles the new onboarding flow. */ +const val ENABLE_ONBOARDING_FLOW_V2 = "enable_onboarding_flow_v2" + +/** Default value of the feature flag corresponding to [EnableOnboardingFlowV2]. */ +const val ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE = false diff --git a/utility/src/main/java/org/oppia/android/util/platformparameter/PlatformParameterConstants.kt b/utility/src/main/java/org/oppia/android/util/platformparameter/PlatformParameterConstants.kt index 2d483dd571e..4648120ab79 100644 --- a/utility/src/main/java/org/oppia/android/util/platformparameter/PlatformParameterConstants.kt +++ b/utility/src/main/java/org/oppia/android/util/platformparameter/PlatformParameterConstants.kt @@ -224,13 +224,3 @@ const val NPS_SURVEY_MINIMUM_AGGREGATE_LEARNING_TIME_IN_A_TOPIC_IN_MINUTES = * experience with the app. */ const val NPS_SURVEY_MINIMUM_AGGREGATE_LEARNING_TIME_IN_A_TOPIC_IN_MINUTES_DEFAULT_VALUE = 5 - -/** Qualifier for the platform parameter that toggles the new onboarding flow. */ -@Qualifier -annotation class EnableOnboardingFlowV2 - -/** Name of the platform parameter that toggles the new onboarding flow. */ -const val ENABLE_ONBOARDING_FLOW_V2 = "enable_onboarding_flow_v2" - -/** Default value of the platform parameter corresponding to [EnableOnboardingFlowV2]. */ -const val ENABLE_ONBOARDING_FLOW_V2_DEFAULT_VALUE = false