Combine drawable files. https://redmine.stoutner.com/issues/794
authorSoren Stoutner <soren@stoutner.com>
Tue, 22 Feb 2022 18:52:05 +0000 (11:52 -0700)
committerSoren Stoutner <soren@stoutner.com>
Tue, 22 Feb 2022 18:52:05 +0000 (11:52 -0700)
313 files changed:
app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/BookmarksDatabaseViewActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/DomainsActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/MainWebViewActivity.java
app/src/main/java/com/stoutner/privacybrowser/adapters/PinnedMismatchPagerAdapter.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/AboutViewSourceDialog.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/AddDomainDialog.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/FontSizeDialog.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/HttpAuthenticationDialog.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/OpenDialog.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/PinnedMismatchDialog.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/ProxyNotInstalledDialog.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/SaveDialog.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/UntrustedSslCertificateDialog.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewRequestDialog.kt
app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewSslCertificateDialog.kt
app/src/main/java/com/stoutner/privacybrowser/fragments/DomainSettingsFragment.java
app/src/main/java/com/stoutner/privacybrowser/fragments/DomainsListFragment.java
app/src/main/java/com/stoutner/privacybrowser/fragments/SettingsFragment.java
app/src/main/res/drawable/about.xml [new file with mode: 0644]
app/src/main/res/drawable/about_blue.xml [new file with mode: 0644]
app/src/main/res/drawable/about_blue_day.xml [deleted file]
app/src/main/res/drawable/about_blue_night.xml [deleted file]
app/src/main/res/drawable/about_day.xml [deleted file]
app/src/main/res/drawable/about_night.xml [deleted file]
app/src/main/res/drawable/add.xml
app/src/main/res/drawable/allow_screenshots_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/allow_screenshots_disabled_day.xml [deleted file]
app/src/main/res/drawable/allow_screenshots_disabled_night.xml [deleted file]
app/src/main/res/drawable/allow_screenshots_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/allow_screenshots_enabled_day.xml [deleted file]
app/src/main/res/drawable/allow_screenshots_enabled_night.xml [deleted file]
app/src/main/res/drawable/app_bar_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/app_bar_disabled_day.xml [deleted file]
app/src/main/res/drawable/app_bar_disabled_night.xml [deleted file]
app/src/main/res/drawable/app_bar_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/app_bar_enabled_day.xml [deleted file]
app/src/main/res/drawable/app_bar_enabled_night.xml [deleted file]
app/src/main/res/drawable/app_bar_ghosted.xml [new file with mode: 0644]
app/src/main/res/drawable/app_bar_ghosted_day.xml [deleted file]
app/src/main/res/drawable/app_bar_ghosted_night.xml [deleted file]
app/src/main/res/drawable/app_theme.xml [new file with mode: 0644]
app/src/main/res/drawable/app_theme_day.xml [deleted file]
app/src/main/res/drawable/app_theme_night.xml [deleted file]
app/src/main/res/drawable/back.xml
app/src/main/res/drawable/block_ads_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/block_ads_disabled_day.xml [deleted file]
app/src/main/res/drawable/block_ads_disabled_night.xml [deleted file]
app/src/main/res/drawable/block_ads_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/block_ads_enabled_day.xml [deleted file]
app/src/main/res/drawable/block_ads_enabled_night.xml [deleted file]
app/src/main/res/drawable/block_all_third_party_requests_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/block_all_third_party_requests_disabled_day.xml [deleted file]
app/src/main/res/drawable/block_all_third_party_requests_disabled_night.xml [deleted file]
app/src/main/res/drawable/block_all_third_party_requests_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/block_all_third_party_requests_enabled_day.xml [deleted file]
app/src/main/res/drawable/block_all_third_party_requests_enabled_night.xml [deleted file]
app/src/main/res/drawable/block_tracking_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/block_tracking_disabled_day.xml [deleted file]
app/src/main/res/drawable/block_tracking_disabled_night.xml [deleted file]
app/src/main/res/drawable/block_tracking_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/block_tracking_enabled_day.xml [deleted file]
app/src/main/res/drawable/block_tracking_enabled_night.xml [deleted file]
app/src/main/res/drawable/bookmarks.xml [new file with mode: 0644]
app/src/main/res/drawable/bookmarks_day.xml [deleted file]
app/src/main/res/drawable/bookmarks_night.xml [deleted file]
app/src/main/res/drawable/bottom_app_bar_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/bottom_app_bar_disabled_day.xml [deleted file]
app/src/main/res/drawable/bottom_app_bar_disabled_night.xml [deleted file]
app/src/main/res/drawable/bottom_app_bar_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/bottom_app_bar_enabled_day.xml [deleted file]
app/src/main/res/drawable/bottom_app_bar_enabled_night.xml [deleted file]
app/src/main/res/drawable/bug.xml [deleted file]
app/src/main/res/drawable/bug_cleared_day.xml [deleted file]
app/src/main/res/drawable/bug_cleared_night.xml [deleted file]
app/src/main/res/drawable/bug_warning.xml [deleted file]
app/src/main/res/drawable/cache_cleared_day.xml [deleted file]
app/src/main/res/drawable/cache_cleared_night.xml [deleted file]
app/src/main/res/drawable/cache_warning.xml [deleted file]
app/src/main/res/drawable/clear_cache_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/clear_cache_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/clear_cookies_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/clear_cookies_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/clear_dom_storage_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/clear_dom_storage_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/clear_everything_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/clear_everything_enabled_day.xml [deleted file]
app/src/main/res/drawable/clear_everything_enabled_night.xml [deleted file]
app/src/main/res/drawable/clear_form_data_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/clear_form_data_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/clear_logcat_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/clear_logcat_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/close.xml [new file with mode: 0644]
app/src/main/res/drawable/close_blue.xml [new file with mode: 0644]
app/src/main/res/drawable/close_blue_day.xml [deleted file]
app/src/main/res/drawable/close_blue_night.xml [deleted file]
app/src/main/res/drawable/close_day.xml [deleted file]
app/src/main/res/drawable/close_night.xml [deleted file]
app/src/main/res/drawable/cookies_cleared_day.xml [deleted file]
app/src/main/res/drawable/cookies_cleared_night.xml [deleted file]
app/src/main/res/drawable/cookies_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/cookies_disabled_day.xml [deleted file]
app/src/main/res/drawable/cookies_disabled_night.xml [deleted file]
app/src/main/res/drawable/cookies_warning.xml [deleted file]
app/src/main/res/drawable/copy.xml [new file with mode: 0644]
app/src/main/res/drawable/copy_day.xml [deleted file]
app/src/main/res/drawable/copy_enabled_day.xml [deleted file]
app/src/main/res/drawable/copy_enabled_night.xml [deleted file]
app/src/main/res/drawable/copy_night.xml [deleted file]
app/src/main/res/drawable/create_bookmark.xml
app/src/main/res/drawable/create_folder.xml
app/src/main/res/drawable/custom_user_agent_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/custom_user_agent_enabled_day.xml [deleted file]
app/src/main/res/drawable/custom_user_agent_enabled_night.xml [deleted file]
app/src/main/res/drawable/custom_user_agent_ghosted.xml [new file with mode: 0644]
app/src/main/res/drawable/custom_user_agent_ghosted_day.xml [deleted file]
app/src/main/res/drawable/custom_user_agent_ghosted_night.xml [deleted file]
app/src/main/res/drawable/delete_day.xml [deleted file]
app/src/main/res/drawable/delete_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/delete_night.xml [deleted file]
app/src/main/res/drawable/dom_storage_cleared_day.xml [deleted file]
app/src/main/res/drawable/dom_storage_cleared_night.xml [deleted file]
app/src/main/res/drawable/dom_storage_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/dom_storage_disabled_day.xml [deleted file]
app/src/main/res/drawable/dom_storage_disabled_night.xml [deleted file]
app/src/main/res/drawable/dom_storage_ghosted.xml [new file with mode: 0644]
app/src/main/res/drawable/dom_storage_ghosted_day.xml [deleted file]
app/src/main/res/drawable/dom_storage_ghosted_night.xml [deleted file]
app/src/main/res/drawable/dom_storage_warning.xml [deleted file]
app/src/main/res/drawable/domain_settings_url_background.xml [new file with mode: 0644]
app/src/main/res/drawable/domains.xml [new file with mode: 0644]
app/src/main/res/drawable/domains_day.xml [deleted file]
app/src/main/res/drawable/domains_night.xml [deleted file]
app/src/main/res/drawable/download.xml [new file with mode: 0644]
app/src/main/res/drawable/download_with_external_app_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/download_with_external_app_disabled_day.xml [deleted file]
app/src/main/res/drawable/download_with_external_app_disabled_night.xml [deleted file]
app/src/main/res/drawable/download_with_external_app_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/download_with_external_app_enabled_day.xml [deleted file]
app/src/main/res/drawable/download_with_external_app_enabled_night.xml [deleted file]
app/src/main/res/drawable/downloads_enabled_day.xml [deleted file]
app/src/main/res/drawable/downloads_enabled_night.xml [deleted file]
app/src/main/res/drawable/edit.xml [new file with mode: 0644]
app/src/main/res/drawable/edit_day.xml [deleted file]
app/src/main/res/drawable/edit_night.xml [deleted file]
app/src/main/res/drawable/font_size.xml [new file with mode: 0644]
app/src/main/res/drawable/font_size_day.xml [deleted file]
app/src/main/res/drawable/font_size_night.xml [deleted file]
app/src/main/res/drawable/form_data_cleared_day.xml [deleted file]
app/src/main/res/drawable/form_data_cleared_night.xml [deleted file]
app/src/main/res/drawable/form_data_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/form_data_disabled_day.xml [deleted file]
app/src/main/res/drawable/form_data_disabled_night.xml [deleted file]
app/src/main/res/drawable/form_data_warning.xml [deleted file]
app/src/main/res/drawable/full_screen_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/full_screen_disabled_day.xml [deleted file]
app/src/main/res/drawable/full_screen_disabled_night.xml [deleted file]
app/src/main/res/drawable/full_screen_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/full_screen_enabled_day.xml [deleted file]
app/src/main/res/drawable/full_screen_enabled_night.xml [deleted file]
app/src/main/res/drawable/home.xml [new file with mode: 0644]
app/src/main/res/drawable/home_enabled_day.xml [deleted file]
app/src/main/res/drawable/home_enabled_night.xml [deleted file]
app/src/main/res/drawable/image.xml [new file with mode: 0644]
app/src/main/res/drawable/images_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/images_disabled_day.xml [deleted file]
app/src/main/res/drawable/images_disabled_night.xml [deleted file]
app/src/main/res/drawable/images_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/images_enabled_day.xml [deleted file]
app/src/main/res/drawable/images_enabled_night.xml [deleted file]
app/src/main/res/drawable/images_options_day.xml [deleted file]
app/src/main/res/drawable/images_options_night.xml [deleted file]
app/src/main/res/drawable/incognito_mode_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/incognito_mode_disabled_day.xml [deleted file]
app/src/main/res/drawable/incognito_mode_disabled_night.xml [deleted file]
app/src/main/res/drawable/incognito_mode_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/incognito_mode_enabled_day.xml [deleted file]
app/src/main/res/drawable/incognito_mode_enabled_night.xml [deleted file]
app/src/main/res/drawable/lock.xml [new file with mode: 0644]
app/src/main/res/drawable/lock_day.xml [deleted file]
app/src/main/res/drawable/lock_night.xml [deleted file]
app/src/main/res/drawable/modify_url_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/modify_url_disabled_day.xml [deleted file]
app/src/main/res/drawable/modify_url_disabled_night.xml [deleted file]
app/src/main/res/drawable/modify_url_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/modify_url_enabled_day.xml [deleted file]
app/src/main/res/drawable/modify_url_enabled_night.xml [deleted file]
app/src/main/res/drawable/more_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/more_disabled_day.xml [deleted file]
app/src/main/res/drawable/more_disabled_night.xml [deleted file]
app/src/main/res/drawable/more_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/more_enabled_day.xml [deleted file]
app/src/main/res/drawable/more_enabled_night.xml [deleted file]
app/src/main/res/drawable/move_down_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/move_down_enabled_day.xml [deleted file]
app/src/main/res/drawable/move_down_enabled_night.xml [deleted file]
app/src/main/res/drawable/move_to_folder.xml [new file with mode: 0644]
app/src/main/res/drawable/move_to_folder_blue.xml [new file with mode: 0644]
app/src/main/res/drawable/move_to_folder_blue_day.xml [deleted file]
app/src/main/res/drawable/move_to_folder_blue_night.xml [deleted file]
app/src/main/res/drawable/move_to_folder_day.xml [deleted file]
app/src/main/res/drawable/move_to_folder_night.xml [deleted file]
app/src/main/res/drawable/move_up_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/move_up_enabled_day.xml [deleted file]
app/src/main/res/drawable/move_up_enabled_night.xml [deleted file]
app/src/main/res/drawable/proxy_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/proxy_disabled_day.xml [deleted file]
app/src/main/res/drawable/proxy_disabled_night.xml [deleted file]
app/src/main/res/drawable/proxy_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/proxy_enabled_day.xml [deleted file]
app/src/main/res/drawable/proxy_enabled_night.xml [deleted file]
app/src/main/res/drawable/proxy_ghosted.xml [new file with mode: 0644]
app/src/main/res/drawable/proxy_ghosted_day.xml [deleted file]
app/src/main/res/drawable/proxy_ghosted_night.xml [deleted file]
app/src/main/res/drawable/refresh_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/refresh_disabled_day.xml [deleted file]
app/src/main/res/drawable/refresh_disabled_night.xml [deleted file]
app/src/main/res/drawable/refresh_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/refresh_enabled_day.xml [deleted file]
app/src/main/res/drawable/refresh_enabled_night.xml [deleted file]
app/src/main/res/drawable/save.xml [new file with mode: 0644]
app/src/main/res/drawable/save_day.xml [deleted file]
app/src/main/res/drawable/save_night.xml [deleted file]
app/src/main/res/drawable/save_text.xml [new file with mode: 0644]
app/src/main/res/drawable/save_text_day.xml [deleted file]
app/src/main/res/drawable/save_text_night.xml [deleted file]
app/src/main/res/drawable/search.xml [new file with mode: 0644]
app/src/main/res/drawable/search_custom_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/search_custom_ghosted.xml [new file with mode: 0644]
app/src/main/res/drawable/search_custom_url_enabled_day.xml [deleted file]
app/src/main/res/drawable/search_custom_url_enabled_night.xml [deleted file]
app/src/main/res/drawable/search_custom_url_ghosted_day.xml [deleted file]
app/src/main/res/drawable/search_custom_url_ghosted_night.xml [deleted file]
app/src/main/res/drawable/search_enabled_day.xml [deleted file]
app/src/main/res/drawable/search_enabled_night.xml [deleted file]
app/src/main/res/drawable/select_all.xml [new file with mode: 0644]
app/src/main/res/drawable/select_all_day.xml [deleted file]
app/src/main/res/drawable/select_all_night.xml [deleted file]
app/src/main/res/drawable/share.xml [new file with mode: 0644]
app/src/main/res/drawable/share_day.xml [deleted file]
app/src/main/res/drawable/share_night.xml [deleted file]
app/src/main/res/drawable/social_media_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/social_media_disabled_day.xml [deleted file]
app/src/main/res/drawable/social_media_disabled_night.xml [deleted file]
app/src/main/res/drawable/social_media_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/social_media_enabled_day.xml [deleted file]
app/src/main/res/drawable/social_media_enabled_night.xml [deleted file]
app/src/main/res/drawable/social_media_ghosted.xml [new file with mode: 0644]
app/src/main/res/drawable/social_media_ghosted_day.xml [deleted file]
app/src/main/res/drawable/social_media_ghosted_night.xml [deleted file]
app/src/main/res/drawable/sort.xml [new file with mode: 0644]
app/src/main/res/drawable/sort_day.xml [deleted file]
app/src/main/res/drawable/sort_night.xml [deleted file]
app/src/main/res/drawable/sort_selected.xml [new file with mode: 0644]
app/src/main/res/drawable/sort_selected_day.xml [deleted file]
app/src/main/res/drawable/sort_selected_night.xml [deleted file]
app/src/main/res/drawable/ssl_certificate_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/ssl_certificate_disabled_day.xml [deleted file]
app/src/main/res/drawable/ssl_certificate_disabled_night.xml [deleted file]
app/src/main/res/drawable/ssl_certificate_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/ssl_certificate_enabled_day.xml [deleted file]
app/src/main/res/drawable/ssl_certificate_enabled_night.xml [deleted file]
app/src/main/res/drawable/tab_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/tab_disabled_day.xml [deleted file]
app/src/main/res/drawable/tab_disabled_night.xml [deleted file]
app/src/main/res/drawable/tab_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/tab_enabled_day.xml [deleted file]
app/src/main/res/drawable/tab_enabled_night.xml [deleted file]
app/src/main/res/drawable/url_bar_background_dark_blue.xml [deleted file]
app/src/main/res/drawable/url_bar_background_light_green.xml [deleted file]
app/src/main/res/drawable/user_agent.xml [new file with mode: 0644]
app/src/main/res/drawable/user_agent_day.xml [deleted file]
app/src/main/res/drawable/user_agent_night.xml [deleted file]
app/src/main/res/drawable/webview_dark_theme.xml [new file with mode: 0644]
app/src/main/res/drawable/webview_dark_theme_day.xml [deleted file]
app/src/main/res/drawable/webview_dark_theme_night.xml [deleted file]
app/src/main/res/drawable/webview_light_theme.xml [new file with mode: 0644]
app/src/main/res/drawable/webview_light_theme_day.xml [deleted file]
app/src/main/res/drawable/webview_light_theme_night.xml [deleted file]
app/src/main/res/drawable/wide_viewport_disabled.xml [new file with mode: 0644]
app/src/main/res/drawable/wide_viewport_disabled_day.xml [deleted file]
app/src/main/res/drawable/wide_viewport_disabled_night.xml [deleted file]
app/src/main/res/drawable/wide_viewport_enabled.xml [new file with mode: 0644]
app/src/main/res/drawable/wide_viewport_enabled_day.xml [deleted file]
app/src/main/res/drawable/wide_viewport_enabled_night.xml [deleted file]
app/src/main/res/layout-w900dp/bookmarks_drawer_bottom_appbar.xml
app/src/main/res/layout-w900dp/bookmarks_drawer_top_appbar.xml
app/src/main/res/layout/bookmarks_drawer_bottom_appbar.xml
app/src/main/res/layout/bookmarks_drawer_top_appbar.xml
app/src/main/res/layout/domain_settings_fragment.xml
app/src/main/res/layout/main_framelayout_bottom_appbar.xml
app/src/main/res/layout/main_framelayout_top_appbar.xml
app/src/main/res/menu/about_version_options_menu.xml
app/src/main/res/menu/bookmarks_context_menu.xml
app/src/main/res/menu/bookmarks_databaseview_context_menu.xml
app/src/main/res/menu/bookmarks_databaseview_options_menu.xml
app/src/main/res/menu/bookmarks_options_menu.xml
app/src/main/res/menu/domains_options_menu.xml
app/src/main/res/menu/logcat_options_menu.xml
app/src/main/res/menu/view_source_options_menu.xml
app/src/main/res/menu/webview_navigation_menu_bottom_appbar.xml
app/src/main/res/menu/webview_navigation_menu_top_appbar.xml
app/src/main/res/menu/webview_options_menu.xml
app/src/main/res/values-night-v27/styles.xml
app/src/main/res/values-night/colors.xml
app/src/main/res/values-night/styles.xml
app/src/main/res/values-v27/styles.xml
app/src/main/res/values/attrs.xml
app/src/main/res/values/colors.xml
app/src/main/res/values/styles.xml
app/src/main/res/xml/preferences.xml

