Bug 1954785 - Add secret settings and nimbus flag for search using remote servers r=android-reviewers,Roger
Differential Revision: https://phabricator.services.mozilla.com/D245122
This commit is contained in:
@@ -770,6 +770,14 @@ features:
|
||||
description: The text to show in the CFR
|
||||
type: Text
|
||||
default: ""
|
||||
remote-search-configuration:
|
||||
description: Feature to use search configurations from remote servers.
|
||||
variables:
|
||||
enabled:
|
||||
description: >
|
||||
Uses search configuration from remote servers .
|
||||
type: Boolean
|
||||
default: false
|
||||
|
||||
types:
|
||||
objects: {}
|
||||
|
||||
@@ -236,6 +236,12 @@ class SecretSettingsFragment : PreferenceFragmentCompat() {
|
||||
}
|
||||
}
|
||||
|
||||
requirePreference<SwitchPreference>(R.string.pref_key_use_remote_search_configuration).apply {
|
||||
isVisible = true
|
||||
isChecked = context.settings().useRemoteSearchConfiguration
|
||||
onPreferenceChangeListener = SharedPreferenceUpdater()
|
||||
}
|
||||
|
||||
requirePreference<SwitchPreference>(R.string.pref_key_microsurvey_feature_enabled).apply {
|
||||
isVisible = true
|
||||
isChecked = context.settings().microsurveyFeatureEnabled
|
||||
|
||||
@@ -1914,6 +1914,14 @@ class Settings(private val appContext: Context) : PreferencesHolder {
|
||||
default = true,
|
||||
)
|
||||
|
||||
/**
|
||||
* Indicates whether or not to use remote server search configuration.
|
||||
*/
|
||||
var useRemoteSearchConfiguration by booleanPreference(
|
||||
key = appContext.getPreferenceKey(R.string.pref_key_use_remote_search_configuration),
|
||||
default = FxNimbus.features.remoteSearchConfiguration.value().enabled,
|
||||
)
|
||||
|
||||
/**
|
||||
* Indicates if the menu CFR should be displayed to the user.
|
||||
*/
|
||||
|
||||
@@ -135,6 +135,8 @@
|
||||
<string name="pref_key_show_sponsored_suggestions" translatable="false">pref_key_show_sponsored_suggestions</string>
|
||||
<string name="pref_key_show_nonsponsored_suggestions" translatable="false">pref_key_show_nonsponsored_suggestions</string>
|
||||
<string name="pref_key_learn_about_fx_suggest" translatable="false">pref_key_learn_about_fx_suggest</string>
|
||||
<string name="pref_key_use_remote_search_configuration" translatable="false">pref_key_use_remote_search_configuration</string>
|
||||
|
||||
|
||||
<!-- Searchbar Settings -->
|
||||
<string name="pref_key_should_searchbar_cfr">pref_key_should_show_searchbar_cfr</string>
|
||||
|
||||
@@ -107,6 +107,8 @@
|
||||
<string name="preferences_debug_settings_unified_trust_panel" translatable="false">Enable Unified Trust Panel</string>
|
||||
<!-- Label for enabling Trending Searches -->
|
||||
<string name="preferences_debug_settings_trending_searches" translatable="false">Enable Trending Searches</string>
|
||||
<!-- Label for enabling remote search configuration -->
|
||||
<string name="preferences_debug_settings_remote_search_configuration" translatable="false">Enable Remote Search Configuration (requires restart)</string>
|
||||
<!-- Label for enabling Recent Searches -->
|
||||
<string name="preferences_debug_settings_recent_searches" translatable="false">Enable Recent Searches</string>
|
||||
<!-- Label for enabling Shortcut Suggestions -->
|
||||
|
||||
@@ -92,6 +92,10 @@
|
||||
android:key="@string/pref_key_enable_trending_searches"
|
||||
android:title="@string/preferences_debug_settings_trending_searches"
|
||||
app:iconSpaceReserved="false" />
|
||||
<SwitchPreference
|
||||
android:key="@string/pref_key_use_remote_search_configuration"
|
||||
android:title="@string/preferences_debug_settings_remote_search_configuration"
|
||||
app:iconSpaceReserved="false" />
|
||||
<SwitchPreference
|
||||
android:key="@string/pref_key_enable_recent_searches"
|
||||
android:title="@string/preferences_debug_settings_recent_searches"
|
||||
|
||||
Reference in New Issue
Block a user