]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
Reorder domain settings entries. https://redmine.stoutner.com/issues/1011
authorSoren Stoutner <soren@stoutner.com>
Thu, 15 Jun 2023 19:40:00 +0000 (12:40 -0700)
committerSoren Stoutner <soren@stoutner.com>
Thu, 15 Jun 2023 19:40:00 +0000 (12:40 -0700)
14 files changed:
app/src/main/assets/de/about_changelog.html
app/src/main/assets/en/about_changelog.html
app/src/main/assets/es/about_changelog.html
app/src/main/assets/fr/about_changelog.html
app/src/main/assets/it/about_changelog.html
app/src/main/assets/pt-rBR/about_changelog.html
app/src/main/assets/ru/about_changelog.html
app/src/main/assets/tr/about_changelog.html
app/src/main/assets/zh-rCN/about_changelog.html
app/src/main/java/com/stoutner/privacybrowser/activities/DomainsActivity.kt
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.kt
app/src/main/java/com/stoutner/privacybrowser/fragments/DomainSettingsFragment.kt
app/src/main/java/com/stoutner/privacybrowser/helpers/DomainsDatabaseHelper.kt
app/src/main/res/layout/domain_settings_fragment.xml

index 3ce6ddd95a8e49faa254dc0be68a7951c52f7820..102b14cd5c2c20b2fe969f091a2d742584e49274 100644 (file)
@@ -33,8 +33,8 @@
     </head>
 
     <body>
-        <h3>3.15 (Version Code 70)</h3>
-        <p>12. Juni 2023 - Mindest-API 24, Ziel-API 33</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-android-3-15/">3.15</a> (Version Code 70)</h3>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=a424c7a4dd110995277c9f4753fecb21a4a4991a">12. Juni 2023</a> - Mindest-API 24, Ziel-API 33</p>
         <ul>
             <li>Reenable the <a href="https://redmine.stoutner.com/issues/1012">dark WebView theme</a> on Android 7-9 (API 24-28).</li>
             <li>Add a <a href="https://redmine.stoutner.com/issues/782">cancel action</a> to the Save URL snackbar.</li>
index 21045f2efeb34cb0cdb629d83cdbcc6ee2761d0f..1697f9a0bc39a0b802dcb8bd04d49e9d19a9d7e0 100644 (file)
@@ -27,8 +27,8 @@
     </head>
 
     <body>
-        <h3>3.15 (version code 70)</h3>
-        <p>12 June 2023 - minimum API 24, target API 33</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-android-3-15/">3.15</a> (version code 70)</h3>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=a424c7a4dd110995277c9f4753fecb21a4a4991a">12 June 2023</a> - minimum API 24, target API 33</p>
         <ul>
             <li>Reenable the <a href="https://redmine.stoutner.com/issues/1012">dark WebView theme</a> on Android 7-9 (API 24-28).</li>
             <li>Add a <a href="https://redmine.stoutner.com/issues/782">cancel action</a> to the Save URL snackbar.</li>
index fca1f0d5a8c8bfd0506d1b28c9f7c3a0c5b6ed70..59f9ca18b1b48d3aaf7bd3a6ea39fdd3cd2f43b4 100644 (file)
@@ -29,8 +29,8 @@
     </head>
 
     <body>
-        <h3>3.15 (código de versión 70)</h3>
-        <p>12 de junio de 2023 - API mínimo 24, API objetivo 33</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-android-3-15/">3.15</a> (código de versión 70)</h3>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=a424c7a4dd110995277c9f4753fecb21a4a4991a">12 de junio de 2023</a> - API mínimo 24, API objetivo 33</p>
         <ul>
             <li>Reactivar el <a href="https://redmine.stoutner.com/issues/1012">tema oscuro de WebView</a> en Android 7-9 (API 24-28).</li>
             <li>Añadir una <a href="https://redmine.stoutner.com/issues/782">acción de cancelación</a> a la snackbar Guardar URL.</li>
index 2a6f48e0beb6116251b812fa451dcc2da2d96ed8..beb68a27af31bad60763ecd6310fd59cd6b52c26 100644 (file)
@@ -29,8 +29,8 @@
     </head>
 
     <body>
-        <h3>3.15 (version du code 70)</h3>
-        <p>12 Juin 2023 - API minimale : 24, API optimale : 33</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-android-3-15/">3.15</a> (version du code 70)</h3>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=a424c7a4dd110995277c9f4753fecb21a4a4991a">12 Juin 2023</a> - API minimale : 24, API optimale : 33</p>
         <ul>
             <li>Reenable the <a href="https://redmine.stoutner.com/issues/1012">dark WebView theme</a> on Android 7-9 (API 24-28).</li>
             <li>Add a <a href="https://redmine.stoutner.com/issues/782">cancel action</a> to the Save URL snackbar.</li>
index 039134e283b64e17690385649a4a63cbcdb13264..57503437a9929055e36512977f671cdc57289849 100644 (file)
@@ -29,8 +29,8 @@
     </head>
 
     <body>
-        <h3>3.15 (versione codice 70)</h3>
-        <p>12 Giugno 2023 - minima API 24, target API 33</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-android-3-15/">3.15</a> (versione codice 70)</h3>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=a424c7a4dd110995277c9f4753fecb21a4a4991a">12 Giugno 2023</a> - minima API 24, target API 33</p>
         <ul>
             <li>Abilitato nuovamente il <a href="https://redmine.stoutner.com/issues/1012">tema scuro di WebView</a> su Android 7-9 (API 24-28).</li>
             <li>Aggiunta l'<a href="https://redmine.stoutner.com/issues/782">azione di annullamento</a> nella snackbar per il salvataggio delle URL.</li>
index 9613036a9daeb3f2341dbfbc2ecd4b50d61d55cc..56a9769cd92745713de7aab7acacb2c1e52a48a3 100644 (file)
@@ -29,8 +29,8 @@
     </head>
 
     <body>
