]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java
Replace Android's download manager. https://redmine.stoutner.com/issues/528
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / fragments / SettingsFragment.java
index 16ca2998ca88e379359534641808ae4f40bf4e3d..1d4dd164e4c3fa62810434bc6b23c2eb587332f8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2019 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2016-2020 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
  *
@@ -100,7 +100,6 @@ public class SettingsFragment extends PreferenceFragmentCompat {
         Preference swipeToRefreshPreference = findPreference("swipe_to_refresh");
         Preference scrollAppBarPreference = findPreference("scroll_app_bar");
         Preference displayAdditionalAppBarIconsPreference = findPreference("display_additional_app_bar_icons");
-        Preference downloadWithExternalAppPreference = findPreference("download_with_external_app");
         Preference darkThemePreference = findPreference("dark_theme");
         Preference nightModePreference = findPreference("night_mode");
         Preference wideViewportPreference = findPreference("wide_viewport");
@@ -144,7 +143,6 @@ public class SettingsFragment extends PreferenceFragmentCompat {
         assert swipeToRefreshPreference != null;
         assert scrollAppBarPreference != null;
         assert displayAdditionalAppBarIconsPreference != null;
-        assert downloadWithExternalAppPreference != null;
         assert darkThemePreference != null;
         assert nightModePreference != null;
         assert wideViewportPreference != null;
@@ -787,21 +785,6 @@ public class SettingsFragment extends PreferenceFragmentCompat {
             }
         }
 
-        // Set the download with external app preference icon.
-        if (savedPreferences.getBoolean("download_with_external_app", false)) {
-            if (darkTheme) {
-                downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_enabled_dark);
-            } else {
-                downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_enabled_light);
-            }
-        } else {
-            if (darkTheme) {
-                downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_disabled_dark);
-            } else {
-                downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_disabled_light);
-            }
-        }
-
         // Set the dark theme preference icon.
         if (savedPreferences.getBoolean("dark_theme", false)) {
             darkThemePreference.setIcon(R.drawable.theme_dark);
@@ -1685,23 +1668,6 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                     }
                     break;
 
-                case "download_with_external_app":
-                    // Update the icon.
-                    if (sharedPreferences.getBoolean("download_with_external_app", false)) {
-                        if (darkTheme) {
-                            downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_enabled_dark);
-                        } else {
-                            downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_enabled_light);
-                        }
-                    } else {
-                        if (darkTheme) {
-                            downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_disabled_dark);
-                        } else {
-                            downloadWithExternalAppPreference.setIcon(R.drawable.open_with_external_app_disabled_light);
-                        }
-                    }
-                    break;
-
                 case "dark_theme":
                     // Update the icon.
                     if (sharedPreferences.getBoolean("dark_theme", false)) {