index 7574a22c4678740bf1da3a31c02ef2419dbc4416..cea440a4239b0eb78f9bbf60c2ea856240e49a5c 100644 (file)
@@ -24,7 +24,6 @@ import android.app.Dialog;
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
-import android.content.res.Configuration;
 import android.database.Cursor;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.database.Cursor;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
@@ -1107,45 +1106,34 @@ public class BookmarksActivity extends AppCompatActivity implements CreateBookma
         // bookmarksListView is 0 indexed.
         int lastBookmarkDatabaseId = (int) bookmarksListView.getItemIdAtPosition(bookmarksListView.getCount() - 1);
 
         // bookmarksListView is 0 indexed.
         int lastBookmarkDatabaseId = (int) bookmarksListView.getItemIdAtPosition(bookmarksListView.getCount() - 1);
 
-        // Get the current theme status.
-        int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
-        // Update the move bookmark up `MenuItem`.
+        // Update the move bookmark up menu item.
         if (selectedBookmarkDatabaseId == firstBookmarkDatabaseId) {  // The selected bookmark is in the first position.
         if (selectedBookmarkDatabaseId == firstBookmarkDatabaseId) {  // The selected bookmark is in the first position.
-            // Disable the move bookmark up `MenuItem`.
+            // Disable the move bookmark up menu item.
             moveBookmarkUpMenuItem.setEnabled(false);
 
             moveBookmarkUpMenuItem.setEnabled(false);
 
-            //  Set the move bookmark up icon to be ghosted.
+            //  Set the icon.
             moveBookmarkUpMenuItem.setIcon(R.drawable.move_up_disabled);
         } else {  // The selected bookmark is not in the first position.
             // Enable the move bookmark up menu item.
             moveBookmarkUpMenuItem.setEnabled(true);
 
             // Set the icon according to the theme.
             moveBookmarkUpMenuItem.setIcon(R.drawable.move_up_disabled);
         } else {  // The selected bookmark is not in the first position.
             // Enable the move bookmark up menu item.
             moveBookmarkUpMenuItem.setEnabled(true);
 
             // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                moveBookmarkUpMenuItem.setIcon(R.drawable.move_up_enabled_night);
-            } else {
-                moveBookmarkUpMenuItem.setIcon(R.drawable.move_up_enabled_day);
-            }
+            moveBookmarkUpMenuItem.setIcon(R.drawable.move_up_enabled);
         }
 
         }
 
-        // Update the move bookmark down `MenuItem`.
+        // Update the move bookmark down menu item.
         if (selectedBookmarkDatabaseId == lastBookmarkDatabaseId) {  // The selected bookmark is in the last position.
         if (selectedBookmarkDatabaseId == lastBookmarkDatabaseId) {  // The selected bookmark is in the last position.
-            // Disable the move bookmark down `MenuItem`.
+            // Disable the move bookmark down menu item.
             moveBookmarkDownMenuItem.setEnabled(false);
 
             moveBookmarkDownMenuItem.setEnabled(false);
 
-            // Set the move bookmark down icon to be ghosted.
+            // Set the icon.
             moveBookmarkDownMenuItem.setIcon(R.drawable.move_down_disabled);
         } else {  // The selected bookmark is not in the last position.
             moveBookmarkDownMenuItem.setIcon(R.drawable.move_down_disabled);
         } else {  // The selected bookmark is not in the last position.
-            // Enable the move bookmark down `MenuItem`.
+            // Enable the move bookmark down menu item.
             moveBookmarkDownMenuItem.setEnabled(true);
 
             moveBookmarkDownMenuItem.setEnabled(true);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                moveBookmarkDownMenuItem.setIcon(R.drawable.move_down_enabled_night);
-            } else {
-                moveBookmarkDownMenuItem.setIcon(R.drawable.move_down_enabled_day);
-            }
+            // Set the icon.
+            moveBookmarkDownMenuItem.setIcon(R.drawable.move_down_enabled);
         }
     }
 
         }
     }
 
index 86ebfbaa93993888cf2887a1f4fbfbc4d3bfc383..91afa6d64120a2d15d1bbba2b53083b4e7ae22bc 100644 (file)
@@ -613,19 +613,12 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
         // Inflate the menu.
         getMenuInflater().inflate(R.menu.bookmarks_databaseview_options_menu, menu);
 
         // Inflate the menu.
         getMenuInflater().inflate(R.menu.bookmarks_databaseview_options_menu, menu);
 
-        // Get the current theme status.
-        int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
         // Get a handle for the sort menu item.
         MenuItem sortMenuItem = menu.findItem(R.id.sort);
 
         // Change the sort menu item icon if the listview is sorted by display order, which restores the state after a restart.
         if (sortByDisplayOrder) {
         // Get a handle for the sort menu item.
         MenuItem sortMenuItem = menu.findItem(R.id.sort);
 
         // Change the sort menu item icon if the listview is sorted by display order, which restores the state after a restart.
         if (sortByDisplayOrder) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                sortMenuItem.setIcon(R.drawable.sort_selected_day);
-            } else {
-                sortMenuItem.setIcon(R.drawable.sort_selected_night);
-            }
+            sortMenuItem.setIcon(R.drawable.sort_selected);
         }
 
         // Success.
         }
 
         // Success.
@@ -648,27 +641,16 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
             // Get a handle for the bookmarks list view.
             ListView bookmarksListView = findViewById(R.id.bookmarks_databaseview_listview);
 
             // Get a handle for the bookmarks list view.
             ListView bookmarksListView = findViewById(R.id.bookmarks_databaseview_listview);
 
-            // Get the current theme status.
-            int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
             // Update the icon and display a snackbar.
             if (sortByDisplayOrder) {  // Sort by display order.
             // Update the icon and display a snackbar.
             if (sortByDisplayOrder) {  // Sort by display order.
-                // Update the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    menuItem.setIcon(R.drawable.sort_selected_day);
-                } else {
-                    menuItem.setIcon(R.drawable.sort_selected_night);
-                }
+                // Update the icon.
+                menuItem.setIcon(R.drawable.sort_selected);
 
                 // Display a Snackbar indicating the current sort type.
                 Snackbar.make(bookmarksListView, R.string.sorted_by_display_order, Snackbar.LENGTH_SHORT).show();
             } else {  // Sort by database id.
 
                 // Display a Snackbar indicating the current sort type.
                 Snackbar.make(bookmarksListView, R.string.sorted_by_display_order, Snackbar.LENGTH_SHORT).show();
             } else {  // Sort by database id.
-                // Update the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    menuItem.setIcon(R.drawable.sort_day);
-                } else {
-                    menuItem.setIcon(R.drawable.sort_night);
-                }
+                // Update the icon.
+                menuItem.setIcon(R.drawable.sort);
 
                 // Display a Snackbar indicating the current sort type.
                 Snackbar.make(bookmarksListView, R.string.sorted_by_database_id, Snackbar.LENGTH_SHORT).show();
 
                 // Display a Snackbar indicating the current sort type.
                 Snackbar.make(bookmarksListView, R.string.sorted_by_database_id, Snackbar.LENGTH_SHORT).show();
index 9de4fb8e97a89883a4ff96f2281d38b8c3878ddc..2ef534f1d4286fb54557e8926efcf3b0bf648c82 100644 (file)
@@ -23,7 +23,6 @@ import android.app.Activity;
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
 import android.content.Context;
 import android.content.Intent;
 import android.content.SharedPreferences;
-import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.database.Cursor;
 import android.os.Bundle;
 import android.content.res.Resources;
 import android.database.Cursor;
 import android.os.Bundle;
@@ -529,15 +528,8 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo
                                         // Enable the options delete menu item.
                                         deleteMenuItem.setEnabled(true);
 
                                         // Enable the options delete menu item.
                                         deleteMenuItem.setEnabled(true);
 
-                                        // Get the current theme status.
-                                        int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
-                                        // Set the delete menu item icon according to the theme.
-                                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                                            deleteMenuItem.setIcon(R.drawable.delete_night);
-                                        } else {
-                                            deleteMenuItem.setIcon(R.drawable.delete_day);
-                                        }
+                                        // Set the delete menu item icon.
+                                        deleteMenuItem.setIcon(R.drawable.delete_enabled);
                                     } else {  // The device in in one-paned mode.
                                         // Display the domain settings fragment.
                                         fragmentManager.beginTransaction().replace(R.id.domains_listview_fragment_container, domainSettingsFragment).commit();
                                     } else {  // The device in in one-paned mode.
                                         // Display the domain settings fragment.
                                         fragmentManager.beginTransaction().replace(R.id.domains_listview_fragment_container, domainSettingsFragment).commit();
@@ -564,15 +556,8 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo
                                                 // Enable the delete menu item.
                                                 deleteMenuItem.setEnabled(true);
 
                                                 // Enable the delete menu item.
                                                 deleteMenuItem.setEnabled(true);
 
-                                                // Get the current theme status.
-                                                int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
-                                                // Set the delete menu item icon according to the theme.
-                                                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                                                    deleteMenuItem.setIcon(R.drawable.delete_night);
-                                                } else {
-                                                    deleteMenuItem.setIcon(R.drawable.delete_day);
-                                                }
+                                                // Set the delete menu item icon.
+                                                deleteMenuItem.setIcon(R.drawable.delete_enabled);
                                             } else {  // Single-paned mode.
                                                 // Show the delete menu item.
                                                 deleteMenuItem.setVisible(true);
                                             } else {  // Single-paned mode.
                                                 // Show the delete menu item.
                                                 deleteMenuItem.setVisible(true);
@@ -925,15 +910,8 @@ public class DomainsActivity extends AppCompatActivity implements AddDomainDialo
             // Enable the delete options menu items.
             deleteMenuItem.setEnabled(true);
 
             // Enable the delete options menu items.
             deleteMenuItem.setEnabled(true);
 
-            // Get the current theme status.
-            int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
-            // Set the delete icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                deleteMenuItem.setIcon(R.drawable.delete_night);
-            } else {
-                deleteMenuItem.setIcon(R.drawable.delete_day);
-            }
+            // Set the delete icon.
+            deleteMenuItem.setIcon(R.drawable.delete_enabled);
         } else if (twoPanedMode) {  // Two-paned mode is enabled but there are no domains.
             // Disable the options `MenuItems`.
             deleteMenuItem.setEnabled(false);
         } else if (twoPanedMode) {  // Two-paned mode is enabled but there are no domains.
             // Disable the options `MenuItems`.
             deleteMenuItem.setEnabled(false);
index e086503d8c80dc073c3ea80989887ce87aee6396..6c605828f8a59d68342628e5e3d0e3e170f0b5d8 100644 (file)
@@ -441,7 +441,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                                         Snackbar.make(currentWebView, getString(R.string.file_saved) + "  " + fileNameString, Snackbar.LENGTH_SHORT).show();
                                     } catch (Exception exception) {
                                         // Display a snackbar with the exception.
                                         Snackbar.make(currentWebView, getString(R.string.file_saved) + "  " + fileNameString, Snackbar.LENGTH_SHORT).show();
                                     } catch (Exception exception) {
                                         // Display a snackbar with the exception.
-                                        Snackbar.make(currentWebView, getString(R.string.error_saving_file) + "  " + exception.toString(), Snackbar.LENGTH_INDEFINITE).show();
+                                        Snackbar.make(currentWebView, getString(R.string.error_saving_file) + "  " + exception, Snackbar.LENGTH_INDEFINITE).show();
                                     } finally {
                                         // Delete the temporary MHT file.
                                         //noinspection ResultOfMethodCallIgnored
                                     } finally {
                                         // Delete the temporary MHT file.
                                         //noinspection ResultOfMethodCallIgnored
@@ -454,7 +454,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                             });
                         } catch (IOException ioException) {
                             // Display a snackbar with the IO exception.
                             });
                         } catch (IOException ioException) {
                             // Display a snackbar with the IO exception.
-                            Snackbar.make(currentWebView, getString(R.string.error_saving_file) + "  " + ioException.toString(), Snackbar.LENGTH_INDEFINITE).show();
+                            Snackbar.make(currentWebView, getString(R.string.error_saving_file) + "  " + ioException, Snackbar.LENGTH_INDEFINITE).show();
                         }
                     }
                 }
                         }
                     }
                 }
@@ -999,17 +999,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
             // Set the title.
             optionsRefreshMenuItem.setTitle(R.string.stop);
 
             // Set the title.
             optionsRefreshMenuItem.setTitle(R.string.stop);
 
-            // Set the icon if it is displayed in the app bar.
+            // Set the icon if it is displayed in the app bar.  Once the minimum API is >= 26, the blue and black icons can be combined with a tint list.
             if (displayAdditionalAppBarIcons) {
             if (displayAdditionalAppBarIcons) {
-                // Get the current theme status.
-                int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
-                // Set the icon according to the current theme status.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    optionsRefreshMenuItem.setIcon(R.drawable.close_blue_day);
-                } else {
-                    optionsRefreshMenuItem.setIcon(R.drawable.close_blue_night);
-                }
+                optionsRefreshMenuItem.setIcon(R.drawable.close_blue);
             }
         }
 
             }
         }
 
@@ -2838,21 +2830,21 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         // Initialize the formatted URL string.
         String url = "";
 
         // Initialize the formatted URL string.
         String url = "";
 
-        // Check to see if `unformattedUrlString` is a valid URL.  Otherwise, convert it into a search.
+        // Check to see if the unformatted URL string is a valid URL.  Otherwise, convert it into a search.
         if (unformattedUrlString.startsWith("content://")) {  // This is a Content URL.
             // Load the entire content URL.
             url = unformattedUrlString;
         } else if (Patterns.WEB_URL.matcher(unformattedUrlString).matches() || unformattedUrlString.startsWith("http://") || unformattedUrlString.startsWith("https://") ||
                 unformattedUrlString.startsWith("file://")) {  // This is a standard URL.
             // Add `https://` at the beginning if there is no protocol.  Otherwise the app will segfault.
         if (unformattedUrlString.startsWith("content://")) {  // This is a Content URL.
             // Load the entire content URL.
             url = unformattedUrlString;
         } else if (Patterns.WEB_URL.matcher(unformattedUrlString).matches() || unformattedUrlString.startsWith("http://") || unformattedUrlString.startsWith("https://") ||
                 unformattedUrlString.startsWith("file://")) {  // This is a standard URL.
             // Add `https://` at the beginning if there is no protocol.  Otherwise the app will segfault.
-            if (!unformattedUrlString.startsWith("http") && !unformattedUrlString.startsWith("file://") && !unformattedUrlString.startsWith("content://")) {
+            if (!unformattedUrlString.startsWith("http") && !unformattedUrlString.startsWith("file://")) {
                 unformattedUrlString = "https://" + unformattedUrlString;
             }
 
                 unformattedUrlString = "https://" + unformattedUrlString;
             }
 
-            // Initialize `unformattedUrl`.
+            // Initialize the unformatted URL.
             URL unformattedUrl = null;
 
             URL unformattedUrl = null;
 
-            // Convert `unformattedUrlString` to a `URL`, then to a `URI`, and then back to a `String`, which sanitizes the input and adds in any missing components.
+            // Convert the unformatted URL string to a URL, then to a URI, and then back to a string, which sanitizes the input and adds in any missing components.
             try {
                 unformattedUrl = new URL(unformattedUrlString);
             } catch (MalformedURLException e) {
             try {
                 unformattedUrl = new URL(unformattedUrlString);
             } catch (MalformedURLException e) {
@@ -3026,7 +3018,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                 currentWebView.loadUrl(temporaryMhtFile.toString());
             } catch (Exception exception) {
                 // Display a snackbar.
                 currentWebView.loadUrl(temporaryMhtFile.toString());
             } catch (Exception exception) {
                 // Display a snackbar.
-                Snackbar.make(currentWebView, getString(R.string.error) + "  " + exception.toString(), Snackbar.LENGTH_INDEFINITE).show();
+                Snackbar.make(currentWebView, getString(R.string.error) + "  " + exception, Snackbar.LENGTH_INDEFINITE).show();
             }
         } else {  // Let the WebView handle opening of the file.
             // Open the file.
             }
         } else {  // Let the WebView handle opening of the file.
             // Open the file.
@@ -4003,15 +3995,8 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                         break;
                 }
 
                         break;
                 }
 
-                // Get the current theme status.
-                int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
                 // Set a background on the URL relative layout to indicate that custom domain settings are being used.
                 // Set a background on the URL relative layout to indicate that custom domain settings are being used.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.drawable.url_bar_background_light_green, null));
-                } else {
-                    urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.drawable.url_bar_background_dark_blue, null));
-                }
+                urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.drawable.domain_settings_url_background, null));
             } else {  // The new URL does not have custom domain settings.  Load the defaults.
                 // Store the values from the shared preferences.
                 nestedScrollWebView.getSettings().setJavaScriptEnabled(sharedPreferences.getBoolean("javascript", false));
             } else {  // The new URL does not have custom domain settings.  Load the defaults.
                 // Store the values from the shared preferences.
                 nestedScrollWebView.getSettings().setJavaScriptEnabled(sharedPreferences.getBoolean("javascript", false));
@@ -4292,35 +4277,20 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                 optionsPrivacyMenuItem.setIcon(R.drawable.privacy_mode);
             }
 
                 optionsPrivacyMenuItem.setIcon(R.drawable.privacy_mode);
             }
 
-            // Get the current theme status.
-            int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
             // Update the cookies icon.
             // Update the cookies icon.
-            if (currentWebView.getAcceptCookies()) {  // Cookies are enabled.
+            if (currentWebView.getAcceptCookies()) {
                 optionsCookiesMenuItem.setIcon(R.drawable.cookies_enabled);
                 optionsCookiesMenuItem.setIcon(R.drawable.cookies_enabled);
-            } else {  // Cookies are disabled.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    optionsCookiesMenuItem.setIcon(R.drawable.cookies_disabled_day);
-                } else {
-                    optionsCookiesMenuItem.setIcon(R.drawable.cookies_disabled_night);
-                }
+            } else {
+                optionsCookiesMenuItem.setIcon(R.drawable.cookies_disabled);
             }
 
             // Update the refresh icon.
             if (optionsRefreshMenuItem.getTitle() == getString(R.string.refresh)) {  // The refresh icon is displayed.
             }
 
             // Update the refresh icon.
             if (optionsRefreshMenuItem.getTitle() == getString(R.string.refresh)) {  // The refresh icon is displayed.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    optionsRefreshMenuItem.setIcon(R.drawable.refresh_enabled_day);
-                } else {
-                    optionsRefreshMenuItem.setIcon(R.drawable.refresh_enabled_night);
-                }
+                // Set the icon.  Once the minimum API is >= 26, the blue and black icons can be combined with a tint list.
+                optionsRefreshMenuItem.setIcon(R.drawable.refresh_enabled);
             } else {  // The stop icon is displayed.
             } else {  // The stop icon is displayed.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    optionsRefreshMenuItem.setIcon(R.drawable.close_blue_day);
-                } else {
-                    optionsRefreshMenuItem.setIcon(R.drawable.close_blue_night);
-                }
+                // Set the icon.  Once the minimum API is >= 26, the blue and black icons can be combined with a tint list.
+                optionsRefreshMenuItem.setIcon(R.drawable.close_blue);
             }
 
             // `invalidateOptionsMenu()` calls `onPrepareOptionsMenu()` and redraws the icons in the app bar.
             }
 
             // `invalidateOptionsMenu()` calls `onPrepareOptionsMenu()` and redraws the icons in the app bar.
