Skip to content

Commit

Permalink
Technical Analytics: Milestone 1 - Add Feature Flag Statuses and Abil…
Browse files Browse the repository at this point in the history
…ity To Sync Them to Cache Store (#5203)

<!-- READ ME FIRST: Please fill in the explanation section below and
check off every point from the Essential Checklist! -->
## Explanation
<!--
- Explain what your PR does. If this PR fixes an existing bug, please
include
- "Fixes #bugnum:" in the explanation so that GitHub can auto-close the
issue
  - when this PR is merged.
  -->
When merged, this PR will:
- Create a new `FeatureFlagConstants.kt` file to contain all feature
flags.
- Create feature flag sync status trackers for each existing feature
flag.
- Modify the `PlatformParameterSyncUpWorker` to allow status trackers of
all feature flags to be synced and cached in the PersistentCacheStore.
- Merge the `TestBooleanPlatformParameter`,
`TestStringPlatformParameter` and the `TestIntegerPlatformParameter`
files into the `TestPlatformParameterConstants` file.
- Add syncing with the web for the `EnableDownloadsSupport`,
`EnableEditAccountsOptionsUi`, `EnableSpotlightUi`,
`EnableExtraTopicTabsUi`, `EnableInteractionConfigChangeStateRetention`,
and `EnableAppAndOsDeprecation` feature flags.
- Write tests for the changes made.

## Essential Checklist
<!-- Please tick the relevant boxes by putting an "x" in them. -->
- [x] The PR title and explanation each start with "Fix #bugnum: " (If
this PR fixes part of an issue, prefix the title with "Fix part of
#bugnum: ...".)
- [x] Any changes to
[scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets)
files have their rationale included in the PR explanation.
- [x] The PR follows the [style
guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide).
- [x] The PR does not contain any unnecessary code changes from Android
Studio
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)).
- [x] The PR is made from a branch that's **not** called "develop" and
is up-to-date with "develop".
- [x] The PR is **assigned** to the appropriate reviewers
([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)).

## For UI-specific PRs only
<!-- Delete these section if this PR does not include UI-related
changes. -->
If your PR includes UI-related changes, then:
- Add screenshots for portrait/landscape for both a tablet & phone of
the before & after UI changes
- For the screenshots above, include both English and pseudo-localized
(RTL) screenshots (see [RTL
guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines))
- Add a video showing the full UX flow with a screen reader enabled (see
[accessibility
guide](https://github.com/oppia/oppia-android/wiki/Accessibility-A11y-Guide))
- For PRs introducing new UI elements or color changes, both light and
dark mode screenshots must be included
- Add a screenshot demonstrating that you ran affected Espresso tests
locally & that they're passing

---------

Co-authored-by: Adhiambo Peres <[email protected]>
Co-authored-by: Ben Henning <[email protected]>
  • Loading branch information
3 people authored Nov 29, 2023
1 parent 1181ca2 commit 87a7676
Show file tree
Hide file tree
Showing 20 changed files with 486 additions and 272 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import android.content.Context
import dagger.Module
import dagger.Provides
import org.oppia.android.app.utility.getVersionCode
import org.oppia.android.util.platformparameter.APP_AND_OS_DEPRECATION
import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING
import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.CacheLatexRendering
import org.oppia.android.util.platformparameter.DOWNLOADS_SUPPORT
import org.oppia.android.util.platformparameter.EDIT_ACCOUNTS_OPTIONS_UI
import org.oppia.android.util.platformparameter.ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE
Expand All @@ -16,6 +19,7 @@ import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEF
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.EXTRA_TOPIC_TABS_UI
import org.oppia.android.util.platformparameter.EnableAppAndOsDeprecation
import org.oppia.android.util.platformparameter.EnableDownloadsSupport
import org.oppia.android.util.platformparameter.EnableEditAccountsOptionsUi
Expand All @@ -30,6 +34,7 @@ import org.oppia.android.util.platformparameter.EnableSpotlightUi
import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON
import org.oppia.android.util.platformparameter.FORCED_APP_UPDATE_VERSION_CODE
import org.oppia.android.util.platformparameter.ForcedAppUpdateVersionCode
import org.oppia.android.util.platformparameter.INTERACTION_CONFIG_CHANGE_STATE_RETENTION
import org.oppia.android.util.platformparameter.LEARNER_STUDY_ANALYTICS
import org.oppia.android.util.platformparameter.LOGGING_LEARNER_STUDY_IDS
import org.oppia.android.util.platformparameter.LOWEST_SUPPORTED_API_LEVEL
Expand All @@ -56,6 +61,7 @@ import org.oppia.android.util.platformparameter.PlatformParameterSingleton
import org.oppia.android.util.platformparameter.PlatformParameterValue
import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG
import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.SPOTLIGHT_UI
import org.oppia.android.util.platformparameter.SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS
import org.oppia.android.util.platformparameter.SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.SplashScreenWelcomeMsg
Expand All @@ -70,8 +76,12 @@ import org.oppia.android.util.platformparameter.SyncUpWorkerTimePeriodHours
class PlatformParameterAlphaKenyaModule {
@Provides
@EnableDownloadsSupport
fun provideEnableDownloadsSupport(): PlatformParameterValue<Boolean> =
PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)
fun provideEnableDownloadsSupport(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(DOWNLOADS_SUPPORT)
?: PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)
}

@Provides
@SplashScreenWelcomeMsg
Expand Down Expand Up @@ -104,8 +114,12 @@ class PlatformParameterAlphaKenyaModule {

@Provides
@EnableEditAccountsOptionsUi
fun provideEnableEditAccountsOptionsUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableEditAccountsOptionsUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
EDIT_ACCOUNTS_OPTIONS_UI
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE
)
}
Expand Down Expand Up @@ -199,32 +213,45 @@ class PlatformParameterAlphaKenyaModule {

@Provides
@EnableExtraTopicTabsUi
fun provideEnableExtraTopicTabsUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableExtraTopicTabsUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
EXTRA_TOPIC_TABS_UI
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE
)
}