-        <h3>3.15 (código de versão 70)</h3>
-        <p>12 de junho de 2023 - minimum API 24, target API 33</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-android-3-15/">3.15</a> (código de versão 70)</h3>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=a424c7a4dd110995277c9f4753fecb21a4a4991a">12 de junho de 2023</a> - minimum API 24, target API 33</p>
         <ul>
             <li>Reenable the <a href="https://redmine.stoutner.com/issues/1012">dark WebView theme</a> on Android 7-9 (API 24-28).</li>
             <li>Add a <a href="https://redmine.stoutner.com/issues/782">cancel action</a> to the Save URL snackbar.</li>
index c5d195bcc1fc526b124069b00f411ecc0f6ad6b9..bb5a4fcd91606f79871c3c71e40c176e8cb348f6 100644 (file)
@@ -27,8 +27,8 @@
     </head>
 
     <body>
-        <h3>3.15 (код версии 70)</h3>
-        <p>12 июля 2023 года - минимальный API 24, целевой API 33</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-android-3-15/">3.15</a> (код версии 70)</h3>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=a424c7a4dd110995277c9f4753fecb21a4a4991a">12 июля 2023 года</a> - минимальный API 24, целевой API 33</p>
         <ul>
             <li>На Android 7-9 (API 24-28) повторно включена <a href="https://redmine.stoutner.com/issues/1012">темная тема WebView</a>.</li>
             <li>На панель сохранения URL добавлена возможность <a href="https://redmine.stoutner.com/issues/782">отмены действия</a>.</li>
index 94699accea44aaf91266f9a4edae3b0eaf2059b7..4127a74ef3063a044564027e3c75f141e46f7f0d 100644 (file)
@@ -27,8 +27,8 @@
     </head>
 
     <body>
-        <h3>3.15 (version code 70)</h3>
-        <p>12 Haziran 2023 - minimum API 24, target API 33</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-android-3-15/">3.15</a> (version code 70)</h3>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=a424c7a4dd110995277c9f4753fecb21a4a4991a">12 Haziran 2023</a> - minimum API 24, target API 33</p>
         <ul>
             <li>Reenable the <a href="https://redmine.stoutner.com/issues/1012">dark WebView theme</a> on Android 7-9 (API 24-28).</li>
             <li>Add a <a href="https://redmine.stoutner.com/issues/782">cancel action</a> to the Save URL snackbar.</li>
index accef3279ce508f070c3cd6241aefd5458355c07..e22454a5ec8f9d919a388ccaf912db31ebd7fcb0 100644 (file)
@@ -29,8 +29,8 @@
     </head>
 
     <body>
-        <h3>3.15 (version code 70)</h3>
-        <p>12 June 2023 - 最低支持API 24, 最高支持API 33</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-android-3-15/">3.15</a> (version code 70)</h3>
+        <p><a href="https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=commitdiff;h=a424c7a4dd110995277c9f4753fecb21a4a4991a">12 June 2023</a> - 最低支持API 24, 最高支持API 33</p>
         <ul>
             <li>Reenable the <a href="https://redmine.stoutner.com/issues/1012">dark WebView theme</a> on Android 7-9 (API 24-28).</li>
             <li>Add a <a href="https://redmine.stoutner.com/issues/782">cancel action</a> to the Save URL snackbar.</li>
index 5c5107c59fec21f544bad07de558ed734bd2ba6b..473be992cdb59e9f27d8e3f8eb3410310052e02e 100644 (file)
@@ -698,6 +698,8 @@ class DomainsActivity : AppCompatActivity(), AddDomainListener, DismissSnackbarI
         val cookiesSpinner = view.findViewById<Spinner>(R.id.cookies_spinner)
         val domStorageSpinner = view.findViewById<Spinner>(R.id.dom_storage_spinner)
         val formDataSpinner = view.findViewById<Spinner>(R.id.form_data_spinner) // Form data can be removed once the minimum API >= 26.
+        val userAgentSpinner = view.findViewById<Spinner>(R.id.user_agent_spinner)
+        val customUserAgentEditText = view.findViewById<EditText>(R.id.custom_user_agent_edittext)
         val easyListSpinner = view.findViewById<Spinner>(R.id.easylist_spinner)
         val easyPrivacySpinner = view.findViewById<Spinner>(R.id.easyprivacy_spinner)
         val fanboysAnnoyanceSpinner = view.findViewById<Spinner>(R.id.fanboys_annoyance_list_spinner)
@@ -705,8 +707,6 @@ class DomainsActivity : AppCompatActivity(), AddDomainListener, DismissSnackbarI
         val ultraListSpinner = view.findViewById<Spinner>(R.id.ultralist_spinner)
         val ultraPrivacySpinner = view.findViewById<Spinner>(R.id.ultraprivacy_spinner)
         val blockAllThirdPartyRequestsSpinner = view.findViewById<Spinner>(R.id.block_all_third_party_requests_spinner)
-        val userAgentSpinner = view.findViewById<Spinner>(R.id.user_agent_spinner)
-        val customUserAgentEditText = view.findViewById<EditText>(R.id.custom_user_agent_edittext)
         val fontSizeSpinner = view.findViewById<Spinner>(R.id.font_size_spinner)
         val customFontSizeEditText = view.findViewById<EditText>(R.id.custom_font_size_edittext)
         val swipeToRefreshSpinner = view.findViewById<Spinner>(R.id.swipe_to_refresh_spinner)
@@ -724,6 +724,7 @@ class DomainsActivity : AppCompatActivity(), AddDomainListener, DismissSnackbarI
         val cookiesInt = cookiesSpinner.selectedItemPosition
         val domStorageInt = domStorageSpinner.selectedItemPosition
         val formDataInt = formDataSpinner.selectedItemPosition // Form data can be removed once the minimum API >= 26.
+        val userAgentSwitchPosition = userAgentSpinner.selectedItemPosition
         val easyListInt = easyListSpinner.selectedItemPosition
         val easyPrivacyInt = easyPrivacySpinner.selectedItemPosition
         val fanboysAnnoyanceInt = fanboysAnnoyanceSpinner.selectedItemPosition
@@ -731,7 +732,6 @@ class DomainsActivity : AppCompatActivity(), AddDomainListener, DismissSnackbarI
         val ultraListInt = ultraListSpinner.selectedItemPosition
         val ultraPrivacyInt = ultraPrivacySpinner.selectedItemPosition
         val blockAllThirdPartyRequestsInt = blockAllThirdPartyRequestsSpinner.selectedItemPosition
-        val userAgentSwitchPosition = userAgentSpinner.selectedItemPosition
         val fontSizeSwitchPosition = fontSizeSpinner.selectedItemPosition
         val swipeToRefreshInt = swipeToRefreshSpinner.selectedItemPosition
         val webViewThemeInt = webViewThemeSpinner.selectedItemPosition
@@ -765,8 +765,8 @@ class DomainsActivity : AppCompatActivity(), AddDomainListener, DismissSnackbarI
             fontSizeInt = customFontSizeEditText.text.toString().toInt()
 
         // Save the domain settings.
-        domainsDatabaseHelper.updateDomain(currentDomainDatabaseId, domainNameString, javaScriptInt, cookiesInt, domStorageInt, formDataInt, easyListInt, easyPrivacyInt, fanboysAnnoyanceInt,
-            fanboysSocialBlockingInt, ultraListInt, ultraPrivacyInt, blockAllThirdPartyRequestsInt, userAgentName, fontSizeInt, swipeToRefreshInt, webViewThemeInt, wideViewportInt, displayWebpageImagesInt,
+        domainsDatabaseHelper.updateDomain(currentDomainDatabaseId, domainNameString, javaScriptInt, cookiesInt, domStorageInt, formDataInt, userAgentName, easyListInt, easyPrivacyInt, fanboysAnnoyanceInt,
+            fanboysSocialBlockingInt, ultraListInt, ultraPrivacyInt, blockAllThirdPartyRequestsInt, fontSizeInt, swipeToRefreshInt, webViewThemeInt, wideViewportInt, displayWebpageImagesInt,
             pinnedSslCertificate, pinnedIpAddress)
 
         // Update the pinned SSL certificate if a new one is checked.
index d586dddd77d6cc195468b122a5d2010e553b8767..8fb1bc38900941cfceedfbcd400f160bb12f6138 100644 (file)
@@ -53,7 +53,6 @@ import android.provider.OpenableColumns
 import android.text.Editable
 import android.text.TextWatcher
 import android.text.style.ForegroundColorSpan
-import android.util.Log
 import android.util.Patterns
 import android.util.TypedValue
 import android.view.ContextMenu
@@ -3978,8 +3977,6 @@ class MainWebViewActivity : AppCompatActivity(), CreateBookmarkDialog.CreateBook
             savedStateArrayList = null
             savedNestedScrollWebViewStateArrayList = null
 
-            Log.i("Tab", "Saved tab position:  $savedTabPosition")
-
             // Restore the selected tab position.
             if (savedTabPosition == 0) {  // The first tab is selected.
                 // Set the first page as the current WebView.
index 2687adc7870878c98243f2fae72555364c2c8eef..2a9124a29e6b3511aa407d87e6902cb8c7dff211 100644 (file)
@@ -143,6 +143,8 @@ class DomainSettingsFragment : Fragment() {
         val cookiesDefault = sharedPreferences.getBoolean(getString(R.string.cookies_key), false)
         val domStorageDefault = sharedPreferences.getBoolean(getString(R.string.dom_storage_key), false)
         val formDataDefault = sharedPreferences.getBoolean(getString(R.string.save_form_data_key), false)  // The form data views can be remove once the minimum API >= 26.
+        val userAgentDefault = sharedPreferences.getString(getString(R.string.user_agent_key), getString(R.string.user_agent_default_value))
+        val customUserAgentStringDefault = sharedPreferences.getString(getString(R.string.custom_user_agent_key), getString(R.string.custom_user_agent_default_value))
         val easyListDefault = sharedPreferences.getBoolean(getString(R.string.easylist_key), true)
         val easyPrivacyDefault = sharedPreferences.getBoolean(getString(R.string.easyprivacy_key), true)
         val fanboysAnnoyanceListDefault = sharedPreferences.getBoolean(getString(R.string.fanboys_annoyance_list_key), true)
@@ -150,8 +152,6 @@ class DomainSettingsFragment : Fragment() {
         val ultraListDefault = sharedPreferences.getBoolean(getString(R.string.ultralist_key), true)
         val ultraPrivacyDefault = sharedPreferences.getBoolean(getString(R.string.ultraprivacy_key), true)
         val blockAllThirdPartyRequestsDefault = sharedPreferences.getBoolean(getString(R.string.block_all_third_party_requests_key), false)
-        val userAgentDefault = sharedPreferences.getString(getString(R.string.user_agent_key), getString(R.string.user_agent_default_value))
-        val customUserAgentStringDefault = sharedPreferences.getString(getString(R.string.custom_user_agent_key), getString(R.string.custom_user_agent_default_value))
         val fontSizeStringDefault = sharedPreferences.getString(getString(R.string.font_size_key), getString(R.string.font_size_default_value))
         val swipeToRefreshDefault = sharedPreferences.getBoolean(getString(R.string.swipe_to_refresh_key), true)
         val webViewThemeDefault = sharedPreferences.getString(getString(R.string.webview_theme_key), getString(R.string.webview_theme_default_value))
@@ -177,6 +177,10 @@ class DomainSettingsFragment : Fragment() {
         val formDataImageView = domainSettingsView.findViewById<ImageView>(R.id.form_data_imageview)  // The form data views can be remove once the minimum API >= 26.
         val formDataSpinner = domainSettingsView.findViewById<Spinner>(R.id.form_data_spinner)  // The form data views can be remove once the minimum API >= 26.
         val formDataTextView = domainSettingsView.findViewById<TextView>(R.id.form_data_textview)  // The form data views can be remove once the minimum API >= 26.
+        val userAgentLinearLayout = domainSettingsView.findViewById<LinearLayout>(R.id.user_agent_linearlayout)
+        val userAgentSpinner = domainSettingsView.findViewById<Spinner>(R.id.user_agent_spinner)
+        val userAgentTextView = domainSettingsView.findViewById<TextView>(R.id.user_agent_textview)
+        val customUserAgentEditText = domainSettingsView.findViewById<EditText>(R.id.custom_user_agent_edittext)
         val easyListLinearLayout = domainSettingsView.findViewById<LinearLayout>(R.id.easylist_linearlayout)
         val easyListImageView = domainSettingsView.findViewById<ImageView>(R.id.easylist_imageview)
         val easyListSpinner = domainSettingsView.findViewById<Spinner>(R.id.easylist_spinner)
@@ -205,10 +209,6 @@ class DomainSettingsFragment : Fragment() {
         val blockAllThirdPartyRequestsImageView = domainSettingsView.findViewById<ImageView>(R.id.block_all_third_party_requests_imageview)
         val blockAllThirdPartyRequestsSpinner = domainSettingsView.findViewById<Spinner>(R.id.block_all_third_party_requests_spinner)
         val blockAllThirdPartyRequestsTextView = domainSettingsView.findViewById<TextView>(R.id.block_all_third_party_requests_textview)
-        val userAgentLinearLayout = domainSettingsView.findViewById<LinearLayout>(R.id.user_agent_linearlayout)
-        val userAgentSpinner = domainSettingsView.findViewById<Spinner>(R.id.user_agent_spinner)
-        val userAgentTextView = domainSettingsView.findViewById<TextView>(R.id.user_agent_textview)
-        val customUserAgentEditText = domainSettingsView.findViewById<EditText>(R.id.custom_user_agent_edittext)
         val fontSizeLinearLayout = domainSettingsView.findViewById<LinearLayout>(R.id.font_size_linearlayout)
         val fontSizeSpinner = domainSettingsView.findViewById<Spinner>(R.id.font_size_spinner)
         val defaultFontSizeTextView = domainSettingsView.findViewById<TextView>(R.id.default_font_size_textview)
@@ -284,6 +284,7 @@ class DomainSettingsFragment : Fragment() {
         val cookiesInt = domainCursor.getInt(domainCursor.getColumnIndexOrThrow(COOKIES))
         val domStorageInt = domainCursor.getInt(domainCursor.getColumnIndexOrThrow(ENABLE_DOM_STORAGE))
         val formDataInt = domainCursor.getInt(domainCursor.getColumnIndexOrThrow(ENABLE_FORM_DATA))  // Form data can be remove once the minimum API >= 26.
+        val currentUserAgentName = domainCursor.getString(domainCursor.getColumnIndexOrThrow(USER_AGENT))
         val easyListInt = domainCursor.getInt(domainCursor.getColumnIndexOrThrow(ENABLE_EASYLIST))
         val easyPrivacyInt = domainCursor.getInt(domainCursor.getColumnIndexOrThrow(ENABLE_EASYPRIVACY))
         val fanboysAnnoyanceListInt = domainCursor.getInt(domainCursor.getColumnIndexOrThrow(ENABLE_FANBOYS_ANNOYANCE_LIST))
@@ -291,7 +292,6 @@ class DomainSettingsFragment : Fragment() {
         val ultraListInt = domainCursor.getInt(domainCursor.getColumnIndexOrThrow(ULTRALIST))
         val ultraPrivacyInt = domainCursor.getInt(domainCursor.getColumnIndexOrThrow(ENABLE_ULTRAPRIVACY))
         val blockAllThirdPartyRequestsInt = domainCursor.getInt(domainCursor.getColumnIndexOrThrow(BLOCK_ALL_THIRD_PARTY_REQUESTS))
-        val currentUserAgentName = domainCursor.getString(domainCursor.getColumnIndexOrThrow(USER_AGENT))
         val fontSizeInt = domainCursor.getInt(domainCursor.getColumnIndexOrThrow(FONT_SIZE))
         val swipeToRefreshInt = domainCursor.getInt(domainCursor.getColumnIndexOrThrow(SWIPE_TO_REFRESH))
         val webViewThemeInt = domainCursor.getInt(domainCursor.getColumnIndexOrThrow(WEBVIEW_THEME))
@@ -317,6 +317,7 @@ class DomainSettingsFragment : Fragment() {
         val cookiesArrayAdapter = ArrayAdapter.createFromResource(context, R.array.cookies_array, R.layout.spinner_item)
         val domStorageArrayAdapter = ArrayAdapter.createFromResource(context, R.array.dom_storage_array, R.layout.spinner_item)
         val formDataArrayAdapter = ArrayAdapter.createFromResource(context, R.array.form_data_array, R.layout.spinner_item)  // Form data can be remove once the minimum API >= 26.
+        val translatedUserAgentArrayAdapter = ArrayAdapter.createFromResource(context, R.array.translated_domain_settings_user_agent_names, R.layout.spinner_item)
         val easyListArrayAdapter = ArrayAdapter.createFromResource(context, R.array.easylist_array, R.layout.spinner_item)
         val easyPrivacyArrayAdapter = ArrayAdapter.createFromResource(context, R.array.easyprivacy_array, R.layout.spinner_item)
         val fanboysAnnoyanceListArrayAdapter = ArrayAdapter.createFromResource(context, R.array.fanboys_annoyance_list_array, R.layout.spinner_item)
@@ -324,7 +325,6 @@ class DomainSettingsFragment : Fragment() {
         val ultraListArrayAdapter = ArrayAdapter.createFromResource(context, R.array.ultralist_array, R.layout.spinner_item)
         val ultraPrivacyArrayAdapter = ArrayAdapter.createFromResource(context, R.array.ultraprivacy_array, R.layout.spinner_item)
         val blockAllThirdPartyRequestsArrayAdapter = ArrayAdapter.createFromResource(context, R.array.block_all_third_party_requests_array, R.layout.spinner_item)
-        val translatedUserAgentArrayAdapter = ArrayAdapter.createFromResource(context, R.array.translated_domain_settings_user_agent_names, R.layout.spinner_item)
         val fontSizeArrayAdapter = ArrayAdapter.createFromResource(context, R.array.font_size_array, R.layout.spinner_item)
         val swipeToRefreshArrayAdapter = ArrayAdapter.createFromResource(context, R.array.swipe_to_refresh_array, R.layout.spinner_item)
         val webViewThemeArrayAdapter = ArrayAdapter.createFromResource(context, R.array.webview_theme_array, R.layout.spinner_item)
@@ -336,6 +336,7 @@ class DomainSettingsFragment : Fragment() {
         cookiesArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
         domStorageArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
         formDataArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)  // Form data can be remove once the minimum API >= 26.
+        translatedUserAgentArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
         easyListArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
         easyPrivacyArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
         fanboysAnnoyanceListArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
@@ -343,7 +344,6 @@ class DomainSettingsFragment : Fragment() {
         ultraListArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
         ultraPrivacyArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
         blockAllThirdPartyRequestsArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
-        translatedUserAgentArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
         fontSizeArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
         swipeToRefreshArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
         webViewThemeArrayAdapter.setDropDownViewResource(R.layout.domain_settings_spinner_dropdown_items)
@@ -355,6 +355,7 @@ class DomainSettingsFragment : Fragment() {
         cookiesSpinner.adapter = cookiesArrayAdapter
         domStorageSpinner.adapter = domStorageArrayAdapter
         formDataSpinner.adapter = formDataArrayAdapter  // Form data can be remove once the minimum API >= 26.
+        userAgentSpinner.adapter = translatedUserAgentArrayAdapter
         easyListSpinner.adapter = easyListArrayAdapter
         easyPrivacySpinner.adapter = easyPrivacyArrayAdapter
         fanboysAnnoyanceListSpinner.adapter = fanboysAnnoyanceListArrayAdapter
@@ -362,7 +363,6 @@ class DomainSettingsFragment : Fragment() {
         ultraListSpinner.adapter = ultraListArrayAdapter
         ultraPrivacySpinner.adapter = ultraPrivacyArrayAdapter
         blockAllThirdPartyRequestsSpinner.adapter = blockAllThirdPartyRequestsArrayAdapter
-        userAgentSpinner.adapter = translatedUserAgentArrayAdapter
         fontSizeSpinner.adapter = fontSizeArrayAdapter
         swipeToRefreshSpinner.adapter = swipeToRefreshArrayAdapter
         webViewThemeSpinner.adapter = webViewThemeArrayAdapter
@@ -373,7 +373,8 @@ class DomainSettingsFragment : Fragment() {
         javaScriptTextView.setOnClickListener { javaScriptSpinner.performClick() }
         cookiesTextView.setOnClickListener { cookiesSpinner.performClick() }
         domStorageTextView.setOnClickListener { domStorageSpinner.performClick() }
-        formDataTextView.setOnClickListener { formDataSpinner.performClick() }
+        formDataTextView.setOnClickListener { formDataSpinner.performClick() }  // Form data can be remove once the minimum API >= 26.
+        userAgentTextView.setOnClickListener { userAgentSpinner.performClick() }
         easyListTextView.setOnClickListener { easyListSpinner.performClick() }
         easyPrivacyTextView.setOnClickListener { easyPrivacySpinner.performClick() }
         fanboysAnnoyanceListTextView.setOnClickListener { fanboysAnnoyanceListSpinner.performClick() }
@@ -381,7 +382,6 @@ class DomainSettingsFragment : Fragment() {
         ultraListTextView.setOnClickListener { ultraListSpinner.performClick() }
         ultraPrivacyTextView.setOnClickListener { ultraPrivacySpinner.performClick() }
         blockAllThirdPartyRequestsTextView.setOnClickListener { blockAllThirdPartyRequestsSpinner.performClick() }
-        userAgentTextView.setOnClickListener { userAgentSpinner.performClick() }
         defaultFontSizeTextView.setOnClickListener { fontSizeSpinner.performClick() }
         swipeToRefreshTextView.setOnClickListener { swipeToRefreshSpinner.performClick() }
         webViewThemeTextView.setOnClickListener { webViewThemeSpinner.performClick() }
@@ -555,17 +555,6 @@ class DomainSettingsFragment : Fragment() {
         domStorageImageView.isEnabled = javaScriptEnabled
 
 
-        // Calculate if Fanboy's Annoyance List is enabled, either because it is the system default and that default is enabled, or because it is explicitly set to be enabled for this domain.
-        val fanboysAnnoyanceListEnabled = (((fanboysAnnoyanceListInt == 0) && fanboysAnnoyanceListDefault) || (fanboysAnnoyanceListInt == 1))
-
-        // Set Fanboy's Social Blocking List spinner and text view status based on the Annoyance List status.
-        fanboysSocialBlockingListSpinner.isEnabled = !fanboysAnnoyanceListEnabled
-        fanboysSocialBlockingListTextView.isEnabled = !fanboysAnnoyanceListEnabled
-
-        // Set the Social Blocking List icon ghosted status based on the Annoyance List status.
-        fanboysSocialBlockingListImageView.isEnabled = !fanboysAnnoyanceListEnabled
-
-
         // Inflated a WebView to get the default user agent.
         // `@SuppressLint("InflateParams")` removes the warning about using `null` as the `ViewGroup`, which in this case makes sense because the bare WebView should not be displayed on the screen.
         @SuppressLint("InflateParams") val bareWebViewLayout = inflater.inflate(R.layout.bare_webview, null, false)
@@ -643,6 +632,17 @@ class DomainSettingsFragment : Fragment() {
         }
 
 
+        // Calculate if Fanboy's Annoyance List is enabled, either because it is the system default and that default is enabled, or because it is explicitly set to be enabled for this domain.
+        val fanboysAnnoyanceListEnabled = (((fanboysAnnoyanceListInt == 0) && fanboysAnnoyanceListDefault) || (fanboysAnnoyanceListInt == 1))
+
+        // Set Fanboy's Social Blocking List spinner and text view status based on the Annoyance List status.
+        fanboysSocialBlockingListSpinner.isEnabled = !fanboysAnnoyanceListEnabled
+        fanboysSocialBlockingListTextView.isEnabled = !fanboysAnnoyanceListEnabled
+
+        // Set the Social Blocking List icon ghosted status based on the Annoyance List status.
+        fanboysSocialBlockingListImageView.isEnabled = !fanboysAnnoyanceListEnabled
+
+
         // Display the font size settings.
         if (fontSizeInt == SYSTEM_DEFAULT) {  // `0` is the code for system default font size.
             // Set the font size to the system default.
@@ -1073,6 +1073,86 @@ class DomainSettingsFragment : Fragment() {
             }
         }
 
+        // Set the user agent spinner listener.
+        userAgentSpinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
+            override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
+                // Set the new user agent.
+                when (position) {
+                    DOMAINS_SYSTEM_DEFAULT_USER_AGENT -> {
+                        // Show the user agent text view.
+                        userAgentTextView.visibility = View.VISIBLE
+
+                        // Hide the custom user agent edit text.
+                        customUserAgentEditText.visibility = View.GONE
+
+                        // Set the user text.
+                        when (defaultUserAgentArrayPosition) {
+                            // This is probably because it was set in an older version of Privacy Browser before the switch to persistent user agent names.
+                            UNRECOGNIZED_USER_AGENT -> userAgentTextView.text = userAgentDefault
+
+                            // Display the `WebView` default user agent.
+                            SETTINGS_WEBVIEW_DEFAULT_USER_AGENT -> userAgentTextView.text = webViewDefaultUserAgentString
+
+                            // Display the custom user agent.
+                            SETTINGS_CUSTOM_USER_AGENT -> userAgentTextView.text = customUserAgentStringDefault
+
+                            // Get the user agent string from the user agent data array.
+                            else -> userAgentTextView.text = userAgentDataArray[defaultUserAgentArrayPosition]
+                        }
+
+                        // Set the background color to be transparent.
+                        userAgentLinearLayout.setBackgroundColor(getColor(context, R.color.transparent))
+                    }
+
+                    DOMAINS_WEBVIEW_DEFAULT_USER_AGENT -> {
+                        // Show the user agent text view.
+                        userAgentTextView.visibility = View.VISIBLE
+
+                        // Set the user agent text.
+                        userAgentTextView.text = webViewDefaultUserAgentString
+
+                        // Hide the custom user agent edit text.
+                        customUserAgentEditText.visibility = View.GONE
+
+                        // Set the background color to be blue.
+                        userAgentLinearLayout.setBackgroundColor(getColor(context, R.color.blue_background))
+                    }
+
+                    DOMAINS_CUSTOM_USER_AGENT -> {
+                        // Hide the user agent text view.
+                        userAgentTextView.visibility = View.GONE
+
+                        // Show the custom user agent edit text.
+                        customUserAgentEditText.visibility = View.VISIBLE
+
+                        // Set the current user agent name as the text.
+                        customUserAgentEditText.setText(currentUserAgentName)
+
+                        // Set the background color to be blue.
+                        userAgentLinearLayout.setBackgroundColor(getColor(context, R.color.blue_background))
+                    }
+
+                    else -> {
+                        // Show the user agent text view.
+                        userAgentTextView.visibility = View.VISIBLE
+
+                        // Set the text from the user agent data array, which has one less entry than the spinner, so the position must be decremented.
+                        userAgentTextView.text = userAgentDataArray[position - 1]
+
+                        // Hide the custom user agent edit text.
+                        customUserAgentEditText.visibility = View.GONE
+
+                        // Set the background color to be blue.
+                        userAgentLinearLayout.setBackgroundColor(getColor(context, R.color.blue_background))
+                    }
+                }
+            }
+
+            override fun onNothingSelected(parent: AdapterView<*>?) {
+                // Do nothing.
+            }
+        }
+
         // Set the EasyList spinner listener.
         easyListSpinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
             override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
@@ -1167,86 +1247,6 @@ class DomainSettingsFragment : Fragment() {
             }
         }
 
-        // Set the user agent spinner listener.
-        userAgentSpinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
-            override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
-                // Set the new user agent.
-                when (position) {
-                    DOMAINS_SYSTEM_DEFAULT_USER_AGENT -> {
-                        // Show the user agent text view.
-                        userAgentTextView.visibility = View.VISIBLE
-
-                        // Hide the custom user agent edit text.
-                        customUserAgentEditText.visibility = View.GONE
-
-                        // Set the user text.
-                        when (defaultUserAgentArrayPosition) {
-                            // This is probably because it was set in an older version of Privacy Browser before the switch to persistent user agent names.
-                            UNRECOGNIZED_USER_AGENT -> userAgentTextView.text = userAgentDefault
-
-                            // Display the `WebView` default user agent.
-                            SETTINGS_WEBVIEW_DEFAULT_USER_AGENT -> userAgentTextView.text = webViewDefaultUserAgentString
-
-                            // Display the custom user agent.
-                            SETTINGS_CUSTOM_USER_AGENT -> userAgentTextView.text = customUserAgentStringDefault
-
-                            // Get the user agent string from the user agent data array.
-                            else -> userAgentTextView.text = userAgentDataArray[defaultUserAgentArrayPosition]
-                        }
-
-                        // Set the background color to be transparent.
-                        userAgentLinearLayout.setBackgroundColor(getColor(context, R.color.transparent))
-                    }
-
-                    DOMAINS_WEBVIEW_DEFAULT_USER_AGENT -> {
-                        // Show the user agent text view.
-                        userAgentTextView.visibility = View.VISIBLE
-
-                        // Set the user agent text.
-                        userAgentTextView.text = webViewDefaultUserAgentString
-
-                        // Hide the custom user agent edit text.
-                        customUserAgentEditText.visibility = View.GONE
-
-                        // Set the background color to be blue.
-                        userAgentLinearLayout.setBackgroundColor(getColor(context, R.color.blue_background))
-                    }
-
-                    DOMAINS_CUSTOM_USER_AGENT -> {
-                        // Hide the user agent text view.
-                        userAgentTextView.visibility = View.GONE
-
-                        // Show the custom user agent edit text.
-                        customUserAgentEditText.visibility = View.VISIBLE
-
-                        // Set the current user agent name as the text.
-                        customUserAgentEditText.setText(currentUserAgentName)
-
-                        // Set the background color to be blue.
-                        userAgentLinearLayout.setBackgroundColor(getColor(context, R.color.blue_background))
-                    }
-
-                    else -> {
-                        // Show the user agent text view.
-                        userAgentTextView.visibility = View.VISIBLE
-
-                        // Set the text from the user agent data array, which has one less entry than the spinner, so the position must be decremented.
-                        userAgentTextView.text = userAgentDataArray[position - 1]
-
-                        // Hide the custom user agent edit text.
-                        customUserAgentEditText.visibility = View.GONE
-
-                        // Set the background color to be blue.
-                        userAgentLinearLayout.setBackgroundColor(getColor(context, R.color.blue_background))
-                    }
-                }
-            }
-
-            override fun onNothingSelected(parent: AdapterView<*>?) {
-                // Do nothing.
-            }
-        }
-
         // Set the font size spinner listener.
         fontSizeSpinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
             override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
index d7270a2a8b8446f363b59fa1ef59292df87ad991..c48315a21ebb2f7850d7b73d8146f6890b0377a8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2017-2023 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2017-2023 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
  *
@@ -84,6 +84,7 @@ const val CREATE_DOMAINS_TABLE = "CREATE TABLE $DOMAINS_TABLE (" +
         "$COOKIES INTEGER, " +
         "$ENABLE_DOM_STORAGE INTEGER, " +
         "$ENABLE_FORM_DATA INTEGER, " +
+        "$USER_AGENT TEXT, " +
         "$ENABLE_EASYLIST INTEGER, " +
         "$ENABLE_EASYPRIVACY INTEGER, " +
         "$ENABLE_FANBOYS_ANNOYANCE_LIST INTEGER, " +
@@ -91,7 +92,6 @@ const val CREATE_DOMAINS_TABLE = "CREATE TABLE $DOMAINS_TABLE (" +
         "$ULTRALIST INTEGER, " +
         "$ENABLE_ULTRAPRIVACY INTEGER, " +
         "$BLOCK_ALL_THIRD_PARTY_REQUESTS INTEGER, " +
-        "$USER_AGENT TEXT, " +
         "$FONT_SIZE INTEGER, " +
         "$SWIPE_TO_REFRESH INTEGER, " +
         "$WEBVIEW_THEME INTEGER, " +
@@ -423,6 +423,7 @@ class DomainsDatabaseHelper(private val appContext: Context) : SQLiteOpenHelper(
         domainContentValues.put(COOKIES, cookies)
         domainContentValues.put(ENABLE_DOM_STORAGE, domStorage)
         domainContentValues.put(ENABLE_FORM_DATA, saveFormData) // Form data can be removed once the minimum API >= 26.
+        domainContentValues.put(USER_AGENT, appContext.getString(R.string.system_default_user_agent))
         domainContentValues.put(ENABLE_EASYLIST, easyList)
         domainContentValues.put(ENABLE_EASYPRIVACY, easyPrivacy)
         domainContentValues.put(ENABLE_FANBOYS_ANNOYANCE_LIST, fanboyAnnoyanceList)
@@ -430,7 +431,6 @@ class DomainsDatabaseHelper(private val appContext: Context) : SQLiteOpenHelper(
         domainContentValues.put(ULTRALIST, ultraList)
         domainContentValues.put(ENABLE_ULTRAPRIVACY, ultraPrivacy)
         domainContentValues.put(BLOCK_ALL_THIRD_PARTY_REQUESTS, blockAllThirdPartyRequests)
-        domainContentValues.put(USER_AGENT, appContext.getString(R.string.system_default_user_agent))
         domainContentValues.put(FONT_SIZE, 0)
         domainContentValues.put(SWIPE_TO_REFRESH, 0)
         domainContentValues.put(WEBVIEW_THEME, 0)
@@ -461,8 +461,8 @@ class DomainsDatabaseHelper(private val appContext: Context) : SQLiteOpenHelper(
         domainsDatabase.close()
     }
 
-    fun updateDomain(databaseId: Int, domainName: String, javaScript: Int, cookies: Int, domStorage: Int, formData: Int, easyList: Int, easyPrivacy: Int, fanboysAnnoyance: Int, fanboysSocialBlocking: Int,
-                     ultraList: Int, ultraPrivacy: Int, blockAllThirdPartyRequests: Int, userAgent: String, fontSize: Int, swipeToRefresh: Int, webViewTheme: Int, wideViewport: Int, displayImages: Int,
+    fun updateDomain(databaseId: Int, domainName: String, javaScript: Int, cookies: Int, domStorage: Int, formData: Int, userAgent: String, easyList: Int, easyPrivacy: Int, fanboysAnnoyance: Int,
+                     fanboysSocialBlocking: Int, ultraList: Int, ultraPrivacy: Int, blockAllThirdPartyRequests: Int, fontSize: Int, swipeToRefresh: Int, webViewTheme: Int, wideViewport: Int, displayImages: Int,
                      pinnedSslCertificate: Boolean, pinnedIpAddresses: Boolean) {
 
         // Instantiate a content values.
@@ -474,6 +474,7 @@ class DomainsDatabaseHelper(private val appContext: Context) : SQLiteOpenHelper(
         domainContentValues.put(COOKIES, cookies)
         domainContentValues.put(ENABLE_DOM_STORAGE, domStorage)
         domainContentValues.put(ENABLE_FORM_DATA, formData) // Form data can be removed once the minimum API >= 26.
+        domainContentValues.put(USER_AGENT, userAgent)
         domainContentValues.put(ENABLE_EASYLIST, easyList)
         domainContentValues.put(ENABLE_EASYPRIVACY, easyPrivacy)
         domainContentValues.put(ENABLE_FANBOYS_ANNOYANCE_LIST, fanboysAnnoyance)
@@ -481,7 +482,6 @@ class DomainsDatabaseHelper(private val appContext: Context) : SQLiteOpenHelper(
         domainContentValues.put(ULTRALIST, ultraList)
         domainContentValues.put(ENABLE_ULTRAPRIVACY, ultraPrivacy)
         domainContentValues.put(BLOCK_ALL_THIRD_PARTY_REQUESTS, blockAllThirdPartyRequests)
-        domainContentValues.put(USER_AGENT, userAgent)
         domainContentValues.put(FONT_SIZE, fontSize)
         domainContentValues.put(SWIPE_TO_REFRESH, swipeToRefresh)
         domainContentValues.put(WEBVIEW_THEME, webViewTheme)
index a519047839ac7a81a2369a8b3c4770ef1d723117..5b143b0ce3855313254bf82a22ea4a6de9ea90ed 100644 (file)
                 android:textSize="13sp" />
         </LinearLayout>
 
+        <!-- User Agent. -->
+        <LinearLayout
+            android:id="@+id/user_agent_linearlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:orientation="vertical"
+            android:padding="12dp" >
+
+            <TextView
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:text="@string/user_agent" />
+
+            <LinearLayout
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:orientation="horizontal" >
+
+                <ImageView
+                    android:layout_height="wrap_content"
+                    android:layout_width="wrap_content"
+                    android:layout_marginTop="1dp"
+                    android:layout_marginEnd="10dp"
+                    android:layout_gravity="center_vertical"
+                    android:src="@drawable/user_agent"
+                    app:tint="@color/blue_icon"
+                    android:contentDescription="@string/user_agent" />
+
+                <Spinner
+                    android:id="@+id/user_agent_spinner"
+                    android:layout_height="wrap_content"
+                    android:layout_width="match_parent" />
+            </LinearLayout>
+
+            <TextView
+                android:id="@+id/user_agent_textview"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:layout_marginStart="45dp"
+                android:layout_marginEnd="36dp"
+                android:textSize="13sp" />
+
+            <EditText
+                android:id="@+id/custom_user_agent_edittext"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:layout_marginStart="40dp"
+                android:layout_marginEnd="60dp"
+                android:inputType="textUri"
+                android:hint="@string/custom_user_agent"
+                android:importantForAutofill="no" />
+        </LinearLayout>
+
         <!-- EasyList. -->
         <LinearLayout
             android:id="@+id/easylist_linearlayout"
                 <Spinner
                     android:id="@+id/block_all_third_party_requests_spinner"
                     android:layout_height="wrap_content"
-                    android:layout_width="match_parent" />
+                    android:layout_width="match_parent"
+                    tools:ignore="TooManyViews" />
             </LinearLayout>
 
             <TextView
                 android:textSize="13sp" />
         </LinearLayout>
 
-        <!-- User Agent. -->
-        <LinearLayout
-            android:id="@+id/user_agent_linearlayout"
-            android:layout_height="wrap_content"
-            android:layout_width="match_parent"
-            android:orientation="vertical"
-            android:padding="12dp" >
-
-            <TextView
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:text="@string/user_agent" />
-
-            <LinearLayout
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:orientation="horizontal" >
-
-                <ImageView
-                    android:layout_height="wrap_content"
-                    android:layout_width="wrap_content"
-                    android:layout_marginTop="1dp"
-                    android:layout_marginEnd="10dp"
-                    android:layout_gravity="center_vertical"
-                    android:src="@drawable/user_agent"
-                    app:tint="@color/blue_icon"
-                    android:contentDescription="@string/user_agent" />
-
-                <Spinner
-                    android:id="@+id/user_agent_spinner"
-                    android:layout_height="wrap_content"
-                    android:layout_width="match_parent" />
-            </LinearLayout>
-
-            <TextView
-                android:id="@+id/user_agent_textview"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:layout_marginStart="45dp"
-                android:layout_marginEnd="36dp"
-                android:textSize="13sp" />
-
-            <EditText
-                android:id="@+id/custom_user_agent_edittext"
-                android:layout_height="wrap_content"
-                android:layout_width="match_parent"
-                android:layout_marginStart="40dp"
-                android:layout_marginEnd="60dp"
-                android:inputType="textUri"
-                android:hint="@string/custom_user_agent"
-                android:importantForAutofill="no" />
-        </LinearLayout>
-
         <!-- Font Size. -->
         <LinearLayout
             android:id="@+id/font_size_linearlayout"
             <TextView
                 android:layout_height="wrap_content"
                 android:layout_width="match_parent"
-                android:text="@string/swipe_to_refresh"
-                tools:ignore="TooManyViews" />
+                android:text="@string/swipe_to_refresh" />
 
             <LinearLayout
                 android:layout_height="wrap_content"