@@ -5014,16 +4984,10 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
 
             // Set the background to indicate the domain settings status.
             if (currentWebView.getDomainSettingsApplied()) {
 
             // Set the background to indicate the domain settings status.
             if (currentWebView.getDomainSettingsApplied()) {
-                // Get the current theme status.
-                int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
-                // Set a green background on the URL relative layout to indicate that custom domain settings are being used.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.drawable.url_bar_background_light_green, null));
-                } else {
-                    urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.drawable.url_bar_background_dark_blue, null));
-                }
+                // Set a background on the URL relative layout to indicate that custom domain settings are being used.
+                urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.drawable.domain_settings_url_background, null));
             } else {
             } else {
+                // Remove any background on the URL relative layout.
                 urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.color.transparent, null));
             }
         } else {  // The fragment has not been populated.  Try again in 100 milliseconds.
                 urlRelativeLayout.setBackground(ResourcesCompat.getDrawable(getResources(), R.color.transparent, null));
             }
         } else {  // The fragment has not been populated.  Try again in 100 milliseconds.
@@ -5977,17 +5941,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                     // Get the app bar and theme preferences.
                     boolean displayAdditionalAppBarIcons = sharedPreferences.getBoolean(getString(R.string.display_additional_app_bar_icons_key), false);
 
                     // Get the app bar and theme preferences.
                     boolean displayAdditionalAppBarIcons = sharedPreferences.getBoolean(getString(R.string.display_additional_app_bar_icons_key), false);
 
-                    // If the icon is displayed in the AppBar, set it according to the theme.
+                    // Set the icon if it is displayed in the AppBar.  Once the minimum API is >= 26, the blue and black icons can be combined with a tint list.
                     if (displayAdditionalAppBarIcons) {
                     if (displayAdditionalAppBarIcons) {
-                        // Get the current theme status.
-                        int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
-                        // Set the stop icon according to the theme.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            optionsRefreshMenuItem.setIcon(R.drawable.close_blue_day);
-                        } else {
-                            optionsRefreshMenuItem.setIcon(R.drawable.close_blue_night);
-                        }
+                        optionsRefreshMenuItem.setIcon(R.drawable.close_blue);
                     }
                 }
             }
                     }
                 }
             }
@@ -6009,15 +5965,8 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
 
                     // If the icon is displayed in the app bar, reset it according to the theme.
                     if (displayAdditionalAppBarIcons) {
 
                     // If the icon is displayed in the app bar, reset it according to the theme.
                     if (displayAdditionalAppBarIcons) {
-                        // Get the current theme status.
-                        int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
-                        // Set the icon according to the theme.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            optionsRefreshMenuItem.setIcon(R.drawable.refresh_enabled_day);
-                        } else {
-                            optionsRefreshMenuItem.setIcon(R.drawable.refresh_enabled_night);
-                        }
+                        // Set the icon.
+                        optionsRefreshMenuItem.setIcon(R.drawable.refresh_enabled);
                     }
                 }
 
                     }
                 }
 
@@ -6126,7 +6075,8 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                 }
             }
 
                 }
             }
 
-            // Handle SSL Certificate errors.
+            // Handle SSL Certificate errors.  Suppress the lint warning that ignoring the error might be dangerous.
+            @SuppressLint("WebViewClientOnReceivedSslError")
             @Override
             public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
                 // Get the current website SSL certificate.
             @Override
             public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) {
                 // Get the current website SSL certificate.
index 294e6055356b5b70cb758e42123027996faada74..aad20f89c469122961e915a7b1fb0834c475d953 100644 (file)
@@ -20,7 +20,6 @@
 package com.stoutner.privacybrowser.adapters
 
 import android.content.Context
 package com.stoutner.privacybrowser.adapters
 
 import android.content.Context
-import android.content.res.Configuration
 import android.net.Uri
 import android.text.SpannableStringBuilder
 import android.text.Spanned
 import android.net.Uri
 import android.text.SpannableStringBuilder
 import android.text.Spanned
@@ -198,21 +197,9 @@ class PinnedMismatchPagerAdapter(private val context: Context, private val layou
             }
         }
 
             }
         }
 
-        // Define the color spans.
-        val blueColorSpan: ForegroundColorSpan
-        val redColorSpan: ForegroundColorSpan
-
-        // Get the current theme status.
-        val currentThemeStatus = context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
-
-        // Set the color spans according to the theme.  The deprecated `resources` must be used until the minimum API >= 23.
-        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-            blueColorSpan = ForegroundColorSpan(context.getColor(R.color.blue_700))
-            redColorSpan = ForegroundColorSpan(context.getColor(R.color.red_a700))
-        } else {
-            blueColorSpan = ForegroundColorSpan(context.getColor(R.color.violet_700))
-            redColorSpan = ForegroundColorSpan(context.getColor(R.color.red_900))
-        }
+        // Create the color spans.
+        val blueColorSpan = ForegroundColorSpan(context.getColor(R.color.blue_text))
+        val redColorSpan = ForegroundColorSpan(context.getColor(R.color.red_text))
 
         // Set the domain name to be blue.
         domainNameStringBuilder.setSpan(blueColorSpan, domainNameLabel.length, domainNameStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
 
         // Set the domain name to be blue.
         domainNameStringBuilder.setSpan(blueColorSpan, domainNameLabel.length, domainNameStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
index 8f4f5aab8f3f4d18cc87641e0ba4d94a5f239b70..8ac8331352479bf07b89684271dbb1c121e6aab0 100644 (file)
@@ -35,7 +35,7 @@ class AboutViewSourceDialog : DialogFragment() {
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
         // Set the icon according to the theme.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
         // Set the icon according to the theme.
-        dialogBuilder.setIconAttribute(R.attr.aboutBlueIcon)
+        dialogBuilder.setIcon(R.drawable.about_blue)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.about_view_source)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.about_view_source)
index ac65aa5a2f41fc4ae077339383222f3409ba85fc..c67e23b0870fb910ad3541888c251c20cee398e8 100644 (file)
@@ -90,8 +90,8 @@ class AddDomainDialog : DialogFragment() {
         // Use an alert dialog builder to create the alert dialog.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
         // Use an alert dialog builder to create the alert dialog.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
-        // Set the icon according to the theme.
-        dialogBuilder.setIconAttribute(R.attr.domainsBlueIcon)
+        // Set the icon.
+        dialogBuilder.setIcon(R.drawable.domains)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.add_domain)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.add_domain)
index a6ab28dd2e47161fe9ef7732bf6f105f2b3b7910..a8167e3ec8fcbf5e72a2bd5a2f60cac9902e334c 100644 (file)
@@ -84,7 +84,7 @@ class FontSizeDialog : DialogFragment() {
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
         // Set the icon according to the theme.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
         // Set the icon according to the theme.
-        dialogBuilder.setIconAttribute(R.attr.fontSizeBlueIcon)
+        dialogBuilder.setIcon(R.drawable.font_size)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.font_size)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.font_size)
index c8e84e6f8b430250a5c0fcef0be49d02d6f3208a..d7fe8f9bcbe767ccd2ffb37e33ea24cb2f81ef25 100644 (file)
@@ -21,7 +21,6 @@ package com.stoutner.privacybrowser.dialogs
 
 import android.app.Dialog
 import android.content.DialogInterface
 
 import android.app.Dialog
 import android.content.DialogInterface
-import android.content.res.Configuration
 import android.os.Bundle
 import android.text.SpannableStringBuilder
 import android.text.Spanned
 import android.os.Bundle
 import android.text.SpannableStringBuilder
 import android.text.Spanned
@@ -106,8 +105,8 @@ class HttpAuthenticationDialog : DialogFragment() {
             // Use an alert dialog builder to create the alert dialog.
             val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
             // Use an alert dialog builder to create the alert dialog.
             val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
-            // Set the icon according to the theme.
-            dialogBuilder.setIconAttribute(R.attr.lockBlueIcon)
+            // Set the icon.
+            dialogBuilder.setIcon(R.drawable.lock)
 
             // Set the title.
             dialogBuilder.setTitle(R.string.http_authentication)
 
             // Set the title.
             dialogBuilder.setTitle(R.string.http_authentication)
@@ -168,17 +167,8 @@ class HttpAuthenticationDialog : DialogFragment() {
             val hostLabel = getString(R.string.host) + "  "
             val hostStringBuilder = SpannableStringBuilder(hostLabel + httpAuthHost)
 
             val hostLabel = getString(R.string.host) + "  "
             val hostStringBuilder = SpannableStringBuilder(hostLabel + httpAuthHost)
 
-            // Get the current theme status.
-            val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
-
-            // Set the blue color span according to the theme.  The deprecated `getColor()` must be used until API >= 23.
-            val blueColorSpan = if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                @Suppress("DEPRECATION")
-                ForegroundColorSpan(resources.getColor(R.color.blue_700))
-            } else {
-                @Suppress("DEPRECATION")
-                ForegroundColorSpan(resources.getColor(R.color.violet_700))
-            }
+            // Set the blue color span.
+            val blueColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.blue_text))
 
             // Setup the span to display the host name in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
             hostStringBuilder.setSpan(blueColorSpan, hostLabel.length, hostStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
 
             // Setup the span to display the host name in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
             hostStringBuilder.setSpan(blueColorSpan, hostLabel.length, hostStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
index 0f722cdcc9e84657874167016012d6a1fa7e368e..643e79cd01d5a3ff6c8883008d84d69f319231ac 100644 (file)
@@ -107,8 +107,8 @@ class MoveToFolderDialog : DialogFragment() {
         // Use an alert dialog builder to create the alert dialog.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
         // Use an alert dialog builder to create the alert dialog.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
-        // Set the icon according to the theme.
-        dialogBuilder.setIconAttribute(R.attr.moveToFolderBlueIcon)
+        // Set the icon.
+        dialogBuilder.setIcon(R.drawable.move_to_folder_blue)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.move_to_folder)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.move_to_folder)
index 043bdeb49256ced5b396618d2da01f1e26c19e9b..6e1db124fbc0249cb80c06f0534f92e4d3acd46d 100644 (file)
@@ -67,8 +67,8 @@ class OpenDialog : DialogFragment() {
         // Use an alert dialog builder to create the alert dialog.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
         // Use an alert dialog builder to create the alert dialog.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
-        // Set the icon according to the theme.
-        dialogBuilder.setIconAttribute(R.attr.proxyBlueIcon)
+        // Set the icon.
+        dialogBuilder.setIcon(R.drawable.proxy_enabled)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.open)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.open)
index bef073905d07ae7529b938e8460a734d8b47c107..2d1cdd7d4798e5f2dd62dea89d3040d9838bb82a 100644 (file)
@@ -115,8 +115,8 @@ class PinnedMismatchDialog : DialogFragment() {
 
         // Set the favorite icon as the dialog icon if it exists.
         if (favoriteIconBitmap.sameAs(defaultFavoriteIconBitmap)) {  // There is no website favorite icon.
 
         // Set the favorite icon as the dialog icon if it exists.
         if (favoriteIconBitmap.sameAs(defaultFavoriteIconBitmap)) {  // There is no website favorite icon.
-            // Set the icon according to the theme.
-            dialogBuilder.setIconAttribute(R.attr.sslCertificateBlueIcon)
+            // Set the icon.
+            dialogBuilder.setIcon(R.drawable.ssl_certificate_enabled)
         } else {  // There is a favorite icon.
             // Create a drawable version of the favorite icon.
             val favoriteIconDrawable: Drawable = BitmapDrawable(resources, favoriteIconBitmap)
         } else {  // There is a favorite icon.
             // Create a drawable version of the favorite icon.
             val favoriteIconDrawable: Drawable = BitmapDrawable(resources, favoriteIconBitmap)
index f2f2b25ca3574b2f67a223a1d500c7bcaaa2f480..568adbc46872dba4c80cded48e642160851248b0 100644 (file)
@@ -62,8 +62,8 @@ class ProxyNotInstalledDialog : DialogFragment() {
         // Use a builder to create the alert dialog.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
         // Use a builder to create the alert dialog.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
-        // Set the icon according to the theme.
-        dialogBuilder.setIconAttribute(R.attr.proxyBlueIcon)
+        // Set the icon.
+        dialogBuilder.setIcon(R.drawable.proxy_enabled)
 
         // Set the title and the message according to the proxy mode.
         when (proxyMode) {
 
         // Set the title and the message according to the proxy mode.
         when (proxyMode) {
index 1aa31dd00c7ce94fc117dde1fcb5f64d1b24ae32..77cd1c1acb7b16434b6c7614b58e71842450cb72 100644 (file)
@@ -104,8 +104,8 @@ class SaveDialog : DialogFragment() {
         // Set the title.
         dialogBuilder.setTitle(R.string.save_url)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.save_url)
 
-        // Set the icon according to the theme.
-        dialogBuilder.setIconAttribute(R.attr.copyBlueIcon)
+        // Set the icon.
+        dialogBuilder.setIcon(R.drawable.download)
 
         // Set the view.
         dialogBuilder.setView(R.layout.save_dialog)
 
         // Set the view.
         dialogBuilder.setView(R.layout.save_dialog)
index 0f9af89740a3665e3999e39a26fed10948c34ce9..d146de5300c77c364ce7695e148d18e087561f54 100644 (file)
@@ -22,7 +22,6 @@ package com.stoutner.privacybrowser.dialogs
 import android.app.Activity
 import android.app.Dialog
 import android.content.DialogInterface
 import android.app.Activity
 import android.app.Dialog
 import android.content.DialogInterface
-import android.content.res.Configuration
 import android.net.Uri
 import android.net.http.SslError
 import android.os.AsyncTask
 import android.net.Uri
 import android.net.http.SslError
 import android.os.AsyncTask
@@ -136,11 +135,8 @@ class SslCertificateErrorDialog : DialogFragment() {
         // Use an alert dialog builder to create the alert dialog.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
         // Use an alert dialog builder to create the alert dialog.
         val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
-        // Get the current theme status.
-        val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
-
-        // Set the icon according to the theme.
-        dialogBuilder.setIconAttribute(R.attr.sslCertificateBlueIcon)
+        // Set the icon.
+        dialogBuilder.setIcon(R.drawable.ssl_certificate_enabled)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.ssl_certificate_error)
 
         // Set the title.
         dialogBuilder.setTitle(R.string.ssl_certificate_error)
@@ -230,21 +226,8 @@ class SslCertificateErrorDialog : DialogFragment() {
         val endDateStringBuilder = SpannableStringBuilder(endDateLabel + endDate)
 
         // Define the color spans.
         val endDateStringBuilder = SpannableStringBuilder(endDateLabel + endDate)
 
         // Define the color spans.
-        val blueColorSpan: ForegroundColorSpan
-        val redColorSpan: ForegroundColorSpan
-
-        // Set the color spans according to the theme.  The deprecated `getColor()` must be used until the minimum API >= 23.
-        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-            @Suppress("DEPRECATION")
-            blueColorSpan = ForegroundColorSpan(resources.getColor(R.color.blue_700))
-            @Suppress("DEPRECATION")
-            redColorSpan = ForegroundColorSpan(resources.getColor(R.color.red_a700))
-        } else {
-            @Suppress("DEPRECATION")
-            blueColorSpan = ForegroundColorSpan(resources.getColor(R.color.violet_700))
-            @Suppress("DEPRECATION")
-            redColorSpan = ForegroundColorSpan(resources.getColor(R.color.red_900))
-        }
+        val blueColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.blue_text))
+        val redColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.red_text))
 
         // Setup the spans to display the certificate information in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
         urlStringBuilder.setSpan(blueColorSpan, urlLabel.length, urlStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
 
         // Setup the spans to display the certificate information in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
         urlStringBuilder.setSpan(blueColorSpan, urlLabel.length, urlStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
@@ -272,14 +255,8 @@ class SslCertificateErrorDialog : DialogFragment() {
             }
 
             SslError.SSL_UNTRUSTED -> {
             }
 
             SslError.SSL_UNTRUSTED -> {
-                // Change the issued by text view text to red.  The deprecated `getColor()` must be used until the minimum API >= 23.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    @Suppress("DEPRECATION")
-                    issuedByTextView.setTextColor(resources.getColor(R.color.red_a700))
-                } else {
-                    @Suppress("DEPRECATION")
-                    issuedByTextView.setTextColor(resources.getColor(R.color.red_900))
-                }
+                // Change the issued by text view text to red.
+                issuedByTextView.setTextColor(requireContext().getColor(R.color.red_text))
 
                 // Change the issued by span color to red.
                 issuedByCNameStringBuilder.setSpan(redColorSpan, cNameLabel.length, issuedByCNameStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
 
                 // Change the issued by span color to red.
                 issuedByCNameStringBuilder.setSpan(redColorSpan, cNameLabel.length, issuedByCNameStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
@@ -291,14 +268,8 @@ class SslCertificateErrorDialog : DialogFragment() {
             }
 
             SslError.SSL_DATE_INVALID -> {
             }
 
             SslError.SSL_DATE_INVALID -> {
-                // Change the valid dates text view text to red.  The deprecated `getColor()` must be used until the minimum API >= 23.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    @Suppress("DEPRECATION")
-                    validDatesTextView.setTextColor(resources.getColor(R.color.red_a700))
-                } else {
-                    @Suppress("DEPRECATION")
-                    validDatesTextView.setTextColor(resources.getColor(R.color.red_900))
-                }
+                // Change the valid dates text view text to red.
+                validDatesTextView.setTextColor(requireContext().getColor(R.color.red_text))
 
                 // Change the date span colors to red.
                 startDateStringBuilder.setSpan(redColorSpan, startDateLabel.length, startDateStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
 
                 // Change the date span colors to red.
                 startDateStringBuilder.setSpan(redColorSpan, startDateLabel.length, startDateStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
@@ -390,20 +361,8 @@ class SslCertificateErrorDialog : DialogFragment() {
             // Create a spannable string builder.
             val ipAddressesStringBuilder = SpannableStringBuilder(ipAddressesLabel + ipAddresses)
 
             // Create a spannable string builder.
             val ipAddressesStringBuilder = SpannableStringBuilder(ipAddressesLabel + ipAddresses)
 
-            // Create a blue foreground color span.
-            val blueColorSpan: ForegroundColorSpan
-
-            // Get the current theme status.
-            val currentThemeStatus = activity.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
-
-            // Set the blue color span according to the theme.  The deprecated `getColor()` must be used until the minimum API >= 23.
-            blueColorSpan = if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                @Suppress("DEPRECATION")
-                ForegroundColorSpan(activity.resources.getColor(R.color.blue_700))
-            } else {
-                @Suppress("DEPRECATION")
-                ForegroundColorSpan(activity.resources.getColor(R.color.violet_500))
-            }
+            // Create a blue color span according to the theme.
+            val blueColorSpan = ForegroundColorSpan(activity.getColor(R.color.blue_text))
 
             // Set the string builder to display the certificate information in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
             ipAddressesStringBuilder.setSpan(blueColorSpan, ipAddressesLabel.length, ipAddressesStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
 
             // Set the string builder to display the certificate information in blue.  `SPAN_INCLUSIVE_INCLUSIVE` allows the span to grow in either direction.
             ipAddressesStringBuilder.setSpan(blueColorSpan, ipAddressesLabel.length, ipAddressesStringBuilder.length, Spanned.SPAN_INCLUSIVE_INCLUSIVE)
index e5e97bcf44d73a1049209e0c135ea6bf58093d80..f44710f8e6dd2989d932588fbc102777a287f84e 100644 (file)
@@ -55,8 +55,8 @@ class UntrustedSslCertificateDialog : DialogFragment() {
             // Use a builder to create the alert dialog.
             val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
             // Use a builder to create the alert dialog.
             val dialogBuilder = AlertDialog.Builder(requireContext(), R.style.PrivacyBrowserAlertDialog)
 
-            // Set the icon according to the theme.
-            dialogBuilder.setIconAttribute(R.attr.sslCertificateBlueIcon)
+            // Set the icon.
+            dialogBuilder.setIcon(R.drawable.ssl_certificate_enabled)
 
             // Set the title.
             dialogBuilder.setTitle(R.string.ssl_certificate_error)
 
             // Set the title.
             dialogBuilder.setTitle(R.string.ssl_certificate_error)
index 2c80301ba416df58bc863398186043b5ac17a10f..54e997af4507e7885e1f9a64c72a8635be4c87b7 100644 (file)
@@ -96,8 +96,8 @@ class ViewRequestDialog : DialogFragment() {
         // Get the current theme status.
         val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
 
         // Get the current theme status.
         val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
 
-        // Set the icon according to the theme.
-        dialogBuilder.setIconAttribute(R.attr.blockAdsBlueIcon)
+        // Set the icon.
+        dialogBuilder.setIcon(R.drawable.block_ads_enabled)
 
         // Set the title.
         dialogBuilder.setTitle(resources.getString(R.string.request_details) + " - " + id)
 
         // Set the title.
         dialogBuilder.setTitle(resources.getString(R.string.request_details) + " - " + id)
index 793c50bcf3c07e4e75830d524bb98c6f799dedb6..0a79f80653c254a86641121f84412762fa7f6fb2 100644 (file)
@@ -20,7 +20,6 @@
 package com.stoutner.privacybrowser.dialogs
 
 import android.app.Dialog
 package com.stoutner.privacybrowser.dialogs
 
 import android.app.Dialog
-import android.content.res.Configuration
 import android.graphics.Bitmap
 import android.graphics.BitmapFactory
 import android.graphics.drawable.BitmapDrawable
 import android.graphics.Bitmap
 import android.graphics.BitmapFactory
 import android.graphics.drawable.BitmapDrawable
@@ -251,24 +250,8 @@ class ViewSslCertificateDialog : DialogFragment() {
             val endDateStringBuilder = SpannableStringBuilder(endDateLabel + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG).format(endDate))
 
             // Define the color spans.
             val endDateStringBuilder = SpannableStringBuilder(endDateLabel + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG).format(endDate))
 
             // Define the color spans.
-            val blueColorSpan: ForegroundColorSpan
-            val redColorSpan: ForegroundColorSpan
-
-            // Get the current theme status.
-            val currentThemeStatus = resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
-
-            // Set the color spans according to the theme.  The deprecated `getColor()` must be used until the minimum API >= 23.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                @Suppress("DEPRECATION")
-                blueColorSpan = ForegroundColorSpan(resources.getColor(R.color.blue_700))
-                @Suppress("DEPRECATION")
-                redColorSpan = ForegroundColorSpan(resources.getColor(R.color.red_a700))
-            } else {
-                @Suppress("DEPRECATION")
-                blueColorSpan = ForegroundColorSpan(resources.getColor(R.color.violet_700))
-                @Suppress("DEPRECATION")
-                redColorSpan = ForegroundColorSpan(resources.getColor(R.color.red_900))
-            }
+            val blueColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.blue_text))
+            val redColorSpan = ForegroundColorSpan(requireContext().getColor(R.color.red_text))
 
             // Format the domain string and issued to CName colors.
             if (domainString == issuedToCName) {  // The domain and issued to CName match.
 
             // Format the domain string and issued to CName colors.
             if (domainString == issuedToCName) {  // The domain and issued to CName match.
index 71d6f484be3cd94ff0e3a359c80b4099933b8965..1ce0e3cccd5a7668b52f85738652ec8692f344a7 100644 (file)
@@ -299,18 +299,9 @@ public class DomainSettingsFragment extends Fragment {
             savedSslEndDateStringBuilder = new SpannableStringBuilder(endDateLabel + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG).format(savedSslEndDate));
         }
 
             savedSslEndDateStringBuilder = new SpannableStringBuilder(endDateLabel + DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG).format(savedSslEndDate));
         }
 
-        // Create the foreground color spans.
-        final ForegroundColorSpan blueColorSpan;
-        final ForegroundColorSpan redColorSpan;
-
-        // Set the color spans according to the theme.
-        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-            blueColorSpan = new ForegroundColorSpan(context.getColor(R.color.blue_700));
-            redColorSpan = new ForegroundColorSpan(context.getColor(R.color.red_a700));
-        } else {
-            blueColorSpan = new ForegroundColorSpan(context.getColor(R.color.violet_700));
-            redColorSpan = new ForegroundColorSpan(context.getColor(R.color.red_900));
-        }
+        // Create the color spans.
+        final ForegroundColorSpan blueColorSpan = new ForegroundColorSpan(context.getColor(R.color.blue_text));
+        final ForegroundColorSpan redColorSpan = new ForegroundColorSpan(context.getColor(R.color.red_text));
 
         // Set the domain name from the the database cursor.
         domainNameEditText.setText(domainNameString);
 
         // Set the domain name from the the database cursor.
         domainNameEditText.setText(domainNameString);
@@ -379,6 +370,7 @@ public class DomainSettingsFragment extends Fragment {
         }
 
         // Set the cookies switch status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
         }
 
         // Set the cookies switch status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+        // Doing this makes no sense until it can also be done with the preferences.
         if (cookiesInt == 1) {  // Cookies are enabled.
             // Turn the switch on.
             cookiesSwitch.setChecked(true);
         if (cookiesInt == 1) {  // Cookies are enabled.
             // Turn the switch on.
             cookiesSwitch.setChecked(true);
@@ -389,12 +381,8 @@ public class DomainSettingsFragment extends Fragment {
             // Turn the switch off
             cookiesSwitch.setChecked(false);
 
             // Turn the switch off
             cookiesSwitch.setChecked(false);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_disabled_day, null));
-            } else {
-                cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_disabled_night, null));
-            }
+            // Set the icon.
+            cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_disabled, null));
         }
 
         // Only enable DOM storage if JavaScript is enabled.
         }
 
         // Only enable DOM storage if JavaScript is enabled.
@@ -403,6 +391,7 @@ public class DomainSettingsFragment extends Fragment {
             domStorageSwitch.setEnabled(true);
 
             // Set the DOM storage status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
             domStorageSwitch.setEnabled(true);
 
             // Set the DOM storage status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+            // Doing this makes no sense until it can also be done with the preferences.
             if (domStorageInt == 1) {  // Both JavaScript and DOM storage are enabled.
                 domStorageSwitch.setChecked(true);
                 domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_enabled, null));
             if (domStorageInt == 1) {  // Both JavaScript and DOM storage are enabled.
                 domStorageSwitch.setChecked(true);
                 domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_enabled, null));
@@ -410,26 +399,18 @@ public class DomainSettingsFragment extends Fragment {
                 // Set the DOM storage switch to off.
                 domStorageSwitch.setChecked(false);
 
                 // Set the DOM storage switch to off.
                 domStorageSwitch.setChecked(false);
 
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled_night, null));
-                } else {
-                    domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled_day, null));
-                }
+                // Set the icon.
+                domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled, null));
             }
         } else {  // JavaScript is disabled.
             }
         } else {  // JavaScript is disabled.
-            // Disable the DOM storage `Switch`.
+            // Disable the DOM storage switch.
             domStorageSwitch.setEnabled(false);
 
             // Set the checked status of DOM storage.
             domStorageSwitch.setChecked(domStorageInt == 1);
 
             domStorageSwitch.setEnabled(false);
 
             // Set the checked status of DOM storage.
             domStorageSwitch.setChecked(domStorageInt == 1);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_ghosted_night, null));
-            } else {
-                domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_ghosted_day, null));
-            }
+            // Set the icon.
+            domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_ghosted, null));
         }
 
         // Set the form data visibility.  Form data can be removed once the minimum API >= 26.
         }
 
         // Set the form data visibility.  Form data can be removed once the minimum API >= 26.
@@ -448,82 +429,58 @@ public class DomainSettingsFragment extends Fragment {
                 // Turn the form data switch to off.
                 formDataSwitch.setChecked(false);
 
                 // Turn the form data switch to off.
                 formDataSwitch.setChecked(false);
 
-                // Set the icon according to the theme.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_disabled_night, null));
-                } else {
-                    formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_disabled_day, null));
-                }
+                // Set the icon.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+                // Doing this makes no sense until it can also be done with the preferences.
+                formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_disabled, null));
             }
         }
 
         // Set the EasyList status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
             }
         }
 
         // Set the EasyList status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+        // Doing this makes no sense until it can also be done with the preferences.
         if (easyListInt == 1) {  // EasyList is on.
             // Turn the switch on.
             easyListSwitch.setChecked(true);
 
         if (easyListInt == 1) {  // EasyList is on.
             // Turn the switch on.
             easyListSwitch.setChecked(true);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_night, null));
-            } else {
-                easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_day, null));
-            }
+            // Set the icon.
+            easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled, null));
         } else {  // EasyList is off.
             // Turn the switch off.
             easyListSwitch.setChecked(false);
 
         } else {  // EasyList is off.
             // Turn the switch off.
             easyListSwitch.setChecked(false);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_night, null));
-            } else {
-                easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_day, null));
-            }
+            // Set the icon.
+            easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled, null));
         }
 
         // Set the EasyPrivacy status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
         }
 
         // Set the EasyPrivacy status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+        // Doing this makes no sense until it can also be done with the preferences.
         if (easyPrivacyInt == 1) {  // EasyPrivacy is on.
             // Turn the switch on.
             easyPrivacySwitch.setChecked(true);
 
         if (easyPrivacyInt == 1) {  // EasyPrivacy is on.
             // Turn the switch on.
             easyPrivacySwitch.setChecked(true);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_night, null));
-            } else {
-                easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_day, null));
-            }
+            // Set the icon.
+            easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled, null));
         } else {  // EasyPrivacy is off.
             // Turn the switch off.
             easyPrivacySwitch.setChecked(false);
 
         } else {  // EasyPrivacy is off.
             // Turn the switch off.
             easyPrivacySwitch.setChecked(false);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_night, null));
-            } else {
-                easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_day, null));
-            }
+            // Set the icon.
+            easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled, null));
         }
 
         // Set the Fanboy's Annoyance List status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
         }
 
         // Set the Fanboy's Annoyance List status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+        // Doing this makes no sense until it can also be done with the preferences.
         if (fanboysAnnoyanceListInt == 1) {  // Fanboy's Annoyance List is on.
             // Turn the switch on.
             fanboysAnnoyanceListSwitch.setChecked(true);
 
         if (fanboysAnnoyanceListInt == 1) {  // Fanboy's Annoyance List is on.
             // Turn the switch on.
             fanboysAnnoyanceListSwitch.setChecked(true);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_night, null));
-            } else {
-                fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_day, null));
-            }
+            // Set the icon.
+            fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled, null));
         } else {  // Fanboy's Annoyance List is off.
             // Turn the switch off.
             fanboysAnnoyanceListSwitch.setChecked(false);
 
         } else {  // Fanboy's Annoyance List is off.
             // Turn the switch off.
             fanboysAnnoyanceListSwitch.setChecked(false);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_night, null));
-            } else {
-                fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_day, null));
-            }
+            // Set the icon.
+            fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled, null));
         }
 
         // Only enable Fanboy's Social Blocking List if Fanboy's Annoyance List is off.
         }
 
         // Only enable Fanboy's Social Blocking List if Fanboy's Annoyance List is off.
@@ -532,26 +489,19 @@ public class DomainSettingsFragment extends Fragment {
             fanboysSocialBlockingListSwitch.setEnabled(true);
 
             // Enable Fanboy's Social Blocking List.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
             fanboysSocialBlockingListSwitch.setEnabled(true);
 
             // Enable Fanboy's Social Blocking List.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+            // Doing this makes no sense until it can also be done with the preferences.
             if (fanboysSocialBlockingListInt == 1) {  // Fanboy's Social Blocking List is on.
                 // Turn on Fanboy's Social Blocking List switch.
                 fanboysSocialBlockingListSwitch.setChecked(true);
 
             if (fanboysSocialBlockingListInt == 1) {  // Fanboy's Social Blocking List is on.
                 // Turn on Fanboy's Social Blocking List switch.
                 fanboysSocialBlockingListSwitch.setChecked(true);
 
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_night, null));
-                } else {
-                    fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_day, null));
-                }
+                // Set the icon.
+                fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled, null));
             } else {  // Fanboy's Social Blocking List is off.
                 // Turn off Fanboy's Social Blocking List switch.
                 fanboysSocialBlockingListSwitch.setChecked(false);
 
             } else {  // Fanboy's Social Blocking List is off.
                 // Turn off Fanboy's Social Blocking List switch.
                 fanboysSocialBlockingListSwitch.setChecked(false);
 
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_night, null));
-                } else {
-                    fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_day, null));
-                }
+                // Set the icon.
+                fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled, null));
             }
         } else {  // Fanboy's Annoyance List is on.
             // Disable Fanboy's Social Blocking List switch.
             }
         } else {  // Fanboy's Annoyance List is on.
             // Disable Fanboy's Social Blocking List switch.
@@ -560,81 +510,56 @@ public class DomainSettingsFragment extends Fragment {
             // Set the status of Fanboy's Social Blocking List.
             fanboysSocialBlockingListSwitch.setChecked(fanboysSocialBlockingListInt == 1);
 
             // Set the status of Fanboy's Social Blocking List.
             fanboysSocialBlockingListSwitch.setChecked(fanboysSocialBlockingListInt == 1);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_ghosted_night, null));
-            } else {
-                fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_ghosted_day, null));
-            }
+            // Set the icon.
+            fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_ghosted, null));
         }
 
         // Set the UltraList status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
         }
 
         // Set the UltraList status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+        // Doing this makes no sense until it can also be done with the preferences.
         if (ultraListInt == 1) {  // UltraList is on.
             // Turn the switch on.
             ultraListSwitch.setChecked(true);
 
         if (ultraListInt == 1) {  // UltraList is on.
             // Turn the switch on.
             ultraListSwitch.setChecked(true);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_night, null));
-            } else {
-                ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_day, null));
-            }
+            // Set the icon.
+            ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled, null));
         } else {  // UltraList is off.
             // Turn the switch off.
             ultraListSwitch.setChecked(false);
 
         } else {  // UltraList is off.
             // Turn the switch off.
             ultraListSwitch.setChecked(false);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_night, null));
-            } else {
-                ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_day, null));
-            }
+            // Set the icon.
+            ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled, null));
         }
 
         // Set the UltraPrivacy status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
         }
 
         // Set the UltraPrivacy status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+        // Doing this makes no sense until it can also be done with the preferences.
         if (ultraPrivacyInt == 1) {  // UltraPrivacy is on.
             // Turn the switch on.
             ultraPrivacySwitch.setChecked(true);
 
         if (ultraPrivacyInt == 1) {  // UltraPrivacy is on.
             // Turn the switch on.
             ultraPrivacySwitch.setChecked(true);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_night, null));
-            } else {
-                ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_day, null));
-            }
+            // Set the icon.
+            ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled, null));
         } else {  // EasyPrivacy is off.
             // Turn the switch off.
             ultraPrivacySwitch.setChecked(false);
 
         } else {  // EasyPrivacy is off.
             // Turn the switch off.
             ultraPrivacySwitch.setChecked(false);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_night, null));
-            } else {
-                ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_day, null));
-            }
+            // Set the icon.
+            ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled, null));
         }
 
         // Set the third-party resource blocking status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
         }
 
         // Set the third-party resource blocking status.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+        // Doing this makes no sense until it can also be done with the preferences.
         if (blockAllThirdPartyRequestsInt == 1) {  // Blocking all third-party requests is on.
             // Turn the switch on.
             blockAllThirdPartyRequestsSwitch.setChecked(true);
 
         if (blockAllThirdPartyRequestsInt == 1) {  // Blocking all third-party requests is on.
             // Turn the switch on.
             blockAllThirdPartyRequestsSwitch.setChecked(true);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_enabled_night, null));
-            } else {
-                blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_enabled_day, null));
-            }
+            // Set the icon.
+            blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_enabled, null));
         } else {  // Blocking all third-party requests is off.
             // Turn the switch off.
             blockAllThirdPartyRequestsSwitch.setChecked(false);
 
         } else {  // Blocking all third-party requests is off.
             // Turn the switch off.
             blockAllThirdPartyRequestsSwitch.setChecked(false);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_disabled_night, null));
-            } else {
-                blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_disabled_day, null));
-            }
+            // Set the icon.
+            blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_disabled, null));
         }
 
         // Inflated a WebView to get the default user agent.
         }
 
         // Inflated a WebView to get the default user agent.
@@ -761,55 +686,40 @@ public class DomainSettingsFragment extends Fragment {
             swipeToRefreshTextView.setText(swipeToRefreshArrayAdapter.getItem(DomainsDatabaseHelper.DISABLED));
         }
 
             swipeToRefreshTextView.setText(swipeToRefreshArrayAdapter.getItem(DomainsDatabaseHelper.DISABLED));
         }
 
-        // Set the swipe to refresh icon and TextView settings.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+        // Set the swipe to refresh icon and text view settings.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+        // Doing this makes no sense until it can also be done with the preferences.
         switch (swipeToRefreshInt) {
             case DomainsDatabaseHelper.SYSTEM_DEFAULT:
                 if (defaultSwipeToRefresh) {  // Swipe to refresh is enabled by default.
         switch (swipeToRefreshInt) {
             case DomainsDatabaseHelper.SYSTEM_DEFAULT:
                 if (defaultSwipeToRefresh) {  // Swipe to refresh is enabled by default.
-                    // Set the icon according to the theme.
-                    if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                        swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_night, null));
-                    } else {
-                        swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_day, null));
-                    }
-                } else {  // Swipe to refresh is disabled by default
-                    // Set the icon according to the theme.
-                    if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                        swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_night, null));
-                    } else {
-                        swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_day, null));
-                    }
+                    // Set the icon.
+                    swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled, null));
+                } else {
+                    // Set the icon.
+                    swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled, null));
                 }
 
                 }
 
-                // Show the swipe to refresh TextView.
+                // Show the swipe to refresh text view.
                 swipeToRefreshTextView.setVisibility(View.VISIBLE);
                 break;
 
             case DomainsDatabaseHelper.ENABLED:
                 swipeToRefreshTextView.setVisibility(View.VISIBLE);
                 break;
 
             case DomainsDatabaseHelper.ENABLED:
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_night, null));
-                } else {
-                    swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_day, null));
-                }
+                // Set the icon.
+                swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled, null));
 
 
-                // Hide the swipe to refresh TextView.`
+                // Hide the swipe to refresh text view.
                 swipeToRefreshTextView.setVisibility(View.GONE);
                 break;
 
             case DomainsDatabaseHelper.DISABLED:
                 swipeToRefreshTextView.setVisibility(View.GONE);
                 break;
 
             case DomainsDatabaseHelper.DISABLED:
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_night, null));
-                } else {
-                    swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_day, null));
-                }
+                // Set the icon.
+                swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled, null));
 
 
-                // Hide the swipe to refresh TextView.
+                // Hide the swipe to refresh text view.
                 swipeToRefreshTextView.setVisibility(View.GONE);
                 break;
         }
 
                 swipeToRefreshTextView.setVisibility(View.GONE);
                 break;
         }
 
-        // Open the swipe to refresh spinner when the TextView is clicked.
+        // Open the swipe to refresh spinner when the text view is clicked.
         swipeToRefreshTextView.setOnClickListener((View v) -> {
             // Open the swipe to refresh spinner.
             swipeToRefreshSpinner.performClick();
         swipeToRefreshTextView.setOnClickListener((View v) -> {
             // Open the swipe to refresh spinner.
             swipeToRefreshSpinner.performClick();
@@ -851,6 +761,7 @@ public class DomainSettingsFragment extends Fragment {
         }
 
         // Set the WebView theme icon and text visibility.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
         }
 
         // Set the WebView theme icon and text visibility.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+        // Doing this makes no sense until it can also be done with the preferences.
         switch (webViewThemeInt) {
             case DomainsDatabaseHelper.SYSTEM_DEFAULT:  // The domain WebView theme is system default.
                 // Set the icon according to the app WebView theme.
         switch (webViewThemeInt) {
             case DomainsDatabaseHelper.SYSTEM_DEFAULT:  // The domain WebView theme is system default.
                 // Set the icon according to the app WebView theme.
@@ -858,29 +769,22 @@ public class DomainSettingsFragment extends Fragment {
                     case DomainsDatabaseHelper.SYSTEM_DEFAULT:  // The default WebView theme is system default.
                         // Set the icon according to the app theme.
                         if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
                     case DomainsDatabaseHelper.SYSTEM_DEFAULT:  // The default WebView theme is system default.
                         // Set the icon according to the app theme.
                         if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            // Set the light mode icon.
-                            webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_day, null));
+                            // Set the light theme icon.
+                            webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme, null));
                         } else {
                             // Set the dark theme icon.
                         } else {
                             // Set the dark theme icon.
-                            webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_night, null));
+                            webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme, null));
                         }
                         break;
 
                     case DomainsDatabaseHelper.LIGHT_THEME:  // the default WebView theme is light.
                         }
                         break;
 
                     case DomainsDatabaseHelper.LIGHT_THEME:  // the default WebView theme is light.
-                        // Set the icon according to the app theme.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_day, null));
-                        } else {
-                            webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_night, null));
-                        }
+                        // Set the icon.
+                        webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme, null));
                         break;
 
                     case DomainsDatabaseHelper.DARK_THEME:  // the default WebView theme is dark.
                         break;
 
                     case DomainsDatabaseHelper.DARK_THEME:  // the default WebView theme is dark.
-                        // Set the icon according to the app theme.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_day, null));
-                        } else {
-                            webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_night, null));                            }
+                        // Set the icon.
+                        webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme, null));
                         break;
                 }
 
                         break;
                 }
 
@@ -889,24 +793,16 @@ public class DomainSettingsFragment extends Fragment {
                 break;
 
             case DomainsDatabaseHelper.LIGHT_THEME:  // The domain WebView theme is light.
                 break;
 
             case DomainsDatabaseHelper.LIGHT_THEME:  // The domain WebView theme is light.
-                // Set the icon according to the app theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_day, null));
-                } else {
-                    webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_night, null));
-                }
+                // Set the icon.
+                webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme, null));
 
                 // Hide the WebView theme text view.
                 webViewThemeTextView.setVisibility(View.GONE);
                 break;
 
             case DomainsDatabaseHelper.DARK_THEME:  // The domain WebView theme is dark.
 
                 // Hide the WebView theme text view.
                 webViewThemeTextView.setVisibility(View.GONE);
                 break;
 
             case DomainsDatabaseHelper.DARK_THEME:  // The domain WebView theme is dark.
-                // Set the icon according to the app theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_day, null));
-                } else {
-                    webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_night, null));
-                }
+                // Set the icon.
+                webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme, null));
 
                 // Hide the WebView theme text view.
                 webViewThemeTextView.setVisibility(View.GONE);
 
                 // Hide the WebView theme text view.
                 webViewThemeTextView.setVisibility(View.GONE);
@@ -930,21 +826,14 @@ public class DomainSettingsFragment extends Fragment {
         }
 
         // Set the wide viewport icon and text view settings.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
         }
 
         // Set the wide viewport icon and text view settings.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+        // Doing this makes no sense until it can also be done with the preferences.
         switch (wideViewportInt) {
             case DomainsDatabaseHelper.SYSTEM_DEFAULT:
         switch (wideViewportInt) {
             case DomainsDatabaseHelper.SYSTEM_DEFAULT:
+                // Set the icon.
                 if (defaultWideViewport) {  // Wide viewport enabled by default.
                 if (defaultWideViewport) {  // Wide viewport enabled by default.
-                    // Set the icon according to the theme.
-                    if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                        wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_night, null));
-                    } else {
-                        wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_day, null));
-                    }
+                    wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled, null));
                 } else {  // Wide viewport disabled by default.
                 } else {  // Wide viewport disabled by default.
-                    if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                        wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_night, null));
-                    } else {
-                        wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_day, null));
-                    }
+                    wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled, null));
                 }
 
                 // Show the wide viewport text view.
                 }
 
                 // Show the wide viewport text view.
@@ -953,23 +842,15 @@ public class DomainSettingsFragment extends Fragment {
 
             case DomainsDatabaseHelper.ENABLED:
                 // Set the icon according to the theme.
 
             case DomainsDatabaseHelper.ENABLED:
                 // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_night, null));
-                } else {
-                    wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_day, null));
-                }
+                wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled, null));
 
                 // Hide the wide viewport text view.
                 wideViewportTextView.setVisibility(View.GONE);
                 break;
 
             case DomainsDatabaseHelper.DISABLED:
 
                 // Hide the wide viewport text view.
                 wideViewportTextView.setVisibility(View.GONE);
                 break;
 
             case DomainsDatabaseHelper.DISABLED:
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_night, null));
-                } else {
-                    wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_day, null));
-                }
+                // Set the icon.
+                wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled, null));
 
                 // Hide the wide viewport text view.
                 wideViewportTextView.setVisibility(View.GONE);
 
                 // Hide the wide viewport text view.
                 wideViewportTextView.setVisibility(View.GONE);
@@ -993,22 +874,15 @@ public class DomainSettingsFragment extends Fragment {
         }
 
         // Set the display website images icon and text view settings.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
         }
 
         // Set the display website images icon and text view settings.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+        // Doing this makes no sense until it can also be done with the preferences.
         switch (displayImagesInt) {
             case DomainsDatabaseHelper.SYSTEM_DEFAULT:
                 if (defaultDisplayWebpageImages) {  // Display webpage images enabled by default.
         switch (displayImagesInt) {
             case DomainsDatabaseHelper.SYSTEM_DEFAULT:
                 if (defaultDisplayWebpageImages) {  // Display webpage images enabled by default.
-                    // Set the icon according to the theme.
-                    if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                        displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_night, null));
-                    } else {
-                        displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_day, null));
-                    }
+                    // Set the icon.
+                    displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled, null));
                 } else {  // Display webpage images disabled by default.
                 } else {  // Display webpage images disabled by default.
-                    // Set the icon according to the theme.
-                    if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                        displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_night, null));
-                    } else {
-                        displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_day, null));
-                    }
+                    // Set the icon.
+                    displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled, null));
                 }
 
                 // Show the display images text view.
                 }
 
                 // Show the display images text view.
@@ -1016,24 +890,16 @@ public class DomainSettingsFragment extends Fragment {
                 break;
 
             case DomainsDatabaseHelper.ENABLED:
                 break;
 
             case DomainsDatabaseHelper.ENABLED:
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_night, null));
-                } else {
-                    displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_day, null));
-                }
+                // Set the icon.
+                displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled, null));
 
                 // Hide the display images text view.
                 displayImagesTextView.setVisibility(View.GONE);
                 break;
 
             case DomainsDatabaseHelper.DISABLED:
 
                 // Hide the display images text view.
                 displayImagesTextView.setVisibility(View.GONE);
                 break;
 
             case DomainsDatabaseHelper.DISABLED:
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_night, null));
-                } else {
-                    displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_day, null));
-                }
+                // Set the icon.
+                displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled, null));
 
                 // Hide the display images text view.
                 displayImagesTextView.setVisibility(View.GONE);
 
                 // Hide the display images text view.
                 displayImagesTextView.setVisibility(View.GONE);
@@ -1048,25 +914,18 @@ public class DomainSettingsFragment extends Fragment {
         
         // Set the pinned SSL certificate icon.
         if (pinnedSslCertificateInt == 1) {  // Pinned SSL certificate is enabled.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
         
         // Set the pinned SSL certificate icon.
         if (pinnedSslCertificateInt == 1) {  // Pinned SSL certificate is enabled.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+            // Doing this makes no sense until it can also be done with the preferences.
             // Check the switch.
             pinnedSslCertificateSwitch.setChecked(true);
 
             // Check the switch.
             pinnedSslCertificateSwitch.setChecked(true);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_night, null));
-            } else {
-                pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_day, null));
-            }
+            // Set the icon.
+            pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled, null));
         } else {  // Pinned SSL certificate is disabled.
             // Uncheck the switch.
             pinnedSslCertificateSwitch.setChecked(false);
 
         } else {  // Pinned SSL certificate is disabled.
             // Uncheck the switch.
             pinnedSslCertificateSwitch.setChecked(false);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_night, null));
-            } else {
-                pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_day, null));
-            }
+            // Set the icon.
+            pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled, null));
         }
 
         // Store the current date.
         }
 
         // Store the current date.
@@ -1235,25 +1094,18 @@ public class DomainSettingsFragment extends Fragment {
 
         // Set the pinned IP addresses icon.
         if (pinnedIpAddressesInt == 1) {  // Pinned IP addresses is enabled.  Once the minimum API >= 21 a selector can be sued as the tint mode instead of specifying different icons.
 
         // Set the pinned IP addresses icon.
         if (pinnedIpAddressesInt == 1) {  // Pinned IP addresses is enabled.  Once the minimum API >= 21 a selector can be sued as the tint mode instead of specifying different icons.
+            // Doing this makes no sense until it can also be done with the preferences.
             // Check the switch.
             pinnedIpAddressesSwitch.setChecked(true);
 
             // Check the switch.
             pinnedIpAddressesSwitch.setChecked(true);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_night, null));
-            } else {
-                pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_day, null));
-            }
+            // Set the icon.
+            pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled, null));
         } else {  // Pinned IP Addresses is disabled.
             // Uncheck the switch.
             pinnedIpAddressesSwitch.setChecked(false);
 
         } else {  // Pinned IP Addresses is disabled.
             // Uncheck the switch.
             pinnedIpAddressesSwitch.setChecked(false);
 
-            // Set the icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_night, null));
-            } else {
-                pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_day, null));
-            }
+            // Set the icon.
+            pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled, null));
         }
 
         // Populate the saved and current IP addresses.
         }
 
         // Populate the saved and current IP addresses.
@@ -1317,41 +1169,28 @@ public class DomainSettingsFragment extends Fragment {
                 if (domStorageSwitch.isChecked()) {  // DOM storage is enabled.
                     domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_enabled, null));
                 } else {  // DOM storage is disabled.
                 if (domStorageSwitch.isChecked()) {  // DOM storage is enabled.
                     domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_enabled, null));
                 } else {  // DOM storage is disabled.
-                    // Set the icon according to the theme.
-                    if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                        domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled_night, null));
-                    } else {
-                        domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled_day, null));
-                    }
+                    // Set the icon.
+                    domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled, null));
                 }
             } else {  // JavaScript is disabled.
                 // Update the JavaScript icon.
                 javaScriptImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.privacy_mode, null));
 
                 }
             } else {  // JavaScript is disabled.
                 // Update the JavaScript icon.
                 javaScriptImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.privacy_mode, null));
 
-                // Disable the DOM storage `Switch`.
+                // Disable the DOM storage switch.
                 domStorageSwitch.setEnabled(false);
 
                 domStorageSwitch.setEnabled(false);
 
-                // Set the DOM storage icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_ghosted_night, null));
-                } else {
-                    domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_ghosted_day, null));
-                }
+                // Set the DOM storage icon.
+                domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_ghosted, null));
             }
         });
 
         // Set the cookies switch listener.
         cookiesSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             }
         });
 
         // Set the cookies switch listener.
         cookiesSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
-            if (isChecked) {  // Cookies are enabled.
-                // Update the cookies icon.
+            // Update the cookies icon.
+            if (isChecked) {
                 cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_enabled, null));
                 cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_enabled, null));
-            } else {  // Cookies are disabled.
-                // Update the cookies icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_disabled_day, null));
-                } else {
-                    cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_disabled_night, null));
-                }
+            } else {
+                cookiesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.cookies_disabled, null));
             }
         });
 
             }
         });
 
@@ -1361,12 +1200,8 @@ public class DomainSettingsFragment extends Fragment {
             if (isChecked) {
                 domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_enabled, null));
             } else {
             if (isChecked) {
                 domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_enabled, null));
             } else {
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled_night, null));
-                } else {
-                    domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled_day, null));
-                }
+                // Set the icon.
+                domStorageImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.dom_storage_disabled, null));
             }
         });
 
             }
         });
 
@@ -1377,12 +1212,8 @@ public class DomainSettingsFragment extends Fragment {
                 if (isChecked) {
                     formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_enabled, null));
                 } else {
                 if (isChecked) {
                     formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_enabled, null));
                 } else {
-                    // Set the icon according to the theme.
-                    if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                        formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_disabled_night, null));
-                    } else {
-                        formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_disabled_day, null));
-                    }
+                    // Set the icon.
+                    formDataImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.form_data_disabled, null));
                 }
             });
         }
                 }
             });
         }
@@ -1390,20 +1221,10 @@ public class DomainSettingsFragment extends Fragment {
         // Set the EasyList switch listener.
         easyListSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
         // Set the EasyList switch listener.
         easyListSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
-            if (isChecked) {  // EasyList is on.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_night, null));
-                } else {
-                    easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_day, null));
-                }
-            } else {  // EasyList is off.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_night, null));
-                } else {
-                    easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_day, null));
-                }
+            if (isChecked) {
+                easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled, null));
+            } else {
+                easyListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled, null));
             }
         });
 
             }
         });
 
@@ -1411,19 +1232,10 @@ public class DomainSettingsFragment extends Fragment {
         easyPrivacySwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
             if (isChecked) {  // EasyPrivacy is on.
         easyPrivacySwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
             if (isChecked) {  // EasyPrivacy is on.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_night, null));
-                } else {
-                    easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_day, null));
-                }
-            } else {  // EasyPrivacy is off.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_night, null));
-                } else {
-                    easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_day, null));
-                }
+                // Set the icon.
+                easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled, null));
+            } else {
+                easyPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled, null));
             }
         });
 
             }
         });
 
@@ -1431,130 +1243,67 @@ public class DomainSettingsFragment extends Fragment {
         fanboysAnnoyanceListSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon and Fanboy's Social Blocking List.
             if (isChecked) {  // Fanboy's Annoyance List is on.
         fanboysAnnoyanceListSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon and Fanboy's Social Blocking List.
             if (isChecked) {  // Fanboy's Annoyance List is on.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_night, null));
-                } else {
-                    fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_day, null));
-                }
+                // Set the icon.
+                fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled, null));
 
                 // Disable the Fanboy's Social Blocking List switch.
                 fanboysSocialBlockingListSwitch.setEnabled(false);
 
 
                 // Disable the Fanboy's Social Blocking List switch.
                 fanboysSocialBlockingListSwitch.setEnabled(false);
 
-                // Update the Fanboy's Social Blocking List icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_ghosted_night, null));
-                } else {
-                    fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_ghosted_day, null));
-                }
+                // Update the Fanboy's Social Blocking List icon.
+                fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_ghosted, null));
             } else {  // Fanboy's Annoyance List is off.
             } else {  // Fanboy's Annoyance List is off.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_night, null));
-                } else {
-                    fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_day, null));
-                }
+                // Set the icon.
+                fanboysAnnoyanceListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled, null));
 
                 // Enable the Fanboy's Social Blocking List switch.
                 fanboysSocialBlockingListSwitch.setEnabled(true);
 
                 // Update the Fanboy's Social Blocking List icon.
 
                 // Enable the Fanboy's Social Blocking List switch.
                 fanboysSocialBlockingListSwitch.setEnabled(true);
 
                 // Update the Fanboy's Social Blocking List icon.
-                if (fanboysSocialBlockingListSwitch.isChecked()) {  // Fanboy's Social Blocking List is on.
-                    // Update the icon according to the theme.
-                    if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                        fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_night, null));
-                    } else {
-                        fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_day, null));
-                    }
-                } else {  // Fanboy's Social Blocking List is off.
-                    // Update the icon according to the theme.
-                    if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                        fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_night, null));
-                    } else {
-                        fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_day, null));
-                    }
+                if (fanboysSocialBlockingListSwitch.isChecked()) {
+                    fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled, null));
+                } else {
+                    fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled, null));
                 }
             }
                 }
             }
-
         });
 
         // Set the Fanboy's Social Blocking List switch listener.
         fanboysSocialBlockingListSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
         });
 
         // Set the Fanboy's Social Blocking List switch listener.
         fanboysSocialBlockingListSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
-            if (isChecked) {  // Fanboy's Social Blocking List is on.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_night, null));
-                } else {
-                    fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled_day, null));
-                }
-            } else {  // Fanboy's Social Blocking List is off.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_night, null));
-                } else {
-                    fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled_day, null));
-                }
+            if (isChecked) {
+                fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_enabled, null));
+            } else {
+                fanboysSocialBlockingListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.social_media_disabled, null));
             }
         });
 
         // Set the UltraList switch listener.
         ultraListSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
             }
         });
 
         // Set the UltraList switch listener.
         ultraListSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
-            if (isChecked) {  // UltraList is on.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_night, null));
-                } else {
-                    ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled_day, null));
-                }
-            } else {  // UltraList is off.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_night, null));
-                } else {
-                    ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled_day, null));
-                }
+            if (isChecked) {
+                ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_enabled, null));
+            } else {
+                ultraListImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_ads_disabled, null));
             }
         });
 
         // Set the UltraPrivacy switch listener.
         ultraPrivacySwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
             }
         });
 
         // Set the UltraPrivacy switch listener.
         ultraPrivacySwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
-            if (isChecked) {  // UltraPrivacy is on.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_night, null));
-                } else {
-                    ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled_day, null));
-                }
-            } else {  // UltraPrivacy is off.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_night, null));
-                } else {
-                    ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled_day, null));
-                }
+            if (isChecked) {
+                ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_enabled, null));
+            } else {
+                ultraPrivacyImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_tracking_disabled, null));
             }
         });
 
         // Set the block all third-party requests switch listener.
         blockAllThirdPartyRequestsSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
             }
         });
 
         // Set the block all third-party requests switch listener.
         blockAllThirdPartyRequestsSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
-            if (isChecked) {  // Blocking all third-party requests is on.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_enabled_night, null));
-                } else {
-                    blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_enabled_day, null));
-                }
-            } else {  // Blocking all third-party requests is off.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_disabled_night, null));
-                } else {
-                    blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_disabled_day, null));
-                }
+            if (isChecked) {
+                blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_enabled, null));
+            } else {
+                blockAllThirdPartyRequestsImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.block_all_third_party_requests_disabled, null));
             }
         });
 
             }
         });
 
@@ -1658,50 +1407,35 @@ public class DomainSettingsFragment extends Fragment {
         swipeToRefreshSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
             @Override
             public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
         swipeToRefreshSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
             @Override
             public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
-                // Update the icon and the visibility of `nightModeTextView`.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+                // Update the icon and the visibility of the night mode text view.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+                // Doing this makes no sense until it can also be done with the preferences.
                 switch (position) {
                     case DomainsDatabaseHelper.SYSTEM_DEFAULT:
                 switch (position) {
                     case DomainsDatabaseHelper.SYSTEM_DEFAULT:
-                        if (defaultSwipeToRefresh) {  // Swipe to refresh enabled by default.
-                            // Set the icon according to the theme.
-                            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                                swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_night, null));
-                            } else {
-                                swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_day, null));
-                            }
-                        } else {  // Swipe to refresh disabled by default.
-                            // Set the icon according to the theme.
-                            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                                swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_night, null));
-                            } else {
-                                swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_day, null));
-                            }
+                        if (defaultSwipeToRefresh) {
+                            // Set the icon.
+                            swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled, null));
+                        } else {
+                            // Set the icon.
+                            swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled, null));
                         }
 
                         }
 
-                        // Show the swipe to refresh TextView.
+                        // Show the swipe to refresh text view.
                         swipeToRefreshTextView.setVisibility(View.VISIBLE);
                         break;
 
                     case DomainsDatabaseHelper.ENABLED:
                         swipeToRefreshTextView.setVisibility(View.VISIBLE);
                         break;
 
                     case DomainsDatabaseHelper.ENABLED:
-                        // Set the icon according to the theme.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                            swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_night, null));
-                        } else {
-                            swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled_day, null));
-                        }
+                        // Set the icon.
+                        swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_enabled, null));
 
 
-                        // Hide the swipe to refresh TextView.
+                        // Hide the swipe to refresh text view.
                         swipeToRefreshTextView.setVisibility(View.GONE);
                         break;
 
                     case DomainsDatabaseHelper.DISABLED:
                         swipeToRefreshTextView.setVisibility(View.GONE);
                         break;
 
                     case DomainsDatabaseHelper.DISABLED:
-                        // Set the icon according to the theme.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                            swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_night, null));
-                        } else {
-                            swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled_day, null));
-                        }
+                        // Set the icon.
+                        swipeToRefreshImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.refresh_disabled, null));
 
 
-                        // Hide the swipe to refresh TextView.
+                        // Hide the swipe to refresh text view.
                         swipeToRefreshTextView.setVisibility(View.GONE);
                 }
             }
                         swipeToRefreshTextView.setVisibility(View.GONE);
                 }
             }
@@ -1717,6 +1451,7 @@ public class DomainSettingsFragment extends Fragment {
             @Override
             public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
                 // Update the icon and the visibility of the WebView theme text view.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
             @Override
             public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
                 // Update the icon and the visibility of the WebView theme text view.  Once the minimum API >= 21 a selector can be used as the tint mode instead of specifying different icons.
+                // Doing this makes no sense until it can also be done with the preferences.
                 switch (position) {
                     case DomainsDatabaseHelper.SYSTEM_DEFAULT:  // the domain WebView theme is system default.
                         // Set the icon according to the app WebView theme.
                 switch (position) {
                     case DomainsDatabaseHelper.SYSTEM_DEFAULT:  // the domain WebView theme is system default.
                         // Set the icon according to the app WebView theme.
@@ -1724,30 +1459,22 @@ public class DomainSettingsFragment extends Fragment {
                             case DomainsDatabaseHelper.SYSTEM_DEFAULT:  // The default WebView theme is system default.
                                 // Set the icon according to the app theme.
                                 if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
                             case DomainsDatabaseHelper.SYSTEM_DEFAULT:  // The default WebView theme is system default.
                                 // Set the icon according to the app theme.
                                 if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                                    // Set the light mode icon.
-                                    webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_day, null));
+                                    // Set the light theme icon.
+                                    webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme, null));
                                 } else {
                                     // Set the dark theme icon.
                                 } else {
                                     // Set the dark theme icon.
-                                    webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_night, null));
+                                    webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme, null));
                                 }
                                 break;
 
                             case DomainsDatabaseHelper.LIGHT_THEME:  // The default WebView theme is light.
                                 }
                                 break;
 
                             case DomainsDatabaseHelper.LIGHT_THEME:  // The default WebView theme is light.
-                                // Set the icon according to the app theme.
-                                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                                    webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_day, null));
-                                } else {
-                                    webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_night, null));
-                                }
+                                // Set the icon.
+                                webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme, null));
                                 break;
 
                             case DomainsDatabaseHelper.DARK_THEME:  // The default WebView theme is dark.
                                 break;
 
                             case DomainsDatabaseHelper.DARK_THEME:  // The default WebView theme is dark.
-                                // Set the icon according to the app theme.
-                                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                                    webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_day, null));
-                                } else {
-                                    webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_night, null));
-                                }
+                                // Set the icon.
+                                webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme, null));
                                 break;
                         }
 
                                 break;
                         }
 
@@ -1756,24 +1483,16 @@ public class DomainSettingsFragment extends Fragment {
                         break;
 
                     case DomainsDatabaseHelper.LIGHT_THEME:  // The domain WebView theme is light.
                         break;
 
                     case DomainsDatabaseHelper.LIGHT_THEME:  // The domain WebView theme is light.
-                        // Set the icon according to the app theme.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_day, null));
-                        } else {
-                            webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme_night, null));
-                        }
+                        // Set the icon.
+                        webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_light_theme, null));
 
                         // Hide the WebView theme text view.
                         webViewThemeTextView.setVisibility(View.GONE);
                         break;
 
                     case DomainsDatabaseHelper.DARK_THEME:  // The domain WebView theme is dark.
 
                         // Hide the WebView theme text view.
                         webViewThemeTextView.setVisibility(View.GONE);
                         break;
 
                     case DomainsDatabaseHelper.DARK_THEME:  // The domain WebView theme is dark.
-                        // Set the icon according to the app theme.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_day, null));
-                        } else {
-                            webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme_night, null));
-                        }
+                        // Set the icon.
+                        webViewThemeImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.webview_dark_theme, null));
 
                         // Hide the WebView theme text view.
                         webViewThemeTextView.setVisibility(View.GONE);
 
                         // Hide the WebView theme text view.
                         webViewThemeTextView.setVisibility(View.GONE);
@@ -1794,19 +1513,11 @@ public class DomainSettingsFragment extends Fragment {
                 // Update the icon and the visibility of the wide viewport text view.
                 switch (position) {
                     case DomainsDatabaseHelper.SYSTEM_DEFAULT:
                 // Update the icon and the visibility of the wide viewport text view.
                 switch (position) {
                     case DomainsDatabaseHelper.SYSTEM_DEFAULT:
+                        // Set the icon.
                         if (defaultWideViewport) {  // Wide viewport is enabled by default.
                         if (defaultWideViewport) {  // Wide viewport is enabled by default.
-                            // Set the icon according to the theme.
-                            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                                wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_night, null));
-                            } else {
-                                wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_day, null));
-                            }
+                            wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled, null));
                         } else {  // Wide viewport is disabled by default.
                         } else {  // Wide viewport is disabled by default.
-                            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                                wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_night, null));
-                            } else {
-                                wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_day, null));
-                            }
+                            wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled, null));
                         }
 
                         // Show the wide viewport text view.
                         }
 
                         // Show the wide viewport text view.
@@ -1815,23 +1526,15 @@ public class DomainSettingsFragment extends Fragment {
 
                     case DomainsDatabaseHelper.ENABLED:
                         // Set the icon according to the theme.
 
                     case DomainsDatabaseHelper.ENABLED:
                         // Set the icon according to the theme.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                            wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_night, null));
-                        } else {
-                            wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled_day, null));
-                        }
+                        wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_enabled, null));
 
                         // Hide the wide viewport text view.
                         wideViewportTextView.setVisibility(View.GONE);
                         break;
 
                     case DomainsDatabaseHelper.DISABLED:
 
                         // Hide the wide viewport text view.
                         wideViewportTextView.setVisibility(View.GONE);
                         break;
 
                     case DomainsDatabaseHelper.DISABLED:
-                        // Set the icon according to the theme.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                            wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_night, null));
-                        } else {
-                            wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled_day, null));
-                        }
+                        // Set the icon.
+                        wideViewportImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.wide_viewport_disabled, null));
 
                         // Hid ethe wide viewport text view.
                         wideViewportTextView.setVisibility(View.GONE);
 
                         // Hid ethe wide viewport text view.
                         wideViewportTextView.setVisibility(View.GONE);
@@ -1853,19 +1556,11 @@ public class DomainSettingsFragment extends Fragment {
                 switch (position) {
                     case DomainsDatabaseHelper.SYSTEM_DEFAULT:
                         if (defaultDisplayWebpageImages) {  // Display webpage images is enabled by default.
                 switch (position) {
                     case DomainsDatabaseHelper.SYSTEM_DEFAULT:
                         if (defaultDisplayWebpageImages) {  // Display webpage images is enabled by default.
-                            // Set the icon according to the theme.
-                            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                                displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_night, null));
-                            } else {
-                                displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_day, null));
-                            }
+                            // Set the icon.
+                            displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled, null));
                         } else {  // Display webpage images is disabled by default.
                         } else {  // Display webpage images is disabled by default.
-                            // Set the icon according to the theme.
-                            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                                displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_night, null));
-                            } else {
-                                displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_day, null));
-                            }
+                            // Set the icon.
+                            displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled, null));
                         }
 
                         // Show the display images text view.
                         }
 
                         // Show the display images text view.
@@ -1873,24 +1568,16 @@ public class DomainSettingsFragment extends Fragment {
                         break;
 
                     case DomainsDatabaseHelper.ENABLED:
                         break;
 
                     case DomainsDatabaseHelper.ENABLED:
-                        // Set the icon according to the theme.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                            displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_night, null));
-                        } else {
-                            displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled_day, null));
-                        }
+                        // Set the icon.
+                        displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_enabled, null));
 
                         // Hide the display images text view.
                         displayImagesTextView.setVisibility(View.GONE);
                         break;
 
                     case DomainsDatabaseHelper.DISABLED:
 
                         // Hide the display images text view.
                         displayImagesTextView.setVisibility(View.GONE);
                         break;
 
                     case DomainsDatabaseHelper.DISABLED:
-                        // Set the icon according to the theme.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                            displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_night, null));
-                        } else {
-                            displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled_day, null));
-                        }
+                        // Set the icon.
+                        displayWebpageImagesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.images_disabled, null));
 
                         // Hide the display images text view.
                         displayImagesTextView.setVisibility(View.GONE);
 
                         // Hide the display images text view.
                         displayImagesTextView.setVisibility(View.GONE);
@@ -1908,12 +1595,8 @@ public class DomainSettingsFragment extends Fragment {
         pinnedSslCertificateSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
             if (isChecked) {  // SSL certificate pinning is enabled.
         pinnedSslCertificateSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
             if (isChecked) {  // SSL certificate pinning is enabled.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_night, null));
-                } else {
-                    pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_day, null));
-                }
+                // Set the icon.
+                pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled, null));
 
                 // Update the visibility of the saved SSL certificate.
                 if (savedSslIssuedToCNameString == null) {
 
                 // Update the visibility of the saved SSL certificate.
                 if (savedSslIssuedToCNameString == null) {
@@ -1985,12 +1668,8 @@ public class DomainSettingsFragment extends Fragment {
                     noCurrentWebsiteCertificateTextView.getParent().requestChildFocus(noCurrentWebsiteCertificateTextView, noCurrentWebsiteCertificateTextView);
                 }
             } else {  // SSL certificate pinning is disabled.
                     noCurrentWebsiteCertificateTextView.getParent().requestChildFocus(noCurrentWebsiteCertificateTextView, noCurrentWebsiteCertificateTextView);
                 }
             } else {  // SSL certificate pinning is disabled.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_night, null));
-                } else {
-                    pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_day, null));
-                }
+                // Set the icon.
+                pinnedSslCertificateImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled, null));
 
                 // Hide the SSl certificates and instructions.
                 savedSslCardView.setVisibility(View.GONE);
 
                 // Hide the SSl certificates and instructions.
                 savedSslCardView.setVisibility(View.GONE);
@@ -2079,12 +1758,8 @@ public class DomainSettingsFragment extends Fragment {
         pinnedIpAddressesSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
             if (isChecked) {  // IP addresses pinning is enabled.
         pinnedIpAddressesSwitch.setOnCheckedChangeListener((CompoundButton buttonView, boolean isChecked) -> {
             // Update the icon.
             if (isChecked) {  // IP addresses pinning is enabled.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_night, null));
-                } else {
-                    pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled_day, null));
-                }
+                // Set the icon.
+                pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_enabled, null));
 
                 // Update the visibility of the saved IP addresses card view.
                 if (savedIpAddresses == null) {  // There are no saved IP addresses.
 
                 // Update the visibility of the saved IP addresses card view.
                 if (savedIpAddresses == null) {  // There are no saved IP addresses.
@@ -2134,12 +1809,8 @@ public class DomainSettingsFragment extends Fragment {
                 // Scroll to the bottom of the card views.
                 currentIpAddressesCardView.getParent().requestChildFocus(currentIpAddressesCardView, currentIpAddressesCardView);
             } else {  // IP addresses pinning is disabled.
                 // Scroll to the bottom of the card views.
                 currentIpAddressesCardView.getParent().requestChildFocus(currentIpAddressesCardView, currentIpAddressesCardView);
             } else {  // IP addresses pinning is disabled.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_night, null));
-                } else {
-                    pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled_day, null));
-                }
+                // Set the icon.
+                pinnedIpAddressesImageView.setImageDrawable(ResourcesCompat.getDrawable(resources, R.drawable.ssl_certificate_disabled, null));
 
                 // Hide the IP addresses card views.
                 savedIpAddressesCardView.setVisibility(View.GONE);
 
                 // Hide the IP addresses card views.
                 savedIpAddressesCardView.setVisibility(View.GONE);
index 494606ff670d1eb7a0a232011ceb4bdcfea74ff5..92d4b885eaa2d123883cca94058e612f616cb4cb 100644 (file)
@@ -20,7 +20,6 @@
 package com.stoutner.privacybrowser.fragments;
 
 import android.content.Context;
 package com.stoutner.privacybrowser.fragments;
 
 import android.content.Context;
-import android.content.res.Configuration;
 import android.os.Bundle;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.os.Bundle;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -110,15 +109,8 @@ public class DomainsListFragment extends Fragment {
                     // Enable the delete menu item.
                     DomainsActivity.deleteMenuItem.setEnabled(true);
 
                     // Enable the delete menu item.
                     DomainsActivity.deleteMenuItem.setEnabled(true);
 
-                    // Get the current theme status.
-                    int currentThemeStatus = getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
-
-                    // Set the delete icon according to the theme.
-                    if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                        DomainsActivity.deleteMenuItem.setIcon(R.drawable.delete_night);
-                    } else {
-                        DomainsActivity.deleteMenuItem.setIcon(R.drawable.delete_day);
-                    }
+                    // Set the delete icon.
+                    DomainsActivity.deleteMenuItem.setIcon(R.drawable.delete_enabled);
                 }
 
                 // Display the domain settings fragment.
                 }
 
                 // Display the domain settings fragment.
index 3e4e93ba1cef5edf5003275dfe4d8c0147f918de..05b82dff6e8a2bddfb3b668a4f007acb0534cc95 100644 (file)
@@ -44,6 +44,8 @@ import com.stoutner.privacybrowser.R;
 import com.stoutner.privacybrowser.activities.MainWebViewActivity;
 import com.stoutner.privacybrowser.helpers.ProxyHelper;
 
 import com.stoutner.privacybrowser.activities.MainWebViewActivity;
 import com.stoutner.privacybrowser.helpers.ProxyHelper;
 
+import java.util.Objects;
+
 public class SettingsFragment extends PreferenceFragmentCompat {
     // Declare the class variables.
     private int currentThemeStatus;
 public class SettingsFragment extends PreferenceFragmentCompat {
     // Declare the class variables.
     private int currentThemeStatus;
@@ -121,6 +123,9 @@ public class SettingsFragment extends PreferenceFragmentCompat {
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = getPreferenceScreen().getSharedPreferences();
 
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = getPreferenceScreen().getSharedPreferences();
 
+        // Remove the incorrect warning below that the shared preferences might be null.
+        assert sharedPreferences != null;
+
         // Get handles for the preferences.
         javaScriptPreference = findPreference("javascript");
         cookiesPreference = findPreference(getString(R.string.cookies_key));
         // Get handles for the preferences.
         javaScriptPreference = findPreference("javascript");
         cookiesPreference = findPreference(getString(R.string.cookies_key));
@@ -290,8 +295,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
         customUserAgentPreference.setSummary(sharedPreferences.getString("custom_user_agent", getString(R.string.custom_user_agent_default_value)));
 
         // Only enable the custom user agent preference if the user agent is set to `Custom`.
         customUserAgentPreference.setSummary(sharedPreferences.getString("custom_user_agent", getString(R.string.custom_user_agent_default_value)));
 
         // Only enable the custom user agent preference if the user agent is set to `Custom`.
-        customUserAgentPreference.setEnabled(userAgentPreference.getSummary().equals(getString(R.string.custom_user_agent)));
-
+        customUserAgentPreference.setEnabled(Objects.equals(userAgentPreference.getSummary(), getString(R.string.custom_user_agent)));
 
         // Set the search URL as the summary text for the search preference when the preference screen is loaded.
         if (searchString.equals("Custom URL")) {
 
         // Set the search URL as the summary text for the search preference when the preference screen is loaded.
         if (searchString.equals("Custom URL")) {
@@ -414,11 +418,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
         if (sharedPreferences.getBoolean(getString(R.string.cookies_key), false)) {
             cookiesPreference.setIcon(R.drawable.cookies_enabled);
         } else {
         if (sharedPreferences.getBoolean(getString(R.string.cookies_key), false)) {
             cookiesPreference.setIcon(R.drawable.cookies_enabled);
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                cookiesPreference.setIcon(R.drawable.cookies_disabled_day);
-            } else {
-                cookiesPreference.setIcon(R.drawable.cookies_disabled_night);
-            }
+            cookiesPreference.setIcon(R.drawable.cookies_disabled);
         }
 
         // Set the DOM storage icon.
         }
 
         // Set the DOM storage icon.
@@ -426,18 +426,10 @@ public class SettingsFragment extends PreferenceFragmentCompat {
             if (sharedPreferences.getBoolean("dom_storage", false)) {  // DOM storage is enabled.
                 domStoragePreference.setIcon(R.drawable.dom_storage_enabled);
             } else {  // DOM storage is disabled.
             if (sharedPreferences.getBoolean("dom_storage", false)) {  // DOM storage is enabled.
                 domStoragePreference.setIcon(R.drawable.dom_storage_enabled);
             } else {  // DOM storage is disabled.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    domStoragePreference.setIcon(R.drawable.dom_storage_disabled_day);
-                } else {
-                    domStoragePreference.setIcon(R.drawable.dom_storage_disabled_night);
-                }
+                domStoragePreference.setIcon(R.drawable.dom_storage_disabled);
             }
         } else {  // The preference is disabled.  The icon should be ghosted.
             }
         } else {  // The preference is disabled.  The icon should be ghosted.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                domStoragePreference.setIcon(R.drawable.dom_storage_ghosted_day);
-            } else {
-                domStoragePreference.setIcon(R.drawable.dom_storage_ghosted_night);
-            }
+            domStoragePreference.setIcon(R.drawable.dom_storage_ghosted);
         }
 
         // Set the save form data icon if API < 26.  Save form data has no effect on API >= 26.
         }
 
         // Set the save form data icon if API < 26.  Save form data has no effect on API >= 26.
@@ -445,464 +437,233 @@ public class SettingsFragment extends PreferenceFragmentCompat {
             if (sharedPreferences.getBoolean("save_form_data", false)) {
                 formDataPreference.setIcon(R.drawable.form_data_enabled);
             } else {
             if (sharedPreferences.getBoolean("save_form_data", false)) {
                 formDataPreference.setIcon(R.drawable.form_data_enabled);
             } else {
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    formDataPreference.setIcon(R.drawable.form_data_disabled_day);
-                } else {
-                    formDataPreference.setIcon(R.drawable.form_data_disabled_night);
-                }
+                formDataPreference.setIcon(R.drawable.form_data_disabled);
             }
         }
 
         // Set the custom user agent icon.
         if (customUserAgentPreference.isEnabled()) {
             }
         }
 
         // Set the custom user agent icon.
         if (customUserAgentPreference.isEnabled()) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                customUserAgentPreference.setIcon(R.drawable.custom_user_agent_enabled_day);
-            } else {
-                customUserAgentPreference.setIcon(R.drawable.custom_user_agent_enabled_night);
-            }
+            customUserAgentPreference.setIcon(R.drawable.custom_user_agent_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted_day);
-            } else {
-                customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted_night);
-            }
+            customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted);
         }
 
         // Set the incognito mode icon.
         if (sharedPreferences.getBoolean("incognito_mode", false)) {
         }
 
         // Set the incognito mode icon.
         if (sharedPreferences.getBoolean("incognito_mode", false)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                incognitoModePreference.setIcon(R.drawable.incognito_mode_enabled_night);
-            } else {
-                incognitoModePreference.setIcon(R.drawable.incognito_mode_enabled_day);
-            }
+            incognitoModePreference.setIcon(R.drawable.incognito_mode_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                incognitoModePreference.setIcon(R.drawable.incognito_mode_disabled_night);
-            } else {
-                incognitoModePreference.setIcon(R.drawable.incognito_mode_disabled_day);
-            }
+            incognitoModePreference.setIcon(R.drawable.incognito_mode_disabled);
         }
 
         // Set the allow screenshots icon.
         if (sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false)) {
         }
 
         // Set the allow screenshots icon.
         if (sharedPreferences.getBoolean(getString(R.string.allow_screenshots_key), false)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_enabled_day);
-            } else {
-                allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_enabled_night);
-            }
+            allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_disabled_day);
-            } else {
-                allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_disabled_night);
-            }
+            allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_disabled);
         }
 
         // Set the EasyList icon.
         if (sharedPreferences.getBoolean("easylist", true)) {
         }
 
         // Set the EasyList icon.
         if (sharedPreferences.getBoolean("easylist", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                easyListPreference.setIcon(R.drawable.block_ads_enabled_night);
-            } else {
-                easyListPreference.setIcon(R.drawable.block_ads_enabled_day);
-            }
+            easyListPreference.setIcon(R.drawable.block_ads_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                easyListPreference.setIcon(R.drawable.block_ads_disabled_night);
-            } else {
-                easyListPreference.setIcon(R.drawable.block_ads_disabled_day);
-            }
+            easyListPreference.setIcon(R.drawable.block_ads_disabled);
         }
 
         // Set the EasyPrivacy icon.
         if (sharedPreferences.getBoolean("easyprivacy", true)) {
         }
 
         // Set the EasyPrivacy icon.
         if (sharedPreferences.getBoolean("easyprivacy", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                easyPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_night);
-            } else {
-                easyPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_day);
-            }
+            easyPrivacyPreference.setIcon(R.drawable.block_tracking_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                easyPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_night);
-            } else {
-                easyPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_day);
-            }
+            easyPrivacyPreference.setIcon(R.drawable.block_tracking_disabled);
         }
 
         // Set the Fanboy lists icons.
         if (fanboyAnnoyanceListEnabled) {
         }
 
         // Set the Fanboy lists icons.
         if (fanboyAnnoyanceListEnabled) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                // Set the Fanboy annoyance list icon.
-                fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_enabled_night);
+            // Set the Fanboy annoyance list icon.
+            fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_enabled);
 
 
-                // Set the Fanboy social blocking list icon.
-                fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_ghosted_night);
-            } else {
-                // Set the Fanboy annoyance list icon.
-                fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_enabled_day);
-
-                // Set the Fanboy social blocking list icon.
-                fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_ghosted_day);
-            }
+            // Set the Fanboy social blocking list icon.
+            fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_ghosted);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                // Set the Fanboy annoyance list icon.
-                fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_disabled_night);
+            // Set the Fanboy annoyance list icon.
+            fanboyAnnoyanceListPreference.setIcon(R.drawable.social_media_disabled);
 
 
-                // Set the Fanboy social blocking list icon.
-                if (fanboySocialBlockingEnabled) {
-                    fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_enabled_night);
-                } else {
-                    fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_disabled_night);
-                }
+            // Set the Fanboy social blocking list icon.
+            if (fanboySocialBlockingEnabled) {
+                fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_enabled);
             } else {
             } else {
-                // Set the Fanboy annoyance list icon.
-                fanboyAnnoyanceListPreference.setIcon(R.drawable.block_ads_disabled_day);
-
-                // Set the Fanboy social blocking list icon.
-                if (fanboySocialBlockingEnabled) {
-                    fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_enabled_day);
-                } else {
-                    fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_disabled_day);
-                }
+                fanboySocialBlockingListPreference.setIcon(R.drawable.social_media_disabled);
             }
         }
 
         // Set the UltraList icon.
         if (sharedPreferences.getBoolean("ultralist", true)){
             }
         }
 
         // Set the UltraList icon.
         if (sharedPreferences.getBoolean("ultralist", true)){
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                ultraListPreference.setIcon(R.drawable.block_ads_enabled_night);
-            } else {
-                ultraListPreference.setIcon(R.drawable.block_ads_enabled_day);
-            }
+            ultraListPreference.setIcon(R.drawable.block_ads_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                ultraListPreference.setIcon(R.drawable.block_ads_disabled_night);
-            } else {
-                ultraListPreference.setIcon(R.drawable.block_ads_disabled_day);
-            }
+            ultraListPreference.setIcon(R.drawable.block_ads_disabled);
         }
 
         // Set the UltraPrivacy icon.
         if (sharedPreferences.getBoolean("ultraprivacy", true)) {
         }
 
         // Set the UltraPrivacy icon.
         if (sharedPreferences.getBoolean("ultraprivacy", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                ultraPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_night);
-            } else {
-                ultraPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_day);
-            }
+            ultraPrivacyPreference.setIcon(R.drawable.block_tracking_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                ultraPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_night);
-            } else {
-                ultraPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_day);
-            }
+            ultraPrivacyPreference.setIcon(R.drawable.block_tracking_disabled);
         }
 
         // Set the block all third-party requests icon.
         if (sharedPreferences.getBoolean("block_all_third_party_requests", false)) {
         }
 
         // Set the block all third-party requests icon.
         if (sharedPreferences.getBoolean("block_all_third_party_requests", false)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_enabled_night);
-            } else {
-                blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_enabled_day);
-            }
+            blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_disabled_night);
-            } else {
-                blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_disabled_day);
-            }
+            blockAllThirdPartyRequestsPreference.setIcon(R.drawable.block_all_third_party_requests_disabled);
         }
 
         }
 
-        // Set the Google Analytics icon according to the theme.
+        // Set the Google Analytics icon.
         if (sharedPreferences.getBoolean("google_analytics", true)) {
         if (sharedPreferences.getBoolean("google_analytics", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled_night);
-            } else {
-                googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled_day);
-            }
+            googleAnalyticsPreference.setIcon(R.drawable.modify_url_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled_night);
-            } else {
-                googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled_day);
-            }
+            googleAnalyticsPreference.setIcon(R.drawable.modify_url_disabled);
         }
 
         }
 
-        // Set the Facebook Click IDs icon according to the theme.
+        // Set the Facebook Click IDs icon.
         if (sharedPreferences.getBoolean("facebook_click_ids", true)) {
         if (sharedPreferences.getBoolean("facebook_click_ids", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled_night);
-            } else {
-                facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled_day);
-            }
+            facebookClickIdsPreference.setIcon(R.drawable.modify_url_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled_night);
-            } else {
-                facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled_day);
-            }
+            facebookClickIdsPreference.setIcon(R.drawable.modify_url_disabled);
         }
 
         }
 
-        // Set the Twitter AMP redirects icon according to the theme.
+        // Set the Twitter AMP redirects icon.
         if (sharedPreferences.getBoolean("twitter_amp_redirects", true)) {
         if (sharedPreferences.getBoolean("twitter_amp_redirects", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled_night);
-            } else {
-                twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled_day);
-            }
+            twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled_night);
-            } else {
-                twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled_day);
-            }
+            twitterAmpRedirectsPreference.setIcon(R.drawable.modify_url_disabled);
         }
 
         // Set the search custom URL icon.
         if (searchCustomURLPreference.isEnabled()) {
         }
 
         // Set the search custom URL icon.
         if (searchCustomURLPreference.isEnabled()) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                searchCustomURLPreference.setIcon(R.drawable.search_custom_url_enabled_night);
-            } else {
-                searchCustomURLPreference.setIcon(R.drawable.search_custom_url_enabled_day);
-            }
+            searchCustomURLPreference.setIcon(R.drawable.search_custom_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                searchCustomURLPreference.setIcon(R.drawable.search_custom_url_ghosted_night);
-            } else {
-                searchCustomURLPreference.setIcon(R.drawable.search_custom_url_ghosted_day);
-            }
+            searchCustomURLPreference.setIcon(R.drawable.search_custom_ghosted);
         }
 
         // Set the Proxy icons according to the theme and status.
         if (proxyString.equals(ProxyHelper.NONE)) {  // Proxying is disabled.
         }
 
         // Set the Proxy icons according to the theme and status.
         if (proxyString.equals(ProxyHelper.NONE)) {  // Proxying is disabled.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {  // Dark theme.
-                // Set the main proxy icon to be disabled.
-                proxyPreference.setIcon(R.drawable.proxy_disabled_night);
-
-                // Set the custom proxy URL icon to be ghosted.
-                proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted_night);
-            } else {  // Light theme.
-                // Set the main proxy icon to be disabled.
-                proxyPreference.setIcon(R.drawable.proxy_disabled_day);
-
-                // Set the custom proxy URL icon to be ghosted.
-                proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted_day);
-            }
+            // Set the main proxy icon to be disabled.
+            proxyPreference.setIcon(R.drawable.proxy_disabled);
+
+            // Set the custom proxy URL icon to be ghosted.
+            proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted);
         } else {  // Proxying is enabled.
         } else {  // Proxying is enabled.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {  // Dark theme.
-                // Set the main proxy icon to be enabled.
-                proxyPreference.setIcon(R.drawable.proxy_enabled_night);
-
-                // Set the custom proxy URL icon according to its status.
-                if (proxyCustomUrlPreference.isEnabled()) {  // Custom proxy is enabled.
-                    proxyCustomUrlPreference.setIcon(R.drawable.proxy_enabled_night);
-                } else {  // Custom proxy is disabled.
-                    proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted_night);
-                }
-            } else {  // Light theme.
-                // Set the main proxy icon to be enabled.
-                proxyPreference.setIcon(R.drawable.proxy_enabled_day);
-
-                // Set the custom proxy URL icon according to its status.
-                if (proxyCustomUrlPreference.isEnabled()) {  // Custom proxy is enabled.
-                    proxyCustomUrlPreference.setIcon(R.drawable.proxy_enabled_day);
-                } else {  // Custom proxy is disabled.
-                    proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted_day);
-                }
+            // Set the main proxy icon to be enabled.
+            proxyPreference.setIcon(R.drawable.proxy_enabled);
+
+            // Set the custom proxy URL icon according to its status.
+            if (proxyCustomUrlPreference.isEnabled()) {
+                proxyCustomUrlPreference.setIcon(R.drawable.proxy_enabled);
+            } else {
+                proxyCustomUrlPreference.setIcon(R.drawable.proxy_ghosted);
             }
         }
 
         // Set the full screen browsing mode icons.
         if (fullScreenBrowsingMode) {  // Full screen browsing mode is enabled.
             }
         }
 
         // Set the full screen browsing mode icons.
         if (fullScreenBrowsingMode) {  // Full screen browsing mode is enabled.
-            // Set the `fullScreenBrowsingModePreference` icon according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled_night);
-            } else {
-                fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled_day);
-            }
+            // Set the full screen browsing mode preference icon.
+            fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_enabled);
 
             // Set the hide app bar icon.
 
             // Set the hide app bar icon.
-            if (sharedPreferences.getBoolean("hide_app_bar", true)) {  // Hide app bar is enabled.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_night);
-                } else {
-                    hideAppBarPreference.setIcon(R.drawable.app_bar_enabled_day);
-                }
-            } else {  // Hide app bar is disabled.
-                // Set the icon according to the theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_night);
-                } else {
-                    hideAppBarPreference.setIcon(R.drawable.app_bar_disabled_day);
-                }
-            }
-        } else {  // Full screen browsing mode is disabled.
-            // Set the icons according to the theme.
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled_night);
-                hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted_night);
+            if (sharedPreferences.getBoolean("hide_app_bar", true)) {
+                hideAppBarPreference.setIcon(R.drawable.app_bar_enabled);
             } else {
             } else {
-                fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled_day);
-                hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted_day);
+                hideAppBarPreference.setIcon(R.drawable.app_bar_disabled);
             }
             }
+        } else {  // Full screen browsing mode is disabled.
+            // Set the icons.
+            fullScreenBrowsingModePreference.setIcon(R.drawable.full_screen_disabled);
+            hideAppBarPreference.setIcon(R.drawable.app_bar_ghosted);
         }
 
         // Set the clear everything preference icon.
         if (clearEverything) {
         }
 
         // Set the clear everything preference icon.
         if (clearEverything) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                clearEverythingPreference.setIcon(R.drawable.clear_everything_enabled_day);
