Loading mobile/android/fenix/app/.experimenter.yaml +0 −8 Original line number Diff line number Diff line Loading @@ -224,14 +224,6 @@ splash-screen: maximum_duration_ms: type: int description: The maximum amount of time in milliseconds the splashscreen will be visible while waiting for initialization calls to complete. toolbar: description: The searchbar/awesomebar that user uses to search. hasExposure: true exposureDescription: "" variables: toolbar-position-top: type: boolean description: "If true, toolbar appears at top of the screen." unified-search: description: A feature allowing user to easily search for specified results directly in the search bar. hasExposure: true Loading mobile/android/fenix/app/nimbus.fml.yaml +0 −7 Original line number Diff line number Diff line Loading @@ -35,13 +35,6 @@ import: } features: toolbar: description: The searchbar/awesomebar that user uses to search. variables: toolbar-position-top: description: If true, toolbar appears at top of the screen. type: Boolean default: false homescreen: description: The homescreen that the user goes to when they press home or new tab. variables: Loading mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/helpers/FeatureSettingsHelper.kt +5 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,11 @@ interface FeatureSettingsHelper { */ var isSetAsDefaultBrowserPromptEnabled: Boolean /** * Enable or disable bottom toolbar position. */ var shouldUseBottomToolbar: Boolean fun applyFlagUpdates() fun resetAllFeatureFlags() Loading mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/helpers/FeatureSettingsHelperDelegate.kt +4 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ class FeatureSettingsHelperDelegate() : FeatureSettingsHelper { isNavigationToolbarEnabled = settings.navigationToolbarEnabled, isMicrosurveyEnabled = settings.microsurveyFeatureEnabled, isSetAsDefaultBrowserPromptEnabled = settings.setAsDefaultBrowserPromptForExistingUsersEnabled, shouldUseBottomToolbar = settings.shouldUseBottomToolbar, ) /** Loading Loading @@ -80,6 +81,7 @@ class FeatureSettingsHelperDelegate() : FeatureSettingsHelper { override var isNavigationToolbarEnabled: Boolean by updatedFeatureFlags::isNavigationToolbarEnabled override var isMicrosurveyEnabled: Boolean by updatedFeatureFlags::isMicrosurveyEnabled override var isSetAsDefaultBrowserPromptEnabled: Boolean by updatedFeatureFlags::isSetAsDefaultBrowserPromptEnabled override var shouldUseBottomToolbar: Boolean by updatedFeatureFlags::shouldUseBottomToolbar override fun applyFlagUpdates() { Log.i(TAG, "applyFlagUpdates: Trying to apply the updated feature flags: $updatedFeatureFlags") Loading Loading @@ -112,6 +114,7 @@ class FeatureSettingsHelperDelegate() : FeatureSettingsHelper { settings.navigationToolbarEnabled = featureFlags.isNavigationToolbarEnabled settings.microsurveyFeatureEnabled = featureFlags.isMicrosurveyEnabled settings.setAsDefaultBrowserPromptForExistingUsersEnabled = featureFlags.isSetAsDefaultBrowserPromptEnabled settings.shouldUseBottomToolbar = featureFlags.shouldUseBottomToolbar setETPPolicy(featureFlags.etpPolicy) setPermissions(PhoneFeature.LOCATION, featureFlags.isLocationPermissionEnabled) } Loading @@ -136,6 +139,7 @@ private data class FeatureFlags( var isNavigationToolbarEnabled: Boolean, var isMicrosurveyEnabled: Boolean, var isSetAsDefaultBrowserPromptEnabled: Boolean, var shouldUseBottomToolbar: Boolean, ) internal fun getETPPolicy(settings: Settings): ETPPolicy { Loading mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/helpers/HomeActivityTestRule.kt +11 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ class HomeActivityTestRule( isNavigationToolbarEnabled: Boolean = false, isMicrosurveyEnabled: Boolean = settings.microsurveyFeatureEnabled, isSetAsDefaultBrowserPromptEnabled: Boolean = settings.setAsDefaultBrowserPromptForExistingUsersEnabled, shouldUseBottomToolbar: Boolean = settings.shouldUseBottomToolbar, ) : this(initialTouchMode, launchActivity, skipOnboarding) { this.isHomeOnboardingDialogEnabled = isHomeOnboardingDialogEnabled this.isPocketEnabled = isPocketEnabled Loading @@ -82,6 +83,7 @@ class HomeActivityTestRule( this.isNavigationToolbarEnabled = isNavigationToolbarEnabled this.isMicrosurveyEnabled = isMicrosurveyEnabled this.isSetAsDefaultBrowserPromptEnabled = isSetAsDefaultBrowserPromptEnabled this.shouldUseBottomToolbar = shouldUseBottomToolbar } /** Loading Loading @@ -144,6 +146,9 @@ class HomeActivityTestRule( composeTopSitesEnabled = composeTopSitesEnabled, isMicrosurveyEnabled = false, isSetAsDefaultBrowserPromptEnabled = false, // workaround for toolbar at top position by default // remove with https://bugzilla.mozilla.org/show_bug.cgi?id=1917640 shouldUseBottomToolbar = true, ) } } Loading Loading @@ -187,6 +192,7 @@ class HomeActivityIntentTestRule internal constructor( isNavigationToolbarEnabled: Boolean = false, isMicrosurveyEnabled: Boolean = settings.microsurveyFeatureEnabled, isSetAsDefaultBrowserPromptEnabled: Boolean = settings.setAsDefaultBrowserPromptForExistingUsersEnabled, shouldUseBottomToolbar: Boolean = settings.shouldUseBottomToolbar, ) : this(initialTouchMode, launchActivity, skipOnboarding) { this.isHomeOnboardingDialogEnabled = isHomeOnboardingDialogEnabled this.isPocketEnabled = isPocketEnabled Loading @@ -205,6 +211,7 @@ class HomeActivityIntentTestRule internal constructor( this.isNavigationToolbarEnabled = isNavigationToolbarEnabled this.isMicrosurveyEnabled = isMicrosurveyEnabled this.isSetAsDefaultBrowserPromptEnabled = isSetAsDefaultBrowserPromptEnabled this.shouldUseBottomToolbar = shouldUseBottomToolbar } private val longTapUserPreference = getLongPressTimeout() Loading Loading @@ -278,6 +285,7 @@ class HomeActivityIntentTestRule internal constructor( isNavigationToolbarEnabled = settings.navigationToolbarEnabled isMicrosurveyEnabled = settings.microsurveyFeatureEnabled isSetAsDefaultBrowserPromptEnabled = settings.setAsDefaultBrowserPromptForExistingUsersEnabled shouldUseBottomToolbar = settings.shouldUseBottomToolbar } companion object { Loading Loading @@ -308,6 +316,9 @@ class HomeActivityIntentTestRule internal constructor( composeTopSitesEnabled = composeTopSitesEnabled, isMicrosurveyEnabled = false, isSetAsDefaultBrowserPromptEnabled = false, // workaround for toolbar at top position by default // remove with https://bugzilla.mozilla.org/show_bug.cgi?id=1917640 shouldUseBottomToolbar = true, ) } } Loading Loading
mobile/android/fenix/app/.experimenter.yaml +0 −8 Original line number Diff line number Diff line Loading @@ -224,14 +224,6 @@ splash-screen: maximum_duration_ms: type: int description: The maximum amount of time in milliseconds the splashscreen will be visible while waiting for initialization calls to complete. toolbar: description: The searchbar/awesomebar that user uses to search. hasExposure: true exposureDescription: "" variables: toolbar-position-top: type: boolean description: "If true, toolbar appears at top of the screen." unified-search: description: A feature allowing user to easily search for specified results directly in the search bar. hasExposure: true Loading
mobile/android/fenix/app/nimbus.fml.yaml +0 −7 Original line number Diff line number Diff line Loading @@ -35,13 +35,6 @@ import: } features: toolbar: description: The searchbar/awesomebar that user uses to search. variables: toolbar-position-top: description: If true, toolbar appears at top of the screen. type: Boolean default: false homescreen: description: The homescreen that the user goes to when they press home or new tab. variables: Loading
mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/helpers/FeatureSettingsHelper.kt +5 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,11 @@ interface FeatureSettingsHelper { */ var isSetAsDefaultBrowserPromptEnabled: Boolean /** * Enable or disable bottom toolbar position. */ var shouldUseBottomToolbar: Boolean fun applyFlagUpdates() fun resetAllFeatureFlags() Loading
mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/helpers/FeatureSettingsHelperDelegate.kt +4 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ class FeatureSettingsHelperDelegate() : FeatureSettingsHelper { isNavigationToolbarEnabled = settings.navigationToolbarEnabled, isMicrosurveyEnabled = settings.microsurveyFeatureEnabled, isSetAsDefaultBrowserPromptEnabled = settings.setAsDefaultBrowserPromptForExistingUsersEnabled, shouldUseBottomToolbar = settings.shouldUseBottomToolbar, ) /** Loading Loading @@ -80,6 +81,7 @@ class FeatureSettingsHelperDelegate() : FeatureSettingsHelper { override var isNavigationToolbarEnabled: Boolean by updatedFeatureFlags::isNavigationToolbarEnabled override var isMicrosurveyEnabled: Boolean by updatedFeatureFlags::isMicrosurveyEnabled override var isSetAsDefaultBrowserPromptEnabled: Boolean by updatedFeatureFlags::isSetAsDefaultBrowserPromptEnabled override var shouldUseBottomToolbar: Boolean by updatedFeatureFlags::shouldUseBottomToolbar override fun applyFlagUpdates() { Log.i(TAG, "applyFlagUpdates: Trying to apply the updated feature flags: $updatedFeatureFlags") Loading Loading @@ -112,6 +114,7 @@ class FeatureSettingsHelperDelegate() : FeatureSettingsHelper { settings.navigationToolbarEnabled = featureFlags.isNavigationToolbarEnabled settings.microsurveyFeatureEnabled = featureFlags.isMicrosurveyEnabled settings.setAsDefaultBrowserPromptForExistingUsersEnabled = featureFlags.isSetAsDefaultBrowserPromptEnabled settings.shouldUseBottomToolbar = featureFlags.shouldUseBottomToolbar setETPPolicy(featureFlags.etpPolicy) setPermissions(PhoneFeature.LOCATION, featureFlags.isLocationPermissionEnabled) } Loading @@ -136,6 +139,7 @@ private data class FeatureFlags( var isNavigationToolbarEnabled: Boolean, var isMicrosurveyEnabled: Boolean, var isSetAsDefaultBrowserPromptEnabled: Boolean, var shouldUseBottomToolbar: Boolean, ) internal fun getETPPolicy(settings: Settings): ETPPolicy { Loading
mobile/android/fenix/app/src/androidTest/java/org/mozilla/fenix/helpers/HomeActivityTestRule.kt +11 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ class HomeActivityTestRule( isNavigationToolbarEnabled: Boolean = false, isMicrosurveyEnabled: Boolean = settings.microsurveyFeatureEnabled, isSetAsDefaultBrowserPromptEnabled: Boolean = settings.setAsDefaultBrowserPromptForExistingUsersEnabled, shouldUseBottomToolbar: Boolean = settings.shouldUseBottomToolbar, ) : this(initialTouchMode, launchActivity, skipOnboarding) { this.isHomeOnboardingDialogEnabled = isHomeOnboardingDialogEnabled this.isPocketEnabled = isPocketEnabled Loading @@ -82,6 +83,7 @@ class HomeActivityTestRule( this.isNavigationToolbarEnabled = isNavigationToolbarEnabled this.isMicrosurveyEnabled = isMicrosurveyEnabled this.isSetAsDefaultBrowserPromptEnabled = isSetAsDefaultBrowserPromptEnabled this.shouldUseBottomToolbar = shouldUseBottomToolbar } /** Loading Loading @@ -144,6 +146,9 @@ class HomeActivityTestRule( composeTopSitesEnabled = composeTopSitesEnabled, isMicrosurveyEnabled = false, isSetAsDefaultBrowserPromptEnabled = false, // workaround for toolbar at top position by default // remove with https://bugzilla.mozilla.org/show_bug.cgi?id=1917640 shouldUseBottomToolbar = true, ) } } Loading Loading @@ -187,6 +192,7 @@ class HomeActivityIntentTestRule internal constructor( isNavigationToolbarEnabled: Boolean = false, isMicrosurveyEnabled: Boolean = settings.microsurveyFeatureEnabled, isSetAsDefaultBrowserPromptEnabled: Boolean = settings.setAsDefaultBrowserPromptForExistingUsersEnabled, shouldUseBottomToolbar: Boolean = settings.shouldUseBottomToolbar, ) : this(initialTouchMode, launchActivity, skipOnboarding) { this.isHomeOnboardingDialogEnabled = isHomeOnboardingDialogEnabled this.isPocketEnabled = isPocketEnabled Loading @@ -205,6 +211,7 @@ class HomeActivityIntentTestRule internal constructor( this.isNavigationToolbarEnabled = isNavigationToolbarEnabled this.isMicrosurveyEnabled = isMicrosurveyEnabled this.isSetAsDefaultBrowserPromptEnabled = isSetAsDefaultBrowserPromptEnabled this.shouldUseBottomToolbar = shouldUseBottomToolbar } private val longTapUserPreference = getLongPressTimeout() Loading Loading @@ -278,6 +285,7 @@ class HomeActivityIntentTestRule internal constructor( isNavigationToolbarEnabled = settings.navigationToolbarEnabled isMicrosurveyEnabled = settings.microsurveyFeatureEnabled isSetAsDefaultBrowserPromptEnabled = settings.setAsDefaultBrowserPromptForExistingUsersEnabled shouldUseBottomToolbar = settings.shouldUseBottomToolbar } companion object { Loading Loading @@ -308,6 +316,9 @@ class HomeActivityIntentTestRule internal constructor( composeTopSitesEnabled = composeTopSitesEnabled, isMicrosurveyEnabled = false, isSetAsDefaultBrowserPromptEnabled = false, // workaround for toolbar at top position by default // remove with https://bugzilla.mozilla.org/show_bug.cgi?id=1917640 shouldUseBottomToolbar = true, ) } } Loading