Skip to main content
Sign in
Snippets Groups Projects
Verified Commit 81d6afc4 authored by clairehurst's avatar clairehurst Committed by Pier Angelo Vendrame
Browse files

fixup! [android] Disable features and functionality

parent 803844bd
No related branches found
No related tags found
1 merge request!1222Bug 43166: Rebased alpha onto 128.3.0esr
......@@ -34,15 +34,15 @@ class SearchEngineFragment : PreferenceFragmentCompat() {
rootKey,
)
requirePreference<SwitchPreference>(R.string.pref_key_show_sponsored_suggestions).apply {
isVisible = context.settings().enableFxSuggest
}
requirePreference<SwitchPreference>(R.string.pref_key_show_nonsponsored_suggestions).apply {
isVisible = context.settings().enableFxSuggest
}
requirePreference<Preference>(R.string.pref_key_learn_about_fx_suggest).apply {
isVisible = context.settings().enableFxSuggest
}
// requirePreference<SwitchPreference>(R.string.pref_key_show_sponsored_suggestions).apply {
// isVisible = context.settings().enableFxSuggest
// }
// requirePreference<SwitchPreference>(R.string.pref_key_show_nonsponsored_suggestions).apply {
// isVisible = context.settings().enableFxSuggest
// }
// requirePreference<Preference>(R.string.pref_key_learn_about_fx_suggest).apply {
// isVisible = context.settings().enableFxSuggest
// }
view?.hideKeyboard()
}
......@@ -83,10 +83,10 @@ class SearchEngineFragment : PreferenceFragmentCompat() {
isChecked = context.settings().shouldShowBookmarkSuggestions
}
val showSyncedTabsSuggestions =
requirePreference<SwitchPreference>(R.string.pref_key_search_synced_tabs).apply {
isChecked = context.settings().shouldShowSyncedTabsSuggestions
}
// val showSyncedTabsSuggestions =
// requirePreference<SwitchPreference>(R.string.pref_key_search_synced_tabs).apply {
// isChecked = context.settings().shouldShowSyncedTabsSuggestions
// }
val showClipboardSuggestions =
requirePreference<SwitchPreference>(R.string.pref_key_show_clipboard_suggestions).apply {
......@@ -98,28 +98,28 @@ class SearchEngineFragment : PreferenceFragmentCompat() {
isChecked = context.settings().shouldShowVoiceSearch
}
val showSponsoredSuggestionsPreference =
requirePreference<SwitchPreference>(R.string.pref_key_show_sponsored_suggestions).apply {
isChecked = context.settings().showSponsoredSuggestions
summary = getString(
R.string.preferences_show_sponsored_suggestions_summary,
getString(R.string.app_name),
)
}
val showNonSponsoredSuggestionsPreference =
requirePreference<SwitchPreference>(R.string.pref_key_show_nonsponsored_suggestions).apply {
isChecked = context.settings().showNonSponsoredSuggestions
title = getString(
R.string.preferences_show_nonsponsored_suggestions,
getString(R.string.app_name),
)
}
// val showSponsoredSuggestionsPreference =
// requirePreference<SwitchPreference>(R.string.pref_key_show_sponsored_suggestions).apply {
// isChecked = context.settings().showSponsoredSuggestions
// summary = getString(
// R.string.preferences_show_sponsored_suggestions_summary,
// getString(R.string.app_name),
// )
// }
//
// val showNonSponsoredSuggestionsPreference =
// requirePreference<SwitchPreference>(R.string.pref_key_show_nonsponsored_suggestions).apply {
// isChecked = context.settings().showNonSponsoredSuggestions
// title = getString(
// R.string.preferences_show_nonsponsored_suggestions,
// getString(R.string.app_name),
// )
// }
searchSuggestionsPreference.onPreferenceChangeListener = SharedPreferenceUpdater()
showHistorySuggestions.onPreferenceChangeListener = SharedPreferenceUpdater()
showBookmarkSuggestions.onPreferenceChangeListener = SharedPreferenceUpdater()
showSyncedTabsSuggestions.onPreferenceChangeListener = SharedPreferenceUpdater()
// showSyncedTabsSuggestions.onPreferenceChangeListener = SharedPreferenceUpdater()
showClipboardSuggestions.onPreferenceChangeListener = SharedPreferenceUpdater()
searchSuggestionsInPrivatePreference.onPreferenceChangeListener = SharedPreferenceUpdater()
showVoiceSearchPreference.onPreferenceChangeListener = object : Preference.OnPreferenceChangeListener {
......@@ -142,8 +142,8 @@ class SearchEngineFragment : PreferenceFragmentCompat() {
true
}
showSponsoredSuggestionsPreference.onPreferenceChangeListener = SharedPreferenceUpdater()
showNonSponsoredSuggestionsPreference.onPreferenceChangeListener = SharedPreferenceUpdater()
// showSponsoredSuggestionsPreference.onPreferenceChangeListener = SharedPreferenceUpdater()
// showNonSponsoredSuggestionsPreference.onPreferenceChangeListener = SharedPreferenceUpdater()
}
override fun onPreferenceTreeClick(preference: Preference): Boolean {
......
......
......@@ -395,7 +395,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
val shouldShowSyncedTabsSuggestions by booleanPreference(
appContext.getPreferenceKey(R.string.pref_key_search_synced_tabs),
default = true,
default = false,
)
val shouldShowClipboardSuggestions by booleanPreference(
......@@ -1939,7 +1939,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
var enableFxSuggest by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_enable_fxsuggest),
default = { FxNimbus.features.fxSuggest.value().enabled },
default = { false }, // { FxNimbus.features.fxSuggest.value().enabled },
featureFlag = FeatureFlags.fxSuggest,
)
......
......
......@@ -39,11 +39,42 @@
app:iconSpaceReserved="false" />
</PreferenceCategory>
<!-- <PreferenceCategory-->
<!-- android:title="@string/preference_search_address_bar_fx_suggest"-->
<!-- android:selectable="false"-->
<!-- app:iconSpaceReserved="false"-->
<!-- android:layout="@layout/preference_category_no_icon_style">-->
<!-- <SwitchPreference-->
<!-- app:iconSpaceReserved="false"-->
<!-- android:defaultValue="true"-->
<!-- android:key="@string/pref_key_search_synced_tabs"-->
<!-- android:title='@string/preferences_search_synced_tabs' />-->
<!-- <SwitchPreference-->
<!-- app:iconSpaceReserved="false"-->
<!-- android:key="@string/pref_key_show_nonsponsored_suggestions"-->
<!-- android:title="@string/preferences_show_nonsponsored_suggestions"-->
<!-- android:summary="@string/preferences_show_nonsponsored_suggestions_summary" />-->
<!-- <SwitchPreference-->
<!-- app:iconSpaceReserved="false"-->
<!-- android:key="@string/pref_key_show_sponsored_suggestions"-->
<!-- android:title="@string/preferences_show_sponsored_suggestions"-->
<!-- android:summary="@string/preferences_show_sponsored_suggestions_summary" />-->
<!-- <Preference-->
<!-- app:iconSpaceReserved="false"-->
<!-- android:key="@string/pref_key_learn_about_fx_suggest"-->
<!-- android:title="@string/preference_search_learn_about_fx_suggest" />-->
<!-- </PreferenceCategory>-->
<PreferenceCategory
android:title="@string/preference_search_address_bar_fx_suggest"
android:title="@string/preferences_settings_address_bar"
android:selectable="false"
app:iconSpaceReserved="false"
android:layout="@layout/preference_category_no_icon_style">
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
android:key="@string/pref_key_show_clipboard_suggestions"
android:title="@string/preferences_show_clipboard_suggestions" />
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
......@@ -54,37 +85,6 @@
android:defaultValue="true"
android:key="@string/pref_key_search_bookmarks"
android:title='@string/preferences_search_bookmarks' />
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
android:key="@string/pref_key_search_synced_tabs"
android:title='@string/preferences_search_synced_tabs' />
<SwitchPreference
app:iconSpaceReserved="false"
android:key="@string/pref_key_show_nonsponsored_suggestions"
android:title="@string/preferences_show_nonsponsored_suggestions"
android:summary="@string/preferences_show_nonsponsored_suggestions_summary" />
<SwitchPreference
app:iconSpaceReserved="false"
android:key="@string/pref_key_show_sponsored_suggestions"
android:title="@string/preferences_show_sponsored_suggestions"
android:summary="@string/preferences_show_sponsored_suggestions_summary" />
<Preference
app:iconSpaceReserved="false"
android:key="@string/pref_key_learn_about_fx_suggest"
android:title="@string/preference_search_learn_about_fx_suggest" />
</PreferenceCategory>
<PreferenceCategory
android:title="@string/preferences_settings_address_bar"
android:selectable="false"
app:iconSpaceReserved="false"
android:layout="@layout/preference_category_no_icon_style">
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
android:key="@string/pref_key_show_clipboard_suggestions"
android:title="@string/preferences_show_clipboard_suggestions" />
<SwitchPreference
app:iconSpaceReserved="false"
android:defaultValue="true"
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment