]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java
Update the URL in the copyright header. https://redmine.stoutner.com/issues/796
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / fragments / SettingsFragment.java
index a43e30bd82279d0b9689dbe20e0cd4015e8d3961..3e4e93ba1cef5edf5003275dfe4d8c0147f918de 100644 (file)
@@ -1,20 +1,20 @@
 /*
- * Copyright © 2016-2021 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2016-2022 Soren Stoutner <soren@stoutner.com>.
  *
- * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+ * This file is part of Privacy Browser Android <https://www.stoutner.com/privacy-browser-android>.
  *
- * Privacy Browser is free software: you can redistribute it and/or modify
+ * Privacy Browser Android is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation, either version 3 of the License, or
  * (at your option) any later version.
  *
- * Privacy Browser is distributed in the hope that it will be useful,
+ * Privacy Browser Android is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>.
+ * along with Privacy Browser Android.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 package com.stoutner.privacybrowser.fragments;
@@ -316,11 +316,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                 break;
 
             case ProxyHelper.TOR:
-                if (Build.VERSION.SDK_INT == 19) {  // Proxying through SOCKS doesn't work on Android KitKat.
-                    proxyPreference.setSummary(getString(R.string.tor_enabled_kitkat));
-                } else {
-                    proxyPreference.setSummary(getString(R.string.tor_enabled));
-                }
+                proxyPreference.setSummary(getString(R.string.tor_enabled));
                 break;
 
             case ProxyHelper.I2P:
@@ -403,20 +399,8 @@ public class SettingsFragment extends PreferenceFragmentCompat {
             webViewThemeEntryNumber = 0;
         }
 
-        // Set the visibility of the WebView theme preference.
-        if (Build.VERSION.SDK_INT < 21) {  // The device is running API 19.
-            // Get a handle for the general category.
-            PreferenceCategory generalCategory = findPreference("general");
-
-            // Remove the incorrect lint warning below that the general preference category might be null.
-            assert generalCategory != null;
-
-            // Remove the WebView theme preference.
-            generalCategory.removePreference(webViewThemePreference);
-        } else {  // The device is running API >= 21
-            // Set the current theme as the summary text for the preference.
-            webViewThemePreference.setSummary(webViewThemeEntriesStringArray[webViewThemeEntryNumber]);
-        }
+        // Set the current theme as the summary text for the preference.
+        webViewThemePreference.setSummary(webViewThemeEntriesStringArray[webViewThemeEntryNumber]);
 
 
         // Set the JavaScript icon.
@@ -1441,11 +1425,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                             break;
 
                         case ProxyHelper.TOR:
-                            if (Build.VERSION.SDK_INT == 19) {  // Proxying through SOCKS doesn't work on Android KitKat.
-                                proxyPreference.setSummary(context.getString(R.string.tor_enabled_kitkat));
-                            } else {
-                                proxyPreference.setSummary(context.getString(R.string.tor_enabled));
-                            }
+                            proxyPreference.setSummary(context.getString(R.string.tor_enabled));
                             break;
 
                         case ProxyHelper.I2P: