Pier Angelo Vendrame pushed to branch tor-browser-128.2.0esr-14.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
a1b5c671
by clairehurst at 2024-09-05T12:23:07+00:00
3 changed files:
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/search/SearchEngineFragment.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
- mobile/android/fenix/app/src/main/res/xml/search_settings_preferences.xml
Changes:
... | ... | @@ -34,15 +34,15 @@ class SearchEngineFragment : PreferenceFragmentCompat() { |
34 | 34 | rootKey,
|
35 | 35 | )
|
36 | 36 | |
37 | - requirePreference<SwitchPreference>(R.string.pref_key_show_sponsored_suggestions).apply {
|
|
38 | - isVisible = context.settings().enableFxSuggest
|
|
39 | - }
|
|
40 | - requirePreference<SwitchPreference>(R.string.pref_key_show_nonsponsored_suggestions).apply {
|
|
41 | - isVisible = context.settings().enableFxSuggest
|
|
42 | - }
|
|
43 | - requirePreference<Preference>(R.string.pref_key_learn_about_fx_suggest).apply {
|
|
44 | - isVisible = context.settings().enableFxSuggest
|
|
45 | - }
|
|
37 | +// requirePreference<SwitchPreference>(R.string.pref_key_show_sponsored_suggestions).apply {
|
|
38 | +// isVisible = context.settings().enableFxSuggest
|
|
39 | +// }
|
|
40 | +// requirePreference<SwitchPreference>(R.string.pref_key_show_nonsponsored_suggestions).apply {
|
|
41 | +// isVisible = context.settings().enableFxSuggest
|
|
42 | +// }
|
|
43 | +// requirePreference<Preference>(R.string.pref_key_learn_about_fx_suggest).apply {
|
|
44 | +// isVisible = context.settings().enableFxSuggest
|
|
45 | +// }
|
|
46 | 46 | |
47 | 47 | view?.hideKeyboard()
|
48 | 48 | }
|
... | ... | @@ -83,10 +83,10 @@ class SearchEngineFragment : PreferenceFragmentCompat() { |
83 | 83 | isChecked = context.settings().shouldShowBookmarkSuggestions
|
84 | 84 | }
|
85 | 85 | |
86 | - val showSyncedTabsSuggestions =
|
|
87 | - requirePreference<SwitchPreference>(R.string.pref_key_search_synced_tabs).apply {
|
|
88 | - isChecked = context.settings().shouldShowSyncedTabsSuggestions
|
|
89 | - }
|
|
86 | +// val showSyncedTabsSuggestions =
|
|
87 | +// requirePreference<SwitchPreference>(R.string.pref_key_search_synced_tabs).apply {
|
|
88 | +// isChecked = context.settings().shouldShowSyncedTabsSuggestions
|
|
89 | +// }
|
|
90 | 90 | |
91 | 91 | val showClipboardSuggestions =
|
92 | 92 | requirePreference<SwitchPreference>(R.string.pref_key_show_clipboard_suggestions).apply {
|
... | ... | @@ -98,28 +98,28 @@ class SearchEngineFragment : PreferenceFragmentCompat() { |
98 | 98 | isChecked = context.settings().shouldShowVoiceSearch
|
99 | 99 | }
|
100 | 100 | |
101 | - val showSponsoredSuggestionsPreference =
|
|
102 | - requirePreference<SwitchPreference>(R.string.pref_key_show_sponsored_suggestions).apply {
|
|
103 | - isChecked = context.settings().showSponsoredSuggestions
|
|
104 | - summary = getString(
|
|
105 | - R.string.preferences_show_sponsored_suggestions_summary,
|
|
106 | - getString(R.string.app_name),
|
|
107 | - )
|
|
108 | - }
|
|
109 | - |
|
110 | - val showNonSponsoredSuggestionsPreference =
|
|
111 | - requirePreference<SwitchPreference>(R.string.pref_key_show_nonsponsored_suggestions).apply {
|
|
112 | - isChecked = context.settings().showNonSponsoredSuggestions
|
|
113 | - title = getString(
|
|
114 | - R.string.preferences_show_nonsponsored_suggestions,
|
|
115 | - getString(R.string.app_name),
|
|
116 | - )
|
|
117 | - }
|
|
101 | +// val showSponsoredSuggestionsPreference =
|
|
102 | +// requirePreference<SwitchPreference>(R.string.pref_key_show_sponsored_suggestions).apply {
|
|
103 | +// isChecked = context.settings().showSponsoredSuggestions
|
|
104 | +// summary = getString(
|
|
105 | +// R.string.preferences_show_sponsored_suggestions_summary,
|
|
106 | +// getString(R.string.app_name),
|
|
107 | +// )
|
|
108 | +// }
|
|
109 | +//
|
|
110 | +// val showNonSponsoredSuggestionsPreference =
|
|
111 | +// requirePreference<SwitchPreference>(R.string.pref_key_show_nonsponsored_suggestions).apply {
|
|
112 | +// isChecked = context.settings().showNonSponsoredSuggestions
|
|
113 | +// title = getString(
|
|
114 | +// R.string.preferences_show_nonsponsored_suggestions,
|
|
115 | +// getString(R.string.app_name),
|
|
116 | +// )
|
|
117 | +// }
|
|
118 | 118 | |
119 | 119 | searchSuggestionsPreference.onPreferenceChangeListener = SharedPreferenceUpdater()
|
120 | 120 | showHistorySuggestions.onPreferenceChangeListener = SharedPreferenceUpdater()
|
121 | 121 | showBookmarkSuggestions.onPreferenceChangeListener = SharedPreferenceUpdater()
|
122 | - showSyncedTabsSuggestions.onPreferenceChangeListener = SharedPreferenceUpdater()
|
|
122 | +// showSyncedTabsSuggestions._onPreferenceChangeListener_ = SharedPreferenceUpdater()
|
|
123 | 123 | showClipboardSuggestions.onPreferenceChangeListener = SharedPreferenceUpdater()
|
124 | 124 | searchSuggestionsInPrivatePreference.onPreferenceChangeListener = SharedPreferenceUpdater()
|
125 | 125 | showVoiceSearchPreference.onPreferenceChangeListener = object : Preference.OnPreferenceChangeListener {
|
... | ... | @@ -142,8 +142,8 @@ class SearchEngineFragment : PreferenceFragmentCompat() { |
142 | 142 | true
|
143 | 143 | }
|
144 | 144 | |
145 | - showSponsoredSuggestionsPreference.onPreferenceChangeListener = SharedPreferenceUpdater()
|
|
146 | - showNonSponsoredSuggestionsPreference.onPreferenceChangeListener = SharedPreferenceUpdater()
|
|
145 | +// showSponsoredSuggestionsPreference._onPreferenceChangeListener_ = SharedPreferenceUpdater()
|
|
146 | +// showNonSponsoredSuggestionsPreference._onPreferenceChangeListener_ = SharedPreferenceUpdater()
|
|
147 | 147 | }
|
148 | 148 | |
149 | 149 | override fun onPreferenceTreeClick(preference: Preference): Boolean {
|
... | ... | @@ -428,7 +428,7 @@ class Settings(private val appContext: Context) : PreferencesHolder { |
428 | 428 | |
429 | 429 | val shouldShowSyncedTabsSuggestions by booleanPreference(
|
430 | 430 | appContext.getPreferenceKey(R.string.pref_key_search_synced_tabs),
|
431 | - default = true,
|
|
431 | + default = false,
|
|
432 | 432 | )
|
433 | 433 | |
434 | 434 | val shouldShowClipboardSuggestions by booleanPreference(
|
... | ... | @@ -2002,7 +2002,7 @@ class Settings(private val appContext: Context) : PreferencesHolder { |
2002 | 2002 | */
|
2003 | 2003 | var enableFxSuggest by lazyFeatureFlagPreference(
|
2004 | 2004 | key = appContext.getPreferenceKey(R.string.pref_key_enable_fxsuggest),
|
2005 | - default = { FxNimbus.features.fxSuggest.value().enabled },
|
|
2005 | + default = { false }, // { FxNimbus.features.fxSuggest.value().enabled },
|
|
2006 | 2006 | featureFlag = FeatureFlags.fxSuggest,
|
2007 | 2007 | )
|
2008 | 2008 |
... | ... | @@ -39,52 +39,52 @@ |
39 | 39 | app:iconSpaceReserved="false" />
|
40 | 40 | </PreferenceCategory>
|
41 | 41 | |
42 | +<!-- <PreferenceCategory-->
|
|
43 | +<!-- android:title="@string/preference_search_address_bar_fx_suggest"-->
|
|
44 | +<!-- android:selectable="false"-->
|
|
45 | +<!-- app:iconSpaceReserved="false"-->
|
|
46 | +<!-- android:layout="@layout/preference_category_no_icon_style">-->
|
|
47 | +<!-- <SwitchPreference-->
|
|
48 | +<!-- app:iconSpaceReserved="false"-->
|
|
49 | +<!-- android:defaultValue="true"-->
|
|
50 | +<!-- android:key="@string/pref_key_search_synced_tabs"-->
|
|
51 | +<!-- android:title='@string/preferences_search_synced_tabs' />-->
|
|
52 | +<!-- <SwitchPreference-->
|
|
53 | +<!-- app:iconSpaceReserved="false"-->
|
|
54 | +<!-- android:key="@string/pref_key_show_nonsponsored_suggestions"-->
|
|
55 | +<!-- android:title="@string/preferences_show_nonsponsored_suggestions"-->
|
|
56 | +<!-- android:summary="@string/preferences_show_nonsponsored_suggestions_summary" />-->
|
|
57 | +<!-- <SwitchPreference-->
|
|
58 | +<!-- app:iconSpaceReserved="false"-->
|
|
59 | +<!-- android:key="@string/pref_key_show_sponsored_suggestions"-->
|
|
60 | +<!-- android:title="@string/preferences_show_sponsored_suggestions"-->
|
|
61 | +<!-- android:summary="@string/preferences_show_sponsored_suggestions_summary" />-->
|
|
62 | +<!-- <Preference-->
|
|
63 | +<!-- app:iconSpaceReserved="false"-->
|
|
64 | +<!-- android:key="@string/pref_key_learn_about_fx_suggest"-->
|
|
65 | +<!-- android:title="@string/preference_search_learn_about_fx_suggest" />-->
|
|
66 | +<!-- </PreferenceCategory>-->
|
|
67 | + |
|
42 | 68 | <PreferenceCategory
|
43 | - android:title="@string/preference_search_address_bar_fx_suggest"
|
|
69 | + android:title="@string/preferences_settings_address_bar"
|
|
44 | 70 | android:selectable="false"
|
45 | 71 | app:iconSpaceReserved="false"
|
46 | 72 | android:layout="@layout/preference_category_no_icon_style">
|
47 | - <SwitchPreference
|
|
48 | - app:iconSpaceReserved="false"
|
|
49 | - android:defaultValue="true"
|
|
50 | - android:key="@string/pref_key_search_browsing_history"
|
|
51 | - android:title='@string/preferences_search_browsing_history' />
|
|
52 | 73 | <SwitchPreference
|
53 | 74 | app:iconSpaceReserved="false"
|
54 | 75 | android:defaultValue="true"
|
55 | - android:key="@string/pref_key_search_bookmarks"
|
|
56 | - android:title='@string/preferences_search_bookmarks' />
|
|
76 | + android:key="@string/pref_key_show_clipboard_suggestions"
|
|
77 | + android:title="@string/preferences_show_clipboard_suggestions" />
|
|
57 | 78 | <SwitchPreference
|
58 | 79 | app:iconSpaceReserved="false"
|
59 | 80 | android:defaultValue="true"
|
60 | - android:key="@string/pref_key_search_synced_tabs"
|
|
61 | - android:title='@string/preferences_search_synced_tabs' />
|
|
62 | - <SwitchPreference
|
|
63 | - app:iconSpaceReserved="false"
|
|
64 | - android:key="@string/pref_key_show_nonsponsored_suggestions"
|
|
65 | - android:title="@string/preferences_show_nonsponsored_suggestions"
|
|
66 | - android:summary="@string/preferences_show_nonsponsored_suggestions_summary" />
|
|
67 | - <SwitchPreference
|
|
68 | - app:iconSpaceReserved="false"
|
|
69 | - android:key="@string/pref_key_show_sponsored_suggestions"
|
|
70 | - android:title="@string/preferences_show_sponsored_suggestions"
|
|
71 | - android:summary="@string/preferences_show_sponsored_suggestions_summary" />
|
|
72 | - <Preference
|
|
73 | - app:iconSpaceReserved="false"
|
|
74 | - android:key="@string/pref_key_learn_about_fx_suggest"
|
|
75 | - android:title="@string/preference_search_learn_about_fx_suggest" />
|
|
76 | - </PreferenceCategory>
|
|
77 | - |
|
78 | - <PreferenceCategory
|
|
79 | - android:title="@string/preferences_settings_address_bar"
|
|
80 | - android:selectable="false"
|
|
81 | - app:iconSpaceReserved="false"
|
|
82 | - android:layout="@layout/preference_category_no_icon_style">
|
|
81 | + android:key="@string/pref_key_search_browsing_history"
|
|
82 | + android:title='@string/preferences_search_browsing_history' />
|
|
83 | 83 | <SwitchPreference
|
84 | 84 | app:iconSpaceReserved="false"
|
85 | 85 | android:defaultValue="true"
|
86 | - android:key="@string/pref_key_show_clipboard_suggestions"
|
|
87 | - android:title="@string/preferences_show_clipboard_suggestions" />
|
|
86 | + android:key="@string/pref_key_search_bookmarks"
|
|
87 | + android:title='@string/preferences_search_bookmarks' />
|
|
88 | 88 | <SwitchPreference
|
89 | 89 | app:iconSpaceReserved="false"
|
90 | 90 | android:defaultValue="true"
|