-            } else {
-                clearEverythingPreference.setIcon(R.drawable.clear_everything_enabled_night);
-            }
+            clearEverythingPreference.setIcon(R.drawable.clear_everything_enabled);
         } else {
             clearEverythingPreference.setIcon(R.drawable.clear_everything_disabled);
         }
 
         // Set the clear cookies preference icon.
         if (clearEverything || sharedPreferences.getBoolean("clear_cookies", true)) {
         } else {
             clearEverythingPreference.setIcon(R.drawable.clear_everything_disabled);
         }
 
         // Set the clear cookies preference icon.
         if (clearEverything || sharedPreferences.getBoolean("clear_cookies", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                clearCookiesPreference.setIcon(R.drawable.cookies_cleared_day);
-            } else {
-                clearCookiesPreference.setIcon(R.drawable.cookies_cleared_night);
-            }
+            clearCookiesPreference.setIcon(R.drawable.clear_cookies_enabled);
         } else {
         } else {
-            clearCookiesPreference.setIcon(R.drawable.cookies_warning);
+            clearCookiesPreference.setIcon(R.drawable.clear_cookies_disabled);
         }
 
         // Set the clear DOM storage preference icon.
         if (clearEverything || sharedPreferences.getBoolean("clear_dom_storage", true)) {
         }
 
         // Set the clear DOM storage preference icon.
         if (clearEverything || sharedPreferences.getBoolean("clear_dom_storage", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                clearDomStoragePreference.setIcon(R.drawable.dom_storage_cleared_night);
-            } else {
-                clearDomStoragePreference.setIcon(R.drawable.dom_storage_cleared_day);
-            }
+            clearDomStoragePreference.setIcon(R.drawable.clear_dom_storage_enabled);
         } else {
         } else {
-            clearDomStoragePreference.setIcon(R.drawable.dom_storage_warning);
+            clearDomStoragePreference.setIcon(R.drawable.clear_dom_storage_disabled);
         }
 
         // Set the clear form data preference icon if the API < 26.  It has no effect on newer versions of Android.
         if (Build.VERSION.SDK_INT < 26) {
             if (clearEverything || sharedPreferences.getBoolean("clear_form_data", true)) {
         }
 
         // Set the clear form data preference icon if the API < 26.  It has no effect on newer versions of Android.
         if (Build.VERSION.SDK_INT < 26) {
             if (clearEverything || sharedPreferences.getBoolean("clear_form_data", true)) {
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                    clearFormDataPreference.setIcon(R.drawable.form_data_cleared_night);
-                } else {
-                    clearFormDataPreference.setIcon(R.drawable.form_data_cleared_day);
-                }
+                clearFormDataPreference.setIcon(R.drawable.clear_form_data_enabled);
             } else {
             } else {
-                clearFormDataPreference.setIcon(R.drawable.form_data_warning);
+                clearFormDataPreference.setIcon(R.drawable.clear_form_data_disabled);
             }
         }
 
         // Set the clear logcat preference icon.
         if (clearEverything || sharedPreferences.getBoolean(getString(R.string.clear_logcat_key), true)) {
             }
         }
 
         // Set the clear logcat preference icon.
         if (clearEverything || sharedPreferences.getBoolean(getString(R.string.clear_logcat_key), true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                clearLogcatPreference.setIcon(R.drawable.bug_cleared_day);
-            } else {
-                clearLogcatPreference.setIcon(R.drawable.bug_cleared_night);
-            }
+            clearLogcatPreference.setIcon(R.drawable.clear_logcat_enabled);
         } else {
         } else {
-            clearLogcatPreference.setIcon(R.drawable.bug_warning);
+            clearLogcatPreference.setIcon(R.drawable.clear_logcat_disabled);
         }
 
         // Set the clear cache preference icon.
         if (clearEverything || sharedPreferences.getBoolean("clear_cache", true)) {
         }
 
         // Set the clear cache preference icon.
         if (clearEverything || sharedPreferences.getBoolean("clear_cache", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                clearCachePreference.setIcon(R.drawable.cache_cleared_night);
-            } else {
-                clearCachePreference.setIcon(R.drawable.cache_cleared_day);
-            }
+            clearCachePreference.setIcon(R.drawable.clear_cache_enabled);
         } else {
         } else {
-            clearCachePreference.setIcon(R.drawable.cache_warning);
+            clearCachePreference.setIcon(R.drawable.clear_cache_disabled);
         }
 
         // Set the open intents in new tab preference icon.
         if (sharedPreferences.getBoolean("open_intents_in_new_tab", true)) {
         }
 
         // Set the open intents in new tab preference icon.
         if (sharedPreferences.getBoolean("open_intents_in_new_tab", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                openIntentsInNewTabPreference.setIcon(R.drawable.tab_enabled_night);
-            } else {
-                openIntentsInNewTabPreference.setIcon(R.drawable.tab_enabled_day);
-            }
+            openIntentsInNewTabPreference.setIcon(R.drawable.tab_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                openIntentsInNewTabPreference.setIcon(R.drawable.tab_disabled_night);
-            } else {
-                openIntentsInNewTabPreference.setIcon(R.drawable.tab_disabled_day);
-            }
+            openIntentsInNewTabPreference.setIcon(R.drawable.tab_disabled);
         }
 
         // Set the swipe to refresh preference icon.
         if (sharedPreferences.getBoolean("swipe_to_refresh", true)) {
         }
 
         // Set the swipe to refresh preference icon.
         if (sharedPreferences.getBoolean("swipe_to_refresh", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled_day);
-            } else {
-                swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled_night);
-            }
+            swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                swipeToRefreshPreference.setIcon(R.drawable.refresh_disabled_day);
-            } else {
-                swipeToRefreshPreference.setIcon(R.drawable.refresh_disabled_night);
-            }
+            swipeToRefreshPreference.setIcon(R.drawable.refresh_disabled);
         }
 
         // Set the download with external app preference icon.
         if (sharedPreferences.getBoolean(getString(R.string.download_with_external_app_key), false)) {
         }
 
         // Set the download with external app preference icon.
         if (sharedPreferences.getBoolean(getString(R.string.download_with_external_app_key), false)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_enabled_day);
-            } else {
-                downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_enabled_night);
-            }
+            downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_disabled_day);
-            } else {
-                downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_disabled_night);
-            }
+            downloadWithExternalAppPreference.setIcon(R.drawable.download_with_external_app_disabled);
         }
 
         // Set the scroll app bar preference icon.
         if (sharedPreferences.getBoolean(getString(R.string.scroll_app_bar_key), true)) {
         }
 
         // Set the scroll app bar preference icon.
         if (sharedPreferences.getBoolean(getString(R.string.scroll_app_bar_key), true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled_day);
-            } else {
-                scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled_night);
-            }
+            scrollAppBarPreference.setIcon(R.drawable.app_bar_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled_day);
-            } else {
-                scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled_night);
-            }
+            scrollAppBarPreference.setIcon(R.drawable.app_bar_disabled);
         }
 
         // Set the bottom app bar preference icon.
         if (sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false)) {
         }
 
         // Set the bottom app bar preference icon.
         if (sharedPreferences.getBoolean(getString(R.string.bottom_app_bar_key), false)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled_day);
-            } else {
-                bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled_night);
-            }
+            bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled_day);
-            } else {
-                bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled_night);
-            }
+            bottomAppBarPreference.setIcon(R.drawable.bottom_app_bar_disabled);
         }
 
         // Set the display additional app bar icons preference icon.
         if (sharedPreferences.getBoolean(getString(R.string.display_additional_app_bar_icons_key), false)) {
         }
 
         // Set the display additional app bar icons preference icon.
         if (sharedPreferences.getBoolean(getString(R.string.display_additional_app_bar_icons_key), false)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_enabled_day);
-            } else {
-                displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_enabled_night);
-            }
+            displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled_day);
-            } else {
-                displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled_night);
-            }
+            displayAdditionalAppBarIconsPreference.setIcon(R.drawable.more_disabled);
         }
 
         // Set the WebView theme preference icon.
         }
 
         // Set the WebView theme preference icon.
@@ -910,58 +671,35 @@ public class SettingsFragment extends PreferenceFragmentCompat {
             case 0:  // The system default WebView theme is selected.
                 // Set the icon according to the app theme.
                 if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
             case 0:  // The system default WebView theme is selected.
                 // Set the icon according to the app theme.
                 if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    webViewThemePreference.setIcon(R.drawable.webview_light_theme_day);
+                    webViewThemePreference.setIcon(R.drawable.webview_light_theme);
                 } else {
                 } else {
-                    webViewThemePreference.setIcon(R.drawable.webview_dark_theme_night);
+                    webViewThemePreference.setIcon(R.drawable.webview_dark_theme);
                 }
                 break;
 
             case 1:  // The light WebView theme is selected.
                 }
                 break;
 
             case 1:  // The light WebView theme is selected.
-                // Set the icon according to the app theme.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    webViewThemePreference.setIcon(R.drawable.webview_light_theme_day);
-                } else {
-                    webViewThemePreference.setIcon(R.drawable.webview_light_theme_night);
-                }
+                // Set the icon.
+                webViewThemePreference.setIcon(R.drawable.webview_light_theme);
                 break;
 
             case 2:  // The dark WebView theme is selected.
                 break;
 
             case 2:  // The dark WebView theme is selected.
-                if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                    webViewThemePreference.setIcon(R.drawable.webview_dark_theme_day);
-                } else {
-                    webViewThemePreference.setIcon(R.drawable.webview_dark_theme_night);
-                }
+                // Set the icon.
+                webViewThemePreference.setIcon(R.drawable.webview_dark_theme);
                 break;
         }
 
         // Set the wide viewport preference icon.
         if (sharedPreferences.getBoolean("wide_viewport", true)) {
                 break;
         }
 
         // Set the wide viewport preference icon.
         if (sharedPreferences.getBoolean("wide_viewport", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                wideViewportPreference.setIcon(R.drawable.wide_viewport_enabled_night);
-            } else {
-                wideViewportPreference.setIcon(R.drawable.wide_viewport_enabled_day);
-            }
+            wideViewportPreference.setIcon(R.drawable.wide_viewport_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                wideViewportPreference.setIcon(R.drawable.wide_viewport_disabled_night);
-            } else {
-                wideViewportPreference.setIcon(R.drawable.wide_viewport_disabled_day);
-            }
+            wideViewportPreference.setIcon(R.drawable.wide_viewport_disabled);
         }
 
         // Set the display webpage images preference icon.
         if (sharedPreferences.getBoolean("display_webpage_images", true)) {
         }
 
         // Set the display webpage images preference icon.
         if (sharedPreferences.getBoolean("display_webpage_images", true)) {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                displayWebpageImagesPreference.setIcon(R.drawable.images_enabled_night);
-            } else {
-                displayWebpageImagesPreference.setIcon(R.drawable.images_enabled_day);
-            }
+            displayWebpageImagesPreference.setIcon(R.drawable.images_enabled);
         } else {
         } else {
-            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                displayWebpageImagesPreference.setIcon(R.drawable.images_disabled_night);
-            } else {
-                displayWebpageImagesPreference.setIcon(R.drawable.images_disabled_day);
-            }
+            displayWebpageImagesPreference.setIcon(R.drawable.images_disabled);
         }
     }
 
         }
     }
 
@@ -974,6 +712,9 @@ public class SettingsFragment extends PreferenceFragmentCompat {
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = getPreferenceScreen().getSharedPreferences();
 
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = getPreferenceScreen().getSharedPreferences();
 
+        // Remove the incorrect lint warning below that the shared preferences might be null.
+        assert sharedPreferences != null;
+
         // Unregister the shared preference listener.
         sharedPreferences.unregisterOnSharedPreferenceChangeListener(sharedPreferenceChangeListener);
     }
         // Unregister the shared preference listener.
         sharedPreferences.unregisterOnSharedPreferenceChangeListener(sharedPreferenceChangeListener);
     }
@@ -990,6 +731,9 @@ public class SettingsFragment extends PreferenceFragmentCompat {
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = getPreferenceScreen().getSharedPreferences();
 
         // Get a handle for the shared preferences.
         SharedPreferences sharedPreferences = getPreferenceScreen().getSharedPreferences();
 
+        // Remove the incorrect lint warning below that the shared preferences might be null.
+        assert sharedPreferences != null;
+
         // Re-register the shared preference listener.
         sharedPreferences.registerOnSharedPreferenceChangeListener(sharedPreferenceChangeListener);
     }
         // Re-register the shared preference listener.
         sharedPreferences.registerOnSharedPreferenceChangeListener(sharedPreferenceChangeListener);
     }
@@ -1013,11 +757,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                         if (sharedPreferences.getBoolean("dom_storage", false)) {
                             domStoragePreference.setIcon(R.drawable.dom_storage_enabled);
                         } else {
                         if (sharedPreferences.getBoolean("dom_storage", false)) {
                             domStoragePreference.setIcon(R.drawable.dom_storage_enabled);
                         } else {
-                            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                                domStoragePreference.setIcon(R.drawable.dom_storage_disabled_day);
-                            } else {
-                                domStoragePreference.setIcon(R.drawable.dom_storage_disabled_night);
-                            }
+                            domStoragePreference.setIcon(R.drawable.dom_storage_disabled);
                         }
                     } else {  // The JavaScript preference is disabled.
                         // Update the icon for the JavaScript preference.
                         }
                     } else {  // The JavaScript preference is disabled.
                         // Update the icon for the JavaScript preference.
@@ -1027,11 +767,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                         domStoragePreference.setEnabled(false);
 
                         // Set the icon for DOM storage preference to be ghosted.
                         domStoragePreference.setEnabled(false);
 
                         // Set the icon for DOM storage preference to be ghosted.
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            domStoragePreference.setIcon(R.drawable.dom_storage_ghosted_day);
-                        } else {
-                            domStoragePreference.setIcon(R.drawable.dom_storage_ghosted_night);
-                        }
+                        domStoragePreference.setIcon(R.drawable.dom_storage_ghosted);
                     }
                     break;
 
                     }
                     break;
 
@@ -1040,11 +776,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                     if (sharedPreferences.getBoolean(context.getString(R.string.cookies_key), false)) {
                         cookiesPreference.setIcon(R.drawable.cookies_enabled);
                     } else {
                     if (sharedPreferences.getBoolean(context.getString(R.string.cookies_key), false)) {
                         cookiesPreference.setIcon(R.drawable.cookies_enabled);
                     } else {
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            cookiesPreference.setIcon(R.drawable.cookies_disabled_day);
-                        } else {
-                            cookiesPreference.setIcon(R.drawable.cookies_disabled_night);
-                        }
+                        cookiesPreference.setIcon(R.drawable.cookies_disabled);
                     }
                     break;
 
                     }
                     break;
 
@@ -1053,11 +785,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                     if (sharedPreferences.getBoolean("dom_storage", false)) {
                         domStoragePreference.setIcon(R.drawable.dom_storage_enabled);
                     } else {
                     if (sharedPreferences.getBoolean("dom_storage", false)) {
                         domStoragePreference.setIcon(R.drawable.dom_storage_enabled);
                     } else {
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            domStoragePreference.setIcon(R.drawable.dom_storage_disabled_day);
-                        } else {
-                            domStoragePreference.setIcon(R.drawable.dom_storage_disabled_night);
-                        }
+                        domStoragePreference.setIcon(R.drawable.dom_storage_disabled);
                     }
                     break;
 
                     }
                     break;
 
@@ -1067,11 +795,7 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                     if (sharedPreferences.getBoolean("save_form_data", false)) {
                         formDataPreference.setIcon(R.drawable.form_data_enabled);
                     } else {
                     if (sharedPreferences.getBoolean("save_form_data", false)) {
                         formDataPreference.setIcon(R.drawable.form_data_enabled);
                     } else {
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            formDataPreference.setIcon(R.drawable.form_data_disabled_day);
-                        } else {
-                            formDataPreference.setIcon(R.drawable.form_data_disabled_night);
-                        }
+                        formDataPreference.setIcon(R.drawable.form_data_disabled);
                     }
                     break;
 
                     }
                     break;
 
@@ -1094,12 +818,8 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                             // Disable the custom user agent preference.
                             customUserAgentPreference.setEnabled(false);
 
                             // Disable the custom user agent preference.
                             customUserAgentPreference.setEnabled(false);
 
-                            // Set the custom user agent preference icon according to the theme.
-                            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                                customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted_night);
-                            } else {
-                                customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted_day);
-                            }
+                            // Set the custom user agent preference icon.
+                            customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted);
                             break;
 
                         case MainWebViewActivity.SETTINGS_CUSTOM_USER_AGENT:
                             break;
 
                         case MainWebViewActivity.SETTINGS_CUSTOM_USER_AGENT:
@@ -1109,12 +829,8 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                             // Enable the custom user agent preference.
                             customUserAgentPreference.setEnabled(true);
 
                             // Enable the custom user agent preference.
                             customUserAgentPreference.setEnabled(true);
 
-                            // Set the custom user agent preference icon according to the theme.
-                            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                                customUserAgentPreference.setIcon(R.drawable.custom_user_agent_enabled_night);
-                            } else {
-                                customUserAgentPreference.setIcon(R.drawable.custom_user_agent_enabled_day);
-                            }
+                            // Set the custom user agent preference icon.
+                            customUserAgentPreference.setIcon(R.drawable.custom_user_agent_enabled);
                             break;
 
                         default:
                             break;
 
                         default:
@@ -1124,12 +840,8 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                             // Disable the custom user agent preference.
                             customUserAgentPreference.setEnabled(false);
 
                             // Disable the custom user agent preference.
                             customUserAgentPreference.setEnabled(false);
 
-                            // Set the custom user agent preference icon according to the theme.
-                            if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                                customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted_night);
-                            } else {
-                                customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted_day);
-                            }
+                            // Set the custom user agent preference icon.
+                            customUserAgentPreference.setIcon(R.drawable.custom_user_agent_ghosted);
                     }
                     break;
 
                     }
                     break;
 
@@ -1141,34 +853,18 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                 case "incognito_mode":
                     // Update the icon.
                     if (sharedPreferences.getBoolean("incognito_mode", false)) {
                 case "incognito_mode":
                     // Update the icon.
                     if (sharedPreferences.getBoolean("incognito_mode", false)) {
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                            incognitoModePreference.setIcon(R.drawable.incognito_mode_enabled_night);
-                        } else {
-                            incognitoModePreference.setIcon(R.drawable.incognito_mode_enabled_day);
-                        }
+                        incognitoModePreference.setIcon(R.drawable.incognito_mode_enabled);
                     } else {
                     } else {
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                            incognitoModePreference.setIcon(R.drawable.incognito_mode_disabled_night);
-                        } else {
-                            incognitoModePreference.setIcon(R.drawable.incognito_mode_disabled_day);
-                        }
+                        incognitoModePreference.setIcon(R.drawable.incognito_mode_disabled);
                     }
                     break;
 
                 case "allow_screenshots":
                     // Update the icon.
                     if (sharedPreferences.getBoolean(context.getString(R.string.allow_screenshots_key), false)) {
                     }
                     break;
 
                 case "allow_screenshots":
                     // Update the icon.
                     if (sharedPreferences.getBoolean(context.getString(R.string.allow_screenshots_key), false)) {
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_enabled_day);
-                        } else {
-                            allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_enabled_night);
-                        }
+                        allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_enabled);
                     } else {
                     } else {
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_NO) {
-                            allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_disabled_day);
-                        } else {
-                            allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_disabled_night);
-                        }
+                        allowScreenshotsPreference.setIcon(R.drawable.allow_screenshots_disabled);
                     }
 
                     // Restart Privacy Browser.
                     }
 
                     // Restart Privacy Browser.
@@ -1178,34 +874,18 @@ public class SettingsFragment extends PreferenceFragmentCompat {
                 case "easylist":
                     // Update the icon.
                     if (sharedPreferences.getBoolean("easylist", true)) {
                 case "easylist":
                     // Update the icon.
                     if (sharedPreferences.getBoolean("easylist", true)) {
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                            easyListPreference.setIcon(R.drawable.block_ads_enabled_night);
-                        } else {
-                            easyListPreference.setIcon(R.drawable.block_ads_enabled_day);
-                        }
+                        easyListPreference.setIcon(R.drawable.block_ads_enabled);
                     } else {
                     } else {
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                            easyListPreference.setIcon(R.drawable.block_ads_disabled_night);
-                        } else {
-                            easyListPreference.setIcon(R.drawable.block_ads_disabled_day);
-                        }
+                        easyListPreference.setIcon(R.drawable.block_ads_disabled);
                     }
                     break;
 
                 case "easyprivacy":
                     // Update the icon.
                     if (sharedPreferences.getBoolean("easyprivacy", true)) {
                     }
                     break;
 
                 case "easyprivacy":
                     // Update the icon.
                     if (sharedPreferences.getBoolean("easyprivacy", true)) {
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                            easyPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_night);
-                        } else {
-                            easyPrivacyPreference.setIcon(R.drawable.block_tracking_enabled_day);
-                        }
+                        easyPrivacyPreference.setIcon(R.drawable.block_tracking_enabled);
                     } else {
                     } else {
-                        if (currentThemeStatus == Configuration.UI_MODE_NIGHT_YES) {
-                            easyPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_night);
-                        } else {
-                            easyPrivacyPreference.setIcon(R.drawable.block_tracking_disabled_day);
-                        }
+                        easyPrivacyPreference.setIcon(R.drawable.block_tracking_disabled);
              &nb