@Provides
@EnableInteractionConfigChangeStateRetention
fun provideEnableInteractionConfigChangeStateRetention(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableInteractionConfigChangeStateRetention(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
INTERACTION_CONFIG_CHANGE_STATE_RETENTION
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE
)
}

@Provides
@EnableSpotlightUi
fun enableSpotlightUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE
)
fun provideEnableSpotlightUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(SPOTLIGHT_UI)
?: PlatformParameterValue.createDefaultParameter(ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE)
}

@Provides
@EnableAppAndOsDeprecation
fun provideEnableAppAndOsDeprecation(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableAppAndOsDeprecation(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
APP_AND_OS_DEPRECATION
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import android.content.Context
import dagger.Module
import dagger.Provides
import org.oppia.android.app.utility.getVersionCode
import org.oppia.android.util.platformparameter.APP_AND_OS_DEPRECATION
import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING
import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.CacheLatexRendering
import org.oppia.android.util.platformparameter.DOWNLOADS_SUPPORT
import org.oppia.android.util.platformparameter.EDIT_ACCOUNTS_OPTIONS_UI
import org.oppia.android.util.platformparameter.ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE
Expand All @@ -15,6 +18,7 @@ import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE
import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.EXTRA_TOPIC_TABS_UI
import org.oppia.android.util.platformparameter.EnableAppAndOsDeprecation
import org.oppia.android.util.platformparameter.EnableDownloadsSupport
import org.oppia.android.util.platformparameter.EnableEditAccountsOptionsUi
Expand All @@ -30,6 +34,7 @@ import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSO
import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FORCED_APP_UPDATE_VERSION_CODE
import org.oppia.android.util.platformparameter.ForcedAppUpdateVersionCode
import org.oppia.android.util.platformparameter.INTERACTION_CONFIG_CHANGE_STATE_RETENTION
import org.oppia.android.util.platformparameter.LEARNER_STUDY_ANALYTICS
import org.oppia.android.util.platformparameter.LOGGING_LEARNER_STUDY_IDS
import org.oppia.android.util.platformparameter.LOGGING_LEARNER_STUDY_IDS_DEFAULT_VALUE
Expand Down Expand Up @@ -57,6 +62,7 @@ import org.oppia.android.util.platformparameter.PlatformParameterSingleton
import org.oppia.android.util.platformparameter.PlatformParameterValue
import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG
import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.SPOTLIGHT_UI
import org.oppia.android.util.platformparameter.SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS
import org.oppia.android.util.platformparameter.SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.SplashScreenWelcomeMsg
Expand All @@ -67,8 +73,12 @@ import org.oppia.android.util.platformparameter.SyncUpWorkerTimePeriodHours
class PlatformParameterAlphaModule {
@Provides
@EnableDownloadsSupport
fun provideEnableDownloadsSupport(): PlatformParameterValue<Boolean> =
PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)
fun provideEnableDownloadsSupport(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(DOWNLOADS_SUPPORT)
?: PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)
}

@Provides
@SplashScreenWelcomeMsg
Expand Down Expand Up @@ -101,8 +111,12 @@ class PlatformParameterAlphaModule {

@Provides
@EnableEditAccountsOptionsUi
fun provideEnableEditAccountsOptionsUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableEditAccountsOptionsUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
EDIT_ACCOUNTS_OPTIONS_UI
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE
)
}
Expand Down Expand Up @@ -195,31 +209,46 @@ class PlatformParameterAlphaModule {

@Provides
@EnableSpotlightUi
fun provideEnableSpotlightUi(): PlatformParameterValue<Boolean> =
PlatformParameterValue.createDefaultParameter(true) // Enable spotlights for alpha users.
fun provideEnableSpotlightUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(SPOTLIGHT_UI)
?: PlatformParameterValue.createDefaultParameter(true) // Enable spotlights for alpha users.
}

@Provides
@EnableExtraTopicTabsUi
fun provideEnableExtraTopicTabsUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableExtraTopicTabsUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
EXTRA_TOPIC_TABS_UI
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE
)
}

