From 002e5b609f27a2f3d515a09a09061c5dc4c69cee Mon Sep 17 00:00:00 2001 From: kmanikanta335 <118070186+kmanikanta335@users.noreply.github.com> Date: Tue, 21 Nov 2023 15:06:27 +0530 Subject: [PATCH 01/11] Remove the EnableLanguageSelectionUi Feature Flag --- .../app/options/OptionControlsViewModel.kt | 8 ++------ .../android/app/options/OptionsFragmentTest.kt | 2 -- .../app/testing/options/OptionsFragmentTest.kt | 2 -- .../PlatformParameterAlphaKenyaModule.kt | 9 --------- .../PlatformParameterAlphaModule.kt | 9 --------- .../platformparameter/PlatformParameterModule.kt | 9 --------- .../LoggingIdentifierControllerTest.kt | 9 --------- .../android/domain/oppialogger/OppiaLoggerTest.kt | 9 --------- .../TestPlatformParameterModule.kt | 15 --------------- .../PlatformParameterConstants.kt | 7 ------- .../util/logging/SyncStatusManagerImplTest.kt | 9 --------- .../logging/firebase/LogReportingModuleTest.kt | 9 --------- 12 files changed, 2 insertions(+), 95 deletions(-) diff --git a/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt b/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt index 50f489ff326..16cc5c1191f 100644 --- a/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt @@ -18,8 +18,6 @@ import org.oppia.android.util.data.AsyncResult import org.oppia.android.util.data.DataProvider import org.oppia.android.util.data.DataProviders.Companion.combineWith import org.oppia.android.util.data.DataProviders.Companion.toLiveData -import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi -import org.oppia.android.util.platformparameter.PlatformParameterValue import javax.inject.Inject /** [ViewModel] for [OptionsFragment]. */ @@ -32,7 +30,6 @@ class OptionControlsViewModel @Inject constructor( activity: AppCompatActivity, private val profileManagementController: ProfileManagementController, private val oppiaLogger: OppiaLogger, - @EnableLanguageSelectionUi private val enableLanguageSelectionUi: PlatformParameterValue, private val resourceHandler: AppLanguageResourceHandler, private val translationController: TranslationController ) : OptionsItemViewModel() { @@ -112,13 +109,12 @@ class OptionControlsViewModel @Inject constructor( } private fun createAppLanguageViewModel(language: OppiaLanguage): OptionsAppLanguageViewModel? { - return if (enableLanguageSelectionUi.value) { - OptionsAppLanguageViewModel( + return OptionsAppLanguageViewModel( routeToAppLanguageListListener, loadAppLanguageListListener, language, resourceHandler.computeLocalizedDisplayName(language) ) - } else null + } private fun createAudioLanguageViewModel(profile: Profile): OptionsAudioLanguageViewModel { diff --git a/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt index 3210327edae..383cba65c54 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt @@ -146,7 +146,6 @@ class OptionsFragmentTest { @Before fun setUp() { - TestPlatformParameterModule.forceEnableLanguageSelectionUi(true) Intents.init() setUpTestApplicationComponent() testCoroutineDispatchers.registerIdlingResource() @@ -370,7 +369,6 @@ class OptionsFragmentTest { @Test fun testOptionsFragment_featureDisabled_appLanguageOptionIsNotDisplayed() { - TestPlatformParameterModule.forceEnableLanguageSelectionUi(false) launch( createOptionActivityIntent( diff --git a/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt b/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt index 6334a3cb199..a8f09930dc4 100644 --- a/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt @@ -113,7 +113,6 @@ class OptionsFragmentTest { @Before fun setUp() { - TestPlatformParameterModule.forceEnableLanguageSelectionUi(true) TestPlatformParameterModule.forceEnableEditAccountsOptionsUi( ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE ) @@ -171,7 +170,6 @@ class OptionsFragmentTest { @Test fun testOptionsFragment_featureDisabled_appLanguageItemIsNotDisplayed() { - TestPlatformParameterModule.forceEnableLanguageSelectionUi(false) launch(createOptionActivityIntent(0, true)).use { testCoroutineDispatchers.runCurrent() 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 6adc922bc11..ed67e25dd5d 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 @@ -22,7 +22,6 @@ import org.oppia.android.util.platformparameter.EnableEditAccountsOptionsUi import org.oppia.android.util.platformparameter.EnableExtraTopicTabsUi import org.oppia.android.util.platformparameter.EnableFastLanguageSwitchingInLesson import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeStateRetention -import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection @@ -94,14 +93,6 @@ class PlatformParameterAlphaKenyaModule { ) } - @Provides - @EnableLanguageSelectionUi - fun provideEnableLanguageSelectionUi(): PlatformParameterValue { - return PlatformParameterValue.createDefaultParameter( - ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE - ) - } - @Provides @EnableEditAccountsOptionsUi fun provideEnableEditAccountsOptionsUi(): PlatformParameterValue { 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 7ca4dcc66b0..6f1a86edf32 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 @@ -21,7 +21,6 @@ import org.oppia.android.util.platformparameter.EnableEditAccountsOptionsUi import org.oppia.android.util.platformparameter.EnableExtraTopicTabsUi import org.oppia.android.util.platformparameter.EnableFastLanguageSwitchingInLesson import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeStateRetention -import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection @@ -91,14 +90,6 @@ class PlatformParameterAlphaModule { ) } - @Provides - @EnableLanguageSelectionUi - fun provideEnableLanguageSelectionUi(): PlatformParameterValue { - return PlatformParameterValue.createDefaultParameter( - ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE - ) - } - @Provides @EnableEditAccountsOptionsUi fun provideEnableEditAccountsOptionsUi(): PlatformParameterValue { 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 26e25bd3590..7e7ddbd28df 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 @@ -22,7 +22,6 @@ import org.oppia.android.util.platformparameter.EnableEditAccountsOptionsUi import org.oppia.android.util.platformparameter.EnableExtraTopicTabsUi import org.oppia.android.util.platformparameter.EnableFastLanguageSwitchingInLesson import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeStateRetention -import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection @@ -93,14 +92,6 @@ class PlatformParameterModule { ) } - @Provides - @EnableLanguageSelectionUi - fun provideEnableLanguageSelectionUi(): PlatformParameterValue { - return PlatformParameterValue.createDefaultParameter( - ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE - ) - } - @Provides @EnableEditAccountsOptionsUi fun provideEnableEditAccountsOptionsUi(): PlatformParameterValue { diff --git a/domain/src/test/java/org/oppia/android/domain/oppialogger/LoggingIdentifierControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/oppialogger/LoggingIdentifierControllerTest.kt index 6c30c8200d5..92d21aeb487 100644 --- a/domain/src/test/java/org/oppia/android/domain/oppialogger/LoggingIdentifierControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/oppialogger/LoggingIdentifierControllerTest.kt @@ -41,7 +41,6 @@ import org.oppia.android.util.logging.LogLevel import org.oppia.android.util.logging.SyncStatusModule import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE -import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.PlatformParameterValue import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE @@ -370,14 +369,6 @@ class LoggingIdentifierControllerTest { ) } - @Provides - @EnableLanguageSelectionUi - fun provideEnableLanguageSelectionUi(): PlatformParameterValue { - return PlatformParameterValue.createDefaultParameter( - ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE - ) - } - @Provides @EnableLearnerStudyAnalytics fun provideLearnerStudyAnalytics(): PlatformParameterValue { diff --git a/domain/src/test/java/org/oppia/android/domain/oppialogger/OppiaLoggerTest.kt b/domain/src/test/java/org/oppia/android/domain/oppialogger/OppiaLoggerTest.kt index bf940cfe8e1..14f830e8d8e 100644 --- a/domain/src/test/java/org/oppia/android/domain/oppialogger/OppiaLoggerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/oppialogger/OppiaLoggerTest.kt @@ -43,7 +43,6 @@ import org.oppia.android.util.logging.LogLevel import org.oppia.android.util.logging.SyncStatusModule import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE -import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.PlatformParameterValue import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE @@ -391,14 +390,6 @@ class OppiaLoggerTest { ) } - @Provides - @EnableLanguageSelectionUi - fun provideEnableLanguageSelectionUi(): PlatformParameterValue { - return PlatformParameterValue.createDefaultParameter( - ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE - ) - } - @Provides @EnableLearnerStudyAnalytics fun provideLearnerStudyAnalytics(): PlatformParameterValue { 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 9341414bfd8..8fd3e926427 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 @@ -21,7 +21,6 @@ import org.oppia.android.util.platformparameter.EnableEditAccountsOptionsUi import org.oppia.android.util.platformparameter.EnableExtraTopicTabsUi import org.oppia.android.util.platformparameter.EnableFastLanguageSwitchingInLesson import org.oppia.android.util.platformparameter.EnableInteractionConfigChangeStateRetention -import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds import org.oppia.android.util.platformparameter.EnablePerformanceMetricsCollection @@ -118,11 +117,6 @@ class TestPlatformParameterModule { ) } - @Provides - @EnableLanguageSelectionUi - fun provideEnableLanguageSelectionUi(): PlatformParameterValue = - PlatformParameterValue.createDefaultParameter(enableLanguageSelectionUi) - @Provides @EnableEditAccountsOptionsUi fun provideEnableEditAccountsOptionsUi(): PlatformParameterValue = @@ -272,7 +266,6 @@ class TestPlatformParameterModule { companion object { private var enableDownloadsSupport = ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE - private var enableLanguageSelectionUi = ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE private var enableEditAccountsOptionsUi = ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE private var enableLearnerStudyAnalytics = LEARNER_STUDY_ANALYTICS_DEFAULT_VALUE private var enableFastLanguageSwitchingInLesson = @@ -289,18 +282,11 @@ class TestPlatformParameterModule { NPS_SURVEY_MINIMUM_AGGREGATE_LEARNING_TIME_IN_A_TOPIC_IN_MINUTES_DEFAULT_VALUE private var gracePeriodInDays = NPS_SURVEY_GRACE_PERIOD_IN_DAYS_DEFAULT_VALUE - /** Enables forcing [EnableLanguageSelectionUi] platform parameter flag from tests. */ @VisibleForTesting(otherwise = VisibleForTesting.NONE) fun forceEnableDownloadsSupport(value: Boolean) { enableDownloadsSupport = value } - /** Enables forcing [EnableLanguageSelectionUi] platform parameter flag from tests. */ - @VisibleForTesting(otherwise = VisibleForTesting.NONE) - fun forceEnableLanguageSelectionUi(value: Boolean) { - enableLanguageSelectionUi = value - } - /** Enables forcing [EnableEditAccountsOptionsUI] platform parameter flag from tests. */ @VisibleForTesting(otherwise = VisibleForTesting.NONE) fun forceEnableEditAccountsOptionsUi(value: Boolean) { @@ -352,7 +338,6 @@ class TestPlatformParameterModule { @VisibleForTesting(otherwise = VisibleForTesting.NONE) fun reset() { enableDownloadsSupport = ENABLE_DOWNLOADS_SUPPORT_DEFAULT_VALUE - enableLanguageSelectionUi = ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE enableEditAccountsOptionsUi = ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE enableLearnerStudyAnalytics = LEARNER_STUDY_ANALYTICS_DEFAULT_VALUE enableFastLanguageSwitchingInLesson = FAST_LANGUAGE_SWITCHING_IN_LESSON_DEFAULT_VALUE 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 fa0deba044c..17d2009a8fb 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 @@ -75,13 +75,6 @@ const val SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS = "sync_up_worker_time_period" */ const val SYNC_UP_WORKER_TIME_PERIOD_IN_HOURS_DEFAULT_VALUE = 12 -/** Qualifier for the feature flag corresponding to enabling the language selection UI. */ -@Qualifier -annotation class EnableLanguageSelectionUi - -/** Default value for the feature flag corresponding to [EnableLanguageSelectionUi]. */ -const val ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE = true - /** * Qualifier for the feature flag corresponding to enabling the extra topic tabs: practice and info. */ diff --git a/utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerImplTest.kt b/utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerImplTest.kt index 52d32d11f2b..ad4698cb3ba 100644 --- a/utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerImplTest.kt +++ b/utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerImplTest.kt @@ -24,7 +24,6 @@ import org.oppia.android.util.data.DataProvidersInjectorProvider import org.oppia.android.util.locale.LocaleProdModule import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE -import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.PlatformParameterValue import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE @@ -109,14 +108,6 @@ class SyncStatusManagerImplTest : SyncStatusManagerTestBase() { ) } - @Provides - @EnableLanguageSelectionUi - fun provideEnableLanguageSelectionUi(): PlatformParameterValue { - return PlatformParameterValue.createDefaultParameter( - ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE - ) - } - @Provides @EnableLearnerStudyAnalytics fun provideLearnerStudyAnalytics(): PlatformParameterValue { diff --git a/utility/src/test/java/org/oppia/android/util/logging/firebase/LogReportingModuleTest.kt b/utility/src/test/java/org/oppia/android/util/logging/firebase/LogReportingModuleTest.kt index dcac9f91ee9..9a5c61ca53e 100644 --- a/utility/src/test/java/org/oppia/android/util/logging/firebase/LogReportingModuleTest.kt +++ b/utility/src/test/java/org/oppia/android/util/logging/firebase/LogReportingModuleTest.kt @@ -26,7 +26,6 @@ import org.oppia.android.util.logging.SyncStatusModule import org.oppia.android.util.logging.performancemetrics.PerformanceMetricsEventLogger import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE -import org.oppia.android.util.platformparameter.EnableLanguageSelectionUi import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds import org.oppia.android.util.platformparameter.PlatformParameterValue import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE @@ -99,14 +98,6 @@ class LogReportingModuleTest { ) } - @Provides - @EnableLanguageSelectionUi - fun provideEnableLanguageSelectionUi(): PlatformParameterValue { - return PlatformParameterValue.createDefaultParameter( - ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE - ) - } - @Provides @EnableLoggingLearnerStudyIds fun provideLoggingLearnerStudyIds(): PlatformParameterValue { From 30bcb914228ceeea7187f0259a4c10d750a39f2f Mon Sep 17 00:00:00 2001 From: kmanikanta335 <118070186+kmanikanta335@users.noreply.github.com> Date: Fri, 24 Nov 2023 20:01:11 +0530 Subject: [PATCH 02/11] Remove the EnableLanguageSelectionUi Feature Flag --- .../platformparameter/PlatformParameterAlphaKenyaModule.kt | 1 - .../domain/platformparameter/PlatformParameterAlphaModule.kt | 1 - .../android/domain/platformparameter/PlatformParameterModule.kt | 1 - .../testing/platformparameter/TestPlatformParameterModule.kt | 1 - .../org/oppia/android/util/logging/SyncStatusManagerImplTest.kt | 1 - .../android/util/logging/firebase/LogReportingModuleTest.kt | 1 - 6 files changed, 6 deletions(-) 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 ed67e25dd5d..da82d7bfbcc 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 @@ -12,7 +12,6 @@ import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE -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.ENABLE_SPOTLIGHT_UI_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 6f1a86edf32..ac7097eca4e 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 @@ -12,7 +12,6 @@ import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE -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.EnableAppAndOsDeprecation 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 7e7ddbd28df..e230cb7ffeb 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 @@ -12,7 +12,6 @@ import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE -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.ENABLE_SPOTLIGHT_UI_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 8fd3e926427..6874912d8ec 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 @@ -13,7 +13,6 @@ import org.oppia.android.util.platformparameter.ENABLE_DOWNLOADS_SUPPORT_DEFAULT import org.oppia.android.util.platformparameter.ENABLE_EDIT_ACCOUNTS_OPTIONS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_EXTRA_TOPIC_TABS_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_INTERACTION_CONFIG_CHANGE_STATE_RETENTION_DEFAULT_VALUE -import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.ENABLE_PERFORMANCE_METRICS_COLLECTION_DEFAULT_VALUE import org.oppia.android.util.platformparameter.EnableAppAndOsDeprecation import org.oppia.android.util.platformparameter.EnableDownloadsSupport diff --git a/utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerImplTest.kt b/utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerImplTest.kt index ad4698cb3ba..aaf4eff062c 100644 --- a/utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerImplTest.kt +++ b/utility/src/test/java/org/oppia/android/util/logging/SyncStatusManagerImplTest.kt @@ -23,7 +23,6 @@ import org.oppia.android.util.data.DataProvidersInjector import org.oppia.android.util.data.DataProvidersInjectorProvider import org.oppia.android.util.locale.LocaleProdModule import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule -import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.PlatformParameterValue import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE diff --git a/utility/src/test/java/org/oppia/android/util/logging/firebase/LogReportingModuleTest.kt b/utility/src/test/java/org/oppia/android/util/logging/firebase/LogReportingModuleTest.kt index 9a5c61ca53e..30992f7132c 100644 --- a/utility/src/test/java/org/oppia/android/util/logging/firebase/LogReportingModuleTest.kt +++ b/utility/src/test/java/org/oppia/android/util/logging/firebase/LogReportingModuleTest.kt @@ -25,7 +25,6 @@ import org.oppia.android.util.logging.LoggerModule import org.oppia.android.util.logging.SyncStatusModule import org.oppia.android.util.logging.performancemetrics.PerformanceMetricsEventLogger import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule -import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.EnableLoggingLearnerStudyIds import org.oppia.android.util.platformparameter.PlatformParameterValue import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE From 4b16efe2741234907736ad6edf0c8970b741f921 Mon Sep 17 00:00:00 2001 From: kmanikanta335 <118070186+kmanikanta335@users.noreply.github.com> Date: Sat, 25 Nov 2023 17:03:15 +0530 Subject: [PATCH 03/11] Remove the EnableLanguageSelectionUi Feature Flag --- .../org/oppia/android/app/options/OptionControlsViewModel.kt | 1 - .../domain/oppialogger/LoggingIdentifierControllerTest.kt | 1 - .../java/org/oppia/android/domain/oppialogger/OppiaLoggerTest.kt | 1 - 3 files changed, 3 deletions(-) diff --git a/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt b/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt index 16cc5c1191f..1811fb2d896 100644 --- a/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt @@ -114,7 +114,6 @@ class OptionControlsViewModel @Inject constructor( loadAppLanguageListListener, language, resourceHandler.computeLocalizedDisplayName(language) ) - } private fun createAudioLanguageViewModel(profile: Profile): OptionsAudioLanguageViewModel { diff --git a/domain/src/test/java/org/oppia/android/domain/oppialogger/LoggingIdentifierControllerTest.kt b/domain/src/test/java/org/oppia/android/domain/oppialogger/LoggingIdentifierControllerTest.kt index 92d21aeb487..303d6f466ac 100644 --- a/domain/src/test/java/org/oppia/android/domain/oppialogger/LoggingIdentifierControllerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/oppialogger/LoggingIdentifierControllerTest.kt @@ -40,7 +40,6 @@ import org.oppia.android.util.logging.GlobalLogLevel import org.oppia.android.util.logging.LogLevel import org.oppia.android.util.logging.SyncStatusModule import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule -import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.PlatformParameterValue import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE diff --git a/domain/src/test/java/org/oppia/android/domain/oppialogger/OppiaLoggerTest.kt b/domain/src/test/java/org/oppia/android/domain/oppialogger/OppiaLoggerTest.kt index 14f830e8d8e..c852f30d6b4 100644 --- a/domain/src/test/java/org/oppia/android/domain/oppialogger/OppiaLoggerTest.kt +++ b/domain/src/test/java/org/oppia/android/domain/oppialogger/OppiaLoggerTest.kt @@ -42,7 +42,6 @@ import org.oppia.android.util.logging.GlobalLogLevel import org.oppia.android.util.logging.LogLevel import org.oppia.android.util.logging.SyncStatusModule import org.oppia.android.util.networking.NetworkConnectionUtilDebugModule -import org.oppia.android.util.platformparameter.ENABLE_LANGUAGE_SELECTION_UI_DEFAULT_VALUE import org.oppia.android.util.platformparameter.EnableLearnerStudyAnalytics import org.oppia.android.util.platformparameter.PlatformParameterValue import org.oppia.android.util.platformparameter.SPLASH_SCREEN_WELCOME_MSG_DEFAULT_VALUE From 92fbc8dff279ac18448d8e437997af43090e28d0 Mon Sep 17 00:00:00 2001 From: kmanikanta335 <118070186+kmanikanta335@users.noreply.github.com> Date: Mon, 27 Nov 2023 23:44:02 +0530 Subject: [PATCH 04/11] Fix #5225: Remove the EnableLanguageSelectionUi Feature Flag --- .../org/oppia/android/app/options/OptionControlsViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt b/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt index 1811fb2d896..9a339392f6c 100644 --- a/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt @@ -111,7 +111,8 @@ class OptionControlsViewModel @Inject constructor( private fun createAppLanguageViewModel(language: OppiaLanguage): OptionsAppLanguageViewModel? { return OptionsAppLanguageViewModel( routeToAppLanguageListListener, - loadAppLanguageListListener, language, + loadAppLanguageListListener, + language, resourceHandler.computeLocalizedDisplayName(language) ) } From 408e5940919de28094cd205274fab3aa0fd105c8 Mon Sep 17 00:00:00 2001 From: kmanikanta335 <118070186+kmanikanta335@users.noreply.github.com> Date: Tue, 28 Nov 2023 20:26:47 +0530 Subject: [PATCH 05/11] Fix #5225: Remove the EnableLanguageSelectionUi Feature Flag --- .../android/app/options/OptionsFragmentTest.kt | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt index 383cba65c54..1e8a5604b40 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt @@ -367,20 +367,6 @@ class OptionsFragmentTest { } } - @Test - fun testOptionsFragment_featureDisabled_appLanguageOptionIsNotDisplayed() { - - launch( - createOptionActivityIntent( - internalProfileId = 0, - isFromNavigationDrawer = true - ) - ).use { - testCoroutineDispatchers.runCurrent() - onView(withId(R.id.app_language_text_view)).check(doesNotExist()) - } - } - @Test fun testOptionsFragment_defaultAudioLanguageIsDisplayed() { launch( From b4fbfcf27b805b0a98b36503e8c1e2500739b50e Mon Sep 17 00:00:00 2001 From: kmanikanta335 <118070186+kmanikanta335@users.noreply.github.com> Date: Wed, 29 Nov 2023 18:46:26 +0530 Subject: [PATCH 06/11] Fix #5225: Remove the EnableLanguageSelectionUi Feature Flag --- .../org/oppia/android/app/options/OptionControlsViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt b/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt index 9a339392f6c..e9c8f2fd967 100644 --- a/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt @@ -114,7 +114,7 @@ class OptionControlsViewModel @Inject constructor( loadAppLanguageListListener, language, resourceHandler.computeLocalizedDisplayName(language) - ) + ) } private fun createAudioLanguageViewModel(profile: Profile): OptionsAudioLanguageViewModel { From 232bfedeaede30700f5aa6c1c56d8a98744b9303 Mon Sep 17 00:00:00 2001 From: kmanikanta335 <118070186+kmanikanta335@users.noreply.github.com> Date: Thu, 30 Nov 2023 01:42:56 +0530 Subject: [PATCH 07/11] Fix #5225: Remove the EnableLanguageSelectionUi Feature Flag --- .../oppia/android/app/options/OptionControlsViewModel.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt b/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt index e9c8f2fd967..cd03b74450a 100644 --- a/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt +++ b/app/src/main/java/org/oppia/android/app/options/OptionControlsViewModel.kt @@ -110,10 +110,10 @@ class OptionControlsViewModel @Inject constructor( private fun createAppLanguageViewModel(language: OppiaLanguage): OptionsAppLanguageViewModel? { return OptionsAppLanguageViewModel( - routeToAppLanguageListListener, - loadAppLanguageListListener, - language, - resourceHandler.computeLocalizedDisplayName(language) + routeToAppLanguageListListener, + loadAppLanguageListListener, + language, + resourceHandler.computeLocalizedDisplayName(language) ) } From 359b7ca3c2be2064b427a97bbf55a55d56b07bea Mon Sep 17 00:00:00 2001 From: kmanikanta335 <118070186+kmanikanta335@users.noreply.github.com> Date: Mon, 4 Dec 2023 22:41:38 +0530 Subject: [PATCH 08/11] Fix #5225: Remove the EnableLanguageSelectionUi Feature Flag --- .../android/app/options/OptionsFragmentTest.kt | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt index 1e8a5604b40..dce0f8cf526 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt @@ -353,20 +353,7 @@ class OptionsFragmentTest { ) } } - - @Test - fun testOptionsFragment_featureEnabled_appLanguageOptionIsDisplayed() { - launch( - createOptionActivityIntent( - internalProfileId = 0, - isFromNavigationDrawer = true - ) - ).use { - testCoroutineDispatchers.runCurrent() - onView(withId(R.id.app_language_text_view)).check(matches(isDisplayed())) - } - } - + @Test fun testOptionsFragment_defaultAudioLanguageIsDisplayed() { launch( From 6f01b59488db4dfb27823368a44c4eb0d4395c49 Mon Sep 17 00:00:00 2001 From: kmanikanta335 <118070186+kmanikanta335@users.noreply.github.com> Date: Tue, 5 Dec 2023 16:41:30 +0530 Subject: [PATCH 09/11] Fix #5225: Remove the EnableLanguageSelectionUi Feature Flag --- .../java/org/oppia/android/app/options/OptionsFragmentTest.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt b/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt index dce0f8cf526..a96f83b18fd 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/options/OptionsFragmentTest.kt @@ -15,9 +15,7 @@ import androidx.test.espresso.assertion.ViewAssertions.matches import androidx.test.espresso.intent.Intents import androidx.test.espresso.intent.Intents.intended import androidx.test.espresso.intent.matcher.IntentMatchers.hasComponent -import androidx.test.espresso.intent.matcher.IntentMatchers.hasExtra import androidx.test.espresso.matcher.ViewMatchers.isCompletelyDisplayed -import androidx.test.espresso.matcher.ViewMatchers.isDisplayed import androidx.test.espresso.matcher.ViewMatchers.isRoot import androidx.test.espresso.matcher.ViewMatchers.withContentDescription import androidx.test.espresso.matcher.ViewMatchers.withId @@ -353,7 +351,7 @@ class OptionsFragmentTest { ) } } - + @Test fun testOptionsFragment_defaultAudioLanguageIsDisplayed() { launch( From 00616d57c7787bf32f4911d55ac0cb7e685027b3 Mon Sep 17 00:00:00 2001 From: kmanikanta335 <118070186+kmanikanta335@users.noreply.github.com> Date: Sun, 10 Dec 2023 16:35:25 +0530 Subject: [PATCH 10/11] Fix #5225: Remove the EnableLanguageSelectionUi Feature Flag --- .../app/testing/options/OptionsFragmentTest.kt | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt b/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt index a8f09930dc4..64a1866c888 100644 --- a/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt @@ -159,24 +159,6 @@ class OptionsFragmentTest { } } - @Test - fun testOptionsFragment_featureEnabled_appLanguageItemIsDisplayed() { - launch(createOptionActivityIntent(0, true)).use { - testCoroutineDispatchers.runCurrent() - - onView(withId(R.id.app_language_item_layout)).check(matches(isDisplayed())) - } - } - - @Test - fun testOptionsFragment_featureDisabled_appLanguageItemIsNotDisplayed() { - launch(createOptionActivityIntent(0, true)).use { - testCoroutineDispatchers.runCurrent() - - onView(withId(R.id.app_language_item_layout)).check(doesNotExist()) - } - } - @Test fun testOptionsFragment_clickAppLanguage_checkLoadingTheCorrectFragment() { launch(createOptionActivityIntent(0, true)).use { From 9a865462fa9d132fb2ff5b897cd965af82a42dac Mon Sep 17 00:00:00 2001 From: kmanikanta335 <118070186+kmanikanta335@users.noreply.github.com> Date: Mon, 11 Dec 2023 21:22:42 +0530 Subject: [PATCH 11/11] Fix #5225: Remove the EnableLanguageSelectionUi Feature Flag --- .../oppia/android/app/testing/options/OptionsFragmentTest.kt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt b/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt index 64a1866c888..af0187dfe7f 100644 --- a/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt +++ b/app/src/test/java/org/oppia/android/app/testing/options/OptionsFragmentTest.kt @@ -7,10 +7,6 @@ import androidx.test.core.app.ActivityScenario.launch import androidx.test.core.app.ApplicationProvider import androidx.test.espresso.Espresso.onView import androidx.test.espresso.action.ViewActions.click -import androidx.test.espresso.assertion.ViewAssertions.doesNotExist -import androidx.test.espresso.assertion.ViewAssertions.matches -import androidx.test.espresso.matcher.ViewMatchers.isDisplayed -import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.ext.junit.runners.AndroidJUnit4 import com.google.common.truth.Truth.assertThat import dagger.Component