@Provides
@EnableInteractionConfigChangeStateRetention
fun provideEnableInteractionConfigChangeStateRetention(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableInteractionConfigChangeStateRetention(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
INTERACTION_CONFIG_CHANGE_STATE_RETENTION
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE
)
}

@Provides
@EnableAppAndOsDeprecation
fun provideEnableAppAndOsDeprecation(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
)
fun provideEnableAppAndOsDeprecation(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(APP_AND_OS_DEPRECATION)
?: PlatformParameterValue.createDefaultParameter(
ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
)
}

@Provides
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ import android.content.Context
import dagger.Module
import dagger.Provides
import org.oppia.android.app.utility.getVersionCode
import org.oppia.android.util.platformparameter.APP_AND_OS_DEPRECATION
import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING
import org.oppia.android.util.platformparameter.CACHE_LATEX_RENDERING_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.CacheLatexRendering
import org.oppia.android.util.platformparameter.DOWNLOADS_SUPPORT
import org.oppia.android.util.platformparameter.EDIT_ACCOUNTS_OPTIONS_UI
import org.oppia.android.util.platformparameter.ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE
Expand All @@ -16,6 +19,7 @@ import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEF
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION
import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.EXTRA_TOPIC_TABS_UI
import org.oppia.android.util.platformparameter.EnableAppAndOsDeprecation
import org.oppia.android.util.platformparameter.EnableDownloadsSupport
import org.oppia.android.util.platformparameter.EnableEditAccountsOptionsUi
Expand All @@ -31,6 +35,7 @@ import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSO
import org.oppia.android.util.platformparameter.FAST_LANGUAGE_SWITCHING_IN_LESSON_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.FORCED_APP_UPDATE_VERSION_CODE
import org.oppia.android.util.platformparameter.ForcedAppUpdateVersionCode
import org.oppia.android.util.platformparameter.INTERACTION_CONFIG_CHANGE_STATE_RETENTION
import org.oppia.android.util.platformparameter.LEARNER_STUDY_ANALYTICS
import org.oppia.android.util.platformparameter.LEARNER_STUDY_ANALYTICS_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.LOGGING_LEARNER_STUDY_IDS
Expand Down Expand Up @@ -59,6 +64,7 @@ import org.oppia.android.util.platformparameter.PlatformParameterSingleton
import org.oppia.android.util.platformparameter.PlatformParameterValue
import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG
import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.SPOTLIGHT_UI
import org.oppia.android.util.platformparameter.SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS
import org.oppia.android.util.platformparameter.SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS_DEFAULT_VALUE
import org.oppia.android.util.platformparameter.SplashScreenWelcomeMsg
Expand All @@ -69,8 +75,12 @@ import org.oppia.android.util.platformparameter.SyncUpWorkerTimePeriodHours
class PlatformParameterModule {
@Provides
@EnableDownloadsSupport
fun provideEnableDownloadsSupport(): PlatformParameterValue<Boolean> =
PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)
fun provideEnableDownloadsSupport(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(DOWNLOADS_SUPPORT)
?: PlatformParameterValue.createDefaultParameter(ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE)
}

@Provides
@SplashScreenWelcomeMsg
Expand Down Expand Up @@ -103,8 +113,12 @@ class PlatformParameterModule {

@Provides
@EnableEditAccountsOptionsUi
fun provideEnableEditAccountsOptionsUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableEditAccountsOptionsUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
EDIT_ACCOUNTS_OPTIONS_UI
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE
)
}
Expand Down Expand Up @@ -197,34 +211,46 @@ class PlatformParameterModule {

@Provides
@EnableSpotlightUi
fun provideEnableSpotlightUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE
)
fun provideEnableSpotlightUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(SPOTLIGHT_UI)
?: PlatformParameterValue.createDefaultParameter(ENABLE_SPOTLIGHT_UI_DEFAULT_VALUE)
}

@Provides
@EnableExtraTopicTabsUi
fun provideEnableExtraTopicTabsUi(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableExtraTopicTabsUi(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
EXTRA_TOPIC_TABS_UI
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE
)
}

@Provides
@EnableInteractionConfigChangeStateRetention
fun provideEnableInteractionConfigChangeStateRetention(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
fun provideEnableInteractionConfigChangeStateRetention(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(
INTERACTION_CONFIG_CHANGE_STATE_RETENTION
) ?: PlatformParameterValue.createDefaultParameter(
ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE
)
}

@Provides
@EnableAppAndOsDeprecation
fun provideEnableAppAndOsDeprecation(): PlatformParameterValue<Boolean> {
return PlatformParameterValue.createDefaultParameter(
ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
)
fun provideEnableAppAndOsDeprecation(
platformParameterSingleton: PlatformParameterSingleton
): PlatformParameterValue<Boolean> {
return platformParameterSingleton.getBooleanPlatformParameter(APP_AND_OS_DEPRECATION)
?: PlatformParameterValue.createDefaultParameter(
ENABLE_APP_AND_OS_DEPRECATION_DEFAULT_VALUE
)
}

@Provides
Expand Down
Loading

0 comments on commit 87a7676

Please sign in to comment.