Add a requests activity. https://redmine.stoutner.com/issues/170
authorSoren Stoutner <soren@stoutner.com>
Sat, 7 Jul 2018 10:38:59 +0000 (03:38 -0700)
committerSoren Stoutner <soren@stoutner.com>
Sat, 7 Jul 2018 10:38:59 +0000 (03:38 -0700)
109 files changed:
app/build.gradle
app/src/main/AndroidManifest.xml
app/src/main/assets/de/about_links_dark.html
app/src/main/assets/de/about_links_light.html
app/src/main/assets/de/guide_bookmarks_dark.html
app/src/main/assets/de/guide_bookmarks_light.html
app/src/main/assets/de/guide_domain_settings_dark.html
app/src/main/assets/de/guide_domain_settings_light.html
app/src/main/assets/de/guide_local_storage_dark.html
app/src/main/assets/de/guide_local_storage_light.html
app/src/main/assets/de/guide_ssl_certificates_dark.html
app/src/main/assets/de/guide_ssl_certificates_light.html
app/src/main/assets/de/guide_tracking_ids_dark.html
app/src/main/assets/de/guide_tracking_ids_light.html
app/src/main/assets/de/guide_user_agent_dark.html
app/src/main/assets/de/guide_user_agent_light.html
app/src/main/assets/en/about_links_dark.html
app/src/main/assets/en/about_links_light.html
app/src/main/assets/en/guide_bookmarks_dark.html
app/src/main/assets/en/guide_bookmarks_light.html
app/src/main/assets/en/guide_domain_settings_dark.html
app/src/main/assets/en/guide_domain_settings_light.html
app/src/main/assets/en/guide_local_storage_dark.html
app/src/main/assets/en/guide_local_storage_light.html
app/src/main/assets/en/guide_ssl_certificates_dark.html
app/src/main/assets/en/guide_ssl_certificates_light.html
app/src/main/assets/en/guide_tracking_ids_dark.html
app/src/main/assets/en/guide_tracking_ids_light.html
app/src/main/assets/en/guide_user_agent_dark.html
app/src/main/assets/en/guide_user_agent_light.html
app/src/main/assets/es/about_links_dark.html
app/src/main/assets/es/about_links_light.html
app/src/main/assets/es/guide_bookmarks_dark.html
app/src/main/assets/es/guide_bookmarks_light.html
app/src/main/assets/es/guide_domain_settings_dark.html
app/src/main/assets/es/guide_domain_settings_light.html
app/src/main/assets/es/guide_local_storage_dark.html
app/src/main/assets/es/guide_local_storage_light.html
app/src/main/assets/es/guide_ssl_certificates_dark.html
app/src/main/assets/es/guide_ssl_certificates_light.html
app/src/main/assets/es/guide_tracking_ids_dark.html
app/src/main/assets/es/guide_tracking_ids_light.html
app/src/main/assets/es/guide_user_agent_dark.html
app/src/main/assets/es/guide_user_agent_light.html
app/src/main/assets/it/about_links_dark.html
app/src/main/assets/it/about_links_light.html
app/src/main/assets/it/guide_bookmarks_dark.html
app/src/main/assets/it/guide_bookmarks_light.html
app/src/main/assets/ru/about_links_dark.html
app/src/main/assets/ru/about_links_light.html
app/src/main/assets/ru/guide_bookmarks_dark.html
app/src/main/assets/ru/guide_bookmarks_light.html
app/src/main/assets/ru/guide_domain_settings_dark.html
app/src/main/assets/ru/guide_domain_settings_light.html
app/src/main/assets/ru/guide_local_storage_dark.html
app/src/main/assets/ru/guide_local_storage_light.html
app/src/main/assets/ru/guide_ssl_certificates_dark.html
app/src/main/assets/ru/guide_ssl_certificates_light.html
app/src/main/assets/ru/guide_tracking_ids_dark.html
app/src/main/assets/ru/guide_tracking_ids_light.html
app/src/main/assets/ru/guide_user_agent_dark.html
app/src/main/assets/ru/guide_user_agent_light.html
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/MainWebViewActivity.java
app/src/main/java/com/stoutner/privacybrowser/activities/RequestsActivity.java [new file with mode: 0644]
app/src/main/java/com/stoutner/privacybrowser/adapters/HistoryArrayAdapter.java
app/src/main/java/com/stoutner/privacybrowser/adapters/RequestsArrayAdapter.java [new file with mode: 0644]
app/src/main/java/com/stoutner/privacybrowser/dialogs/AddDomainDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateBookmarkDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateBookmarkFolderDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/CreateHomeScreenShortcutDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/DownloadFileDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/DownloadImageDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/DownloadLocationPermissionDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/EditBookmarkDatabaseViewDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/EditBookmarkDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/EditBookmarkFolderDatabaseViewDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/EditBookmarkFolderDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/HttpAuthenticationDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/MoveToFolderDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/PinnedSslCertificateMismatchDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateErrorDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/UrlHistoryDialog.java
app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewRequestDialog.java [new file with mode: 0644]
app/src/main/java/com/stoutner/privacybrowser/helpers/BlockListHelper.java
app/src/main/java/com/stoutner/privacybrowser/helpers/OrbotProxyHelper.java
app/src/main/res/color/requests_spinner_color_selector_dark.xml [new file with mode: 0644]
app/src/main/res/color/requests_spinner_color_selector_light.xml [new file with mode: 0644]
app/src/main/res/layout/about_tab_version.xml
app/src/main/res/layout/bookmarks_coordinatorlayout.xml
app/src/main/res/layout/bookmarks_databaseview_coordinatorlayout.xml
app/src/main/res/layout/bookmarks_databaseview_spinner_dropdown_item.xml
app/src/main/res/layout/requests_coordinatorlayout.xml [new file with mode: 0644]
app/src/main/res/layout/requests_item_linearlayout.xml [new file with mode: 0644]
app/src/main/res/layout/requests_spinner.xml [new file with mode: 0644]
app/src/main/res/layout/requests_spinner_dropdown_item.xml [new file with mode: 0644]
app/src/main/res/layout/requests_spinner_item.xml [new file with mode: 0644]
app/src/main/res/layout/url_history_item_linearlayout.xml
app/src/main/res/layout/view_request_dialog.xml [new file with mode: 0644]
app/src/main/res/menu/webview_navigation_menu.xml
app/src/main/res/values-es/strings.xml
app/src/main/res/values-it/strings.xml
app/src/main/res/values-ru/strings.xml
app/src/main/res/values/attrs.xml
app/src/main/res/values/colors.xml
app/src/main/res/values/strings.xml
app/src/main/res/values/styles.xml
app/src/main/res/xml/preferences.xml

index f9d18aa..9e2cc42 100644 (file)
@@ -77,5 +77,5 @@ dependencies {
     freeImplementation 'com.google.firebase:firebase-ads:15.0.1'
 
     // Only compile the consent library for the free flavor.  It is used to comply with the GDPR in Europe.
-    freeImplementation 'com.google.android.ads.consent:consent-library:1.0.4'
+    freeImplementation 'com.google.android.ads.consent:consent-library:1.0.6'
 }
\ No newline at end of file
index 8f6a8a5..de72063 100644 (file)
              `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
              `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
         <activity
-            android:name=".activities.SettingsActivity"
-            android:label="@string/privacy_browser_settings"
+            android:name=".activities.RequestsActivity"
+            android:label="@string/requests"
             android:parentActivityName=".activities.MainWebViewActivity"
             android:configChanges="orientation|screenSize"
             android:screenOrientation="fullUser"
             android:persistableMode="persistNever"
             tools:ignore="UnusedAttribute" />
 
+        <!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
+             `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
+             `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
+        <activity
+            android:name=".activities.SettingsActivity"
+            android:label="@string/privacy_browser_settings"
+            android:parentActivityName=".activities.MainWebViewActivity"
+            android:configChanges="orientation|screenSize"
+            android:screenOrientation="fullUser"
+            android:persistableMode="persistNever"
+            tools:ignore="UnusedAttribute" />
+
         <!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
              `android:persistableMode="persistNever"` removes Privacy Browser from the recent apps list on a device reboot.
              `tools:ignore="unusedAttribute"` removes the lint warning that `persistableMode` does not apply to API < 21. -->
index 27c7a33..0c7f321 100644 (file)
     <body>
         <h3>Websites</h3>
 
-        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/ic_chrome_reader_mode_blue_dark.png"></a>
+        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/chrome_reader_mode_blue_dark.png"></a>
             <a href="https://www.stoutner.com/category/privacy-browser/">News</a></p>
 
-        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/ic_map_blue_dark.png"></a>
+        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/map_blue_dark.png"></a>
             <a href="https://www.stoutner.com/category/roadmap/">Roadmap</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/ic_bug_report_blue_dark.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/bug_report_blue_dark.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Bug-Tracker und Feature-Anfragen</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/ic_question_answer_blue_dark.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/question_answer_blue_dark.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/boards">Forum</a></p>
 
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/ic_more_blue_dark.png"></a>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/more_blue_dark.png"></a>
             <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary">GitWeb</a></p>
     </body>
 </html>
\ No newline at end of file
index b65cead..256e94f 100644 (file)
     <body>
         <h3>Websites</h3>
 
-        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/ic_chrome_reader_mode_blue_light.png"></a>
+        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/chrome_reader_mode_blue_light.png"></a>
             <a href="https://www.stoutner.com/category/privacy-browser/">News</a></p>
 
-        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/ic_map_blue_light.png"></a>
+        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/map_blue_light.png"></a>
             <a href="https://www.stoutner.com/category/roadmap/">Roadmap</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/ic_bug_report_blue_light.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/bug_report_blue_light.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Bug-Tracker und Feature-Anfragen</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/ic_question_answer_blue_light.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/question_answer_blue_light.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/boards">Forum</a></p>
 
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/ic_more_blue_light.png"></a>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/more_blue_light.png"></a>
             <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary">GitWeb</a></p>
     </body>
 </html>
\ No newline at end of file
index 623cc26..87d17ef 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_bookmark_border_blue_dark.png"> Lesezeichen</h3>
+        <h3><img class="title" src="../shared_images/bookmark_border_blue_dark.png"> Lesezeichen</h3>
 
         <p>Bookmarks can be accessed in a drawer layout by swiping from the right of the screen.</p>
 
index 6e6b396..1e7eb3a 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_bookmark_border_blue_light.png"> Lesezeichen</h3>
+        <h3><img class="title" src="../shared_images/bookmark_border_blue_light.png"> Lesezeichen</h3>
 
         <p>Bookmarks can be accessed in a drawer layout by swiping from the right of the screen.</p>
 
index 0573cd9..fad6583 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_dns_blue_dark.png"> Secure Web Browsing</h3>
+        <h3><img class="title" src="../shared_images/dns_blue_dark.png"> Secure Web Browsing</h3>
 
         <p>Privacy Browser’s default is to browse with JavaScript, cookies, and DOM storage disabled.
             However, some websites legitimately need these features enabled to function correctly.
index dbc135f..a110bc3 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_dns_blue_light.png"> Secure Web Browsing</h3>
+        <h3><img class="title" src="../shared_images/dns_blue_light.png"> Secure Web Browsing</h3>
 
         <p>Privacy Browser’s default is to browse with JavaScript, cookies, and DOM storage disabled.
             However, some websites legitimately need these features enabled to function correctly.
index 5a32773..40f34e6 100644 (file)
             Deshalb aktiviert das Aktivieren von Erstanbieter-Cookies zugleich auch Drittanbieter-Cookies.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_web_blue_dark.png"> DOM-Speicher</h3>
+        <h3><img class="title" src="../shared_images/web_blue_dark.png"> DOM-Speicher</h3>
 
         <p>Der Document Object Model-Speicher, auch bekannt als Web-Speicher, ist wie Cookies auf Steroiden. Während die maximale Gesamtspeichergrße für alle Cookies von
             einer einzigen URL 4kb beträgt, kann der DOM-Speicher zwischen <a href="https://en.wikipedia.org/wiki/Web_storage#Storage_size">5-25 Megabytes pro Seite</a> betragen.
             Da der DOM-Speicher Javascript zum Lesen und Schreiben von Daten nutzt, ändert das Aktivieren also nichts, solange nicht auch Javascript aktiviert ist.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_subtitles_blue_dark.png"> Formulardaten</h3>
+        <h3><img class="title" src="../shared_images/subtitles_blue_dark.png"> Formulardaten</h3>
 
         <p>Formulardaten beinhalten die Informationen, die in Web-Formularen eingegeben werden, wie Benutzernamen, Adressen, Telefonnummern etc. und listet sie als Auswahlmenü auf künftig besuchten Websites auf.
             Ungleich der anderen Arten der lokalen Datenspeicherung werden Formulardaten nicht ohne die explizite Handlung des Nutzers an den Webserver gesendet.</p>
index 1902626..e15db6a 100644 (file)
             Deshalb aktiviert das Aktivieren von Erstanbieter-Cookies zugleich auch Drittanbieter-Cookies.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_web_blue_light.png"> DOM-Speicher</h3>
+        <h3><img class="title" src="../shared_images/web_blue_light.png"> DOM-Speicher</h3>
 
         <p>Der Document Object Model-Speicher, auch bekannt als Web-Speicher, ist wie Cookies auf Steroiden. Während die maximale Gesamtspeichergrße für alle Cookies von
             einer einzigen URL 4kb beträgt, kann der DOM-Speicher zwischen <a href="https://en.wikipedia.org/wiki/Web_storage#Storage_size">5-25 Megabytes pro Seite</a> betragen.
             Da der DOM-Speicher Javascript zum Lesen und Schreiben von Daten nutzt, ändert das Aktivieren also nichts, solange nicht auch Javascript aktiviert ist.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_subtitles_blue_light.png"> Formulardaten</h3>
+        <h3><img class="title" src="../shared_images/subtitles_blue_light.png"> Formulardaten</h3>
 
         <p>Formulardaten beinhalten die Informationen, die in Web-Formularen eingegeben werden, wie Benutzernamen, Adressen, Telefonnummern etc. und listet sie als Auswahlmenü auf künftig besuchten Websites auf.
             Ungleich der anderen Arten der lokalen Datenspeicherung werden Formulardaten nicht ohne die explizite Handlung des Nutzers an den Webserver gesendet.</p>
index f59deec..d24d78c 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_vpn_lock_blue_dark.png"> Connect with Confidence</h3>
+        <h3><img class="title" src="../shared_images/vpn_lock_blue_dark.png"> Connect with Confidence</h3>
 
         <p>When visiting an encrypted URL (one that begins with HTTPS), the webserver uses an SSL certificate to both encrypt the information sent to the browser and to identify the server.
             The purpose of the server identification is to prevent a machine located between the browser and the webserver from pretending to be the server and decrypting the information in transit.
index 8b1b0a7..21a12f2 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_vpn_lock_blue_light.png"> Connect with Confidence</h3>
+        <h3><img class="title" src="../shared_images/vpn_lock_blue_light.png"> Connect with Confidence</h3>
 
         <p>When visiting an encrypted URL (one that begins with HTTPS), the webserver uses an SSL certificate to both encrypt the information sent to the browser and to identify the server.
             The purpose of the server identification is to prevent a machine located between the browser and the webserver from pretending to be the server and decrypting the information in transit.
index 9f02c1c..7007910 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_location_off_blue_dark.png"> Do Not Track</h3>
+        <h3><img class="title" src="../shared_images/location_off_blue_dark.png"> Do Not Track</h3>
 
         <p>A few years ago the W3C (World Wide Web Consortium) created a mechanism for browsers to inform web servers that they would not like to be tracked.
             This is accomplished by including a <a href="https://en.wikipedia.org/wiki/Do_Not_Track">DNT (Do Not Track) header</a> with web requests.</p>
index 09b98a8..345372b 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_location_off_blue_light.png"> Do Not Track</h3>
+        <h3><img class="title" src="../shared_images/location_off_blue_light.png"> Do Not Track</h3>
 
         <p>A few years ago the W3C (World Wide Web Consortium) created a mechanism for browsers to inform web servers that they would not like to be tracked.
             This is accomplished by including a <a href="https://en.wikipedia.org/wiki/Do_Not_Track">DNT (Do Not Track) header</a> with web requests.</p>
index 7036bf8..52c4b80 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_devices_other_blue_dark.png"> Browser-Identifikation</h3>
+        <h3><img class="title" src="../shared_images/devices_other_blue_dark.png"> Browser-Identifikation</h3>
 
         <p>Wenn Internetbrowser sich mit Websites verbinden senden sie einen sog. User Agent, welcher den Browser und die
             Rendering-Möglichkeiten an die Website kommuniziert. Die Website kann diese Informationen nutzen, um zu entscheiden, welche Version der Website
index db3856c..9b9cfec 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_devices_other_blue_light.png"> Browser-Identifikation</h3>
+        <h3><img class="title" src="../shared_images/devices_other_blue_light.png"> Browser-Identifikation</h3>
 
         <p>Wenn Internetbrowser sich mit Websites verbinden senden sie einen sog. User Agent, welcher den Browser und die
             Rendering-Möglichkeiten an die Website kommuniziert. Die Website kann diese Informationen nutzen, um zu entscheiden, welche Version der Website
index 7b5e4a6..7f5cd12 100644 (file)
     <body>
         <h3>Websites</h3>
 
-        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/ic_chrome_reader_mode_blue_dark.png"></a>
+        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/chrome_reader_mode_blue_dark.png"></a>
             <a href="https://www.stoutner.com/category/privacy-browser/">News</a></p>
 
-        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/ic_map_blue_dark.png"></a>
+        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/map_blue_dark.png"></a>
             <a href="https://www.stoutner.com/category/roadmap/">Roadmap</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/ic_bug_report_blue_dark.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/bug_report_blue_dark.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Bug Tracker and Feature Requests</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/ic_question_answer_blue_dark.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/question_answer_blue_dark.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/boards">Forum</a></p>
 
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/ic_more_blue_dark.png"></a>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/more_blue_dark.png"></a>
             <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary">GitWeb</a></p>
     </body>
 </html>
\ No newline at end of file
index 4e5d960..8bc38d6 100644 (file)
     <body>
         <h3>Websites</h3>
 
-        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/ic_chrome_reader_mode_blue_light.png"></a>
+        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/chrome_reader_mode_blue_light.png"></a>
             <a href="https://www.stoutner.com/category/privacy-browser/">News</a></p>
 
-        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/ic_map_blue_light.png"></a>
+        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/map_blue_light.png"></a>
             <a href="https://www.stoutner.com/category/roadmap/">Roadmap</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/ic_bug_report_blue_light.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/bug_report_blue_light.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Bug Tracker and Feature Requests</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/ic_question_answer_blue_light.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/question_answer_blue_light.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/boards">Forum</a></p>
 
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/ic_more_blue_light.png"></a>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/more_blue_light.png"></a>
             <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary">GitWeb</a></p>
     </body>
 </html>
\ No newline at end of file
index 3d781bc..1fb1b09 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_bookmark_border_blue_dark.png"> Bookmarks</h3>
+        <h3><img class="title" src="../shared_images/bookmark_border_blue_dark.png"> Bookmarks</h3>
 
         <p>Bookmarks can be accessed in a drawer layout by swiping from the right of the screen.</p>
 
index 6b95654..d82bbe7 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_bookmark_border_blue_light.png"> Bookmarks</h3>
+        <h3><img class="title" src="../shared_images/bookmark_border_blue_light.png"> Bookmarks</h3>
 
         <p>Bookmarks can be accessed in a drawer layout by swiping from the right of the screen.</p>
 
index acc25a8..57f7d29 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_dns_blue_dark.png"> Secure Web Browsing</h3>
+        <h3><img class="title" src="../shared_images/dns_blue_dark.png"> Secure Web Browsing</h3>
 
         <p>Privacy Browser’s default is to browse with JavaScript, cookies, and DOM storage disabled.
             However, some websites legitimately need these features enabled to function correctly.
index a58851c..3edf86f 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_dns_blue_light.png"> Secure Web Browsing</h3>
+        <h3><img class="title" src="../shared_images/dns_blue_light.png"> Secure Web Browsing</h3>
 
         <p>Privacy Browser’s default is to browse with JavaScript, cookies, and DOM storage disabled.
             However, some websites legitimately need these features enabled to function correctly.
index c0020ed..8a3b0e7 100644 (file)
             between first-party and third-party cookies</a>. Thus, enabling first-party cookies will also enable third-party cookies.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_web_blue_dark.png"> DOM Storage</h3>
+        <h3><img class="title" src="../shared_images/web_blue_dark.png"> DOM Storage</h3>
 
         <p>Document Object Model storage, also known as web storage, is like cookies on steroids. Whereas the maximum combined storage size for all cookies from
             a single URL is 4 kilobytes, DOM storage can hold <a href="https://en.wikipedia.org/wiki/Web_storage#Storage_size">megabytes per site</a>.
             Because DOM storage uses JavaScript to read and write data, enabling it will do nothing unless JavaScript is also enabled.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_subtitles_blue_dark.png"> Form Data</h3>
+        <h3><img class="title" src="../shared_images/subtitles_blue_dark.png"> Form Data</h3>
 
         <p>Form data contains information typed into web forms, like user names, addresses, phone numbers, etc., and lists them in a drop-down box on future visits.
             Unlike the other forms of local storage, form data is not sent to the web server without specific user interaction.</p>
index 4a249ea..72f1767 100644 (file)
             between first-party and third-party cookies</a>. Thus, enabling first-party cookies will also enable third-party cookies.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_web_blue_light.png"> DOM Storage</h3>
+        <h3><img class="title" src="../shared_images/web_blue_light.png"> DOM Storage</h3>
 
         <p>Document Object Model storage, also known as web storage, is like cookies on steroids. Whereas the maximum combined storage size for all cookies from
             a single URL is 4 kilobytes, DOM storage can hold <a href="https://en.wikipedia.org/wiki/Web_storage#Storage_size">megabytes per site</a>.
             Because DOM storage uses JavaScript to read and write data, enabling it will do nothing unless JavaScript is also enabled.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_subtitles_blue_light.png"> Form Data</h3>
+        <h3><img class="title" src="../shared_images/subtitles_blue_light.png"> Form Data</h3>
 
         <p>Form data contains information typed into web forms, like user names, addresses, phone numbers, etc., and lists them in a drop-down box on future visits.
             Unlike the other forms of local storage, form data is not sent to the web server without specific user interaction.</p>
index f59deec..d24d78c 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_vpn_lock_blue_dark.png"> Connect with Confidence</h3>
+        <h3><img class="title" src="../shared_images/vpn_lock_blue_dark.png"> Connect with Confidence</h3>
 
         <p>When visiting an encrypted URL (one that begins with HTTPS), the webserver uses an SSL certificate to both encrypt the information sent to the browser and to identify the server.
             The purpose of the server identification is to prevent a machine located between the browser and the webserver from pretending to be the server and decrypting the information in transit.
index 8b1b0a7..21a12f2 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_vpn_lock_blue_light.png"> Connect with Confidence</h3>
+        <h3><img class="title" src="../shared_images/vpn_lock_blue_light.png"> Connect with Confidence</h3>
 
         <p>When visiting an encrypted URL (one that begins with HTTPS), the webserver uses an SSL certificate to both encrypt the information sent to the browser and to identify the server.
             The purpose of the server identification is to prevent a machine located between the browser and the webserver from pretending to be the server and decrypting the information in transit.
index 60697c1..021a405 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_location_off_blue_dark.png"> Do Not Track</h3>
+        <h3><img class="title" src="../shared_images/location_off_blue_dark.png"> Do Not Track</h3>
 
         <p>A few years ago the W3C (World Wide Web Consortium) created a mechanism for browsers to inform web servers that they would not like to be tracked.
             This is accomplished by including a <a href="https://en.wikipedia.org/wiki/Do_Not_Track">DNT (Do Not Track) header</a> with web requests.</p>
index 51b0e89..3f6cc04 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_location_off_blue_light.png"> Do Not Track</h3>
+        <h3><img class="title" src="../shared_images/location_off_blue_light.png"> Do Not Track</h3>
 
         <p>A few years ago the W3C (World Wide Web Consortium) created a mechanism for browsers to inform web servers that they would not like to be tracked.
             This is accomplished by including a <a href="https://en.wikipedia.org/wiki/Do_Not_Track">DNT (Do Not Track) header</a> with web requests.</p>
index a676db6..b8a8e9e 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_devices_other_blue_dark.png"> Browser Identification</h3>
+        <h3><img class="title" src="../shared_images/devices_other_blue_dark.png"> Browser Identification</h3>
 
         <p>When web browsers connect to websites, they send a user agent, which identifies the browser and the rendering capabilities it possesses.
             The web server can use this information to decide which version of the website to send to the browser.
index bcfee5f..3a40c54 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_devices_other_blue_light.png"> Browser Identification</h3>
+        <h3><img class="title" src="../shared_images/devices_other_blue_light.png"> Browser Identification</h3>
 
         <p>When web browsers connect to websites, they send a user agent, which identifies the browser and the rendering capabilities it possesses.
             The web server can use this information to decide which version of the website to send to the browser.
index 8ab2399..6c29029 100644 (file)
     <body>
         <h3>Páginas web</h3>
 
-        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/ic_chrome_reader_mode_blue_dark.png"></a> <a href="https://www.stoutner.com/category/privacy-browser/">Noticias</a></p>
+        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/chrome_reader_mode_blue_dark.png"></a>
+            <a href="https://www.stoutner.com/category/privacy-browser/">Noticias</a></p>
 
-        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/ic_map_blue_dark.png"></a> <a href="https://www.stoutner.com/category/roadmap/">Hoja de ruta</a></p>
+        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/map_blue_dark.png"></a>
+            <a href="https://www.stoutner.com/category/roadmap/">Hoja de ruta</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/ic_bug_report_blue_dark.png"></a> <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Seguimiento de errores y petición de funciones</a></p>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/bug_report_blue_dark.png"></a>
+            <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Seguimiento de errores y petición de funciones</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/ic_question_answer_blue_dark.png"></a> <a href="https://redmine.stoutner.com/projects/privacy-browser/boards">Foro</a></p>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/question_answer_blue_dark.png"></a>
+            <a href="https://redmine.stoutner.com/projects/privacy-browser/boards">Foro</a></p>
 
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/ic_more_blue_dark.png"></a> <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary">GitWeb</a></p>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/more_blue_dark.png"></a>
+            <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary">GitWeb</a></p>
     </body>
 </html>
\ No newline at end of file
index 8ad430b..5b96f8a 100644 (file)
     <body>
         <h3>Páginas web</h3>
 
-        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/ic_chrome_reader_mode_blue_light.png"></a> <a href="https://www.stoutner.com/category/privacy-browser/">Noticias</a></p>
+        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/chrome_reader_mode_blue_light.png"></a>
+            <a href="https://www.stoutner.com/category/privacy-browser/">Noticias</a></p>
 
-        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/ic_map_blue_light.png"></a> <a href="https://www.stoutner.com/category/roadmap/">Hoja de ruta</a></p>
+        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/map_blue_light.png"></a>
+            <a href="https://www.stoutner.com/category/roadmap/">Hoja de ruta</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/ic_bug_report_blue_light.png"></a> <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Seguimiento de errores y petición de funciones</a></p>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/bug_report_blue_light.png"></a>
+            <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Seguimiento de errores y petición de funciones</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/ic_question_answer_blue_light.png"></a> <a href="https://redmine.stoutner.com/projects/privacy-browser/boards">Foro</a></p>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/question_answer_blue_light.png"></a>
+            <a href="https://redmine.stoutner.com/projects/privacy-browser/boards">Foro</a></p>
 
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/ic_more_blue_light.png"></a> <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary">GitWeb</a></p>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/more_blue_light.png"></a>
+            <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary">GitWeb</a></p>
     </body>
 </html>
\ No newline at end of file
index a8138b6..6321df2 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_bookmark_border_blue_dark.png"> Favoritos</h3>
+        <h3><img class="title" src="../shared_images/bookmark_border_blue_dark.png"> Favoritos</h3>
 
         <p>Se puede acceder a los favoritos en un diseño de cajón deslizando desde la derecha de la pantalla.</p>
 
index c0b462c..a62c5fa 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_bookmark_border_blue_light.png"> Favoritos</h3>
+        <h3><img class="title" src="../shared_images/bookmark_border_blue_light.png"> Favoritos</h3>
 
         <p>Se puede acceder a los favoritos en un diseño de cajón deslizando desde la derecha de la pantalla.</p>
 
index 6e6109b..248f1f4 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_dns_blue_dark.png"> Navegación web segura</h3>
+        <h3><img class="title" src="../shared_images/dns_blue_dark.png"> Navegación web segura</h3>
 
         <p>Por defecto Navegador Privado navega con Javascript, cookies y almacenamiento DOM desactivados.
             Sin embargo, algunas páginas web necesitan legítimamente estas características para funcionar correctamente.
index c15c2f8..3062051 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_dns_blue_light.png"> Navegación web segura</h3>
+        <h3><img class="title" src="../shared_images/dns_blue_light.png"> Navegación web segura</h3>
 
         <p>Por defecto Navegador Privado navega con Javascript, cookies y almacenamiento DOM desactivados.
             Sin embargo, algunas páginas web necesitan legítimamente estas características para funcionar correctamente.
index a758ea7..37f1dd8 100644 (file)
@@ -71,7 +71,7 @@
             y de terceras partes</a>. Así que habilitando las cookies de primera parte se habilitarán también las de terceras partes.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_web_blue_dark.png"> Almacenamiento DOM</h3>
+        <h3><img class="title" src="../shared_images/web_blue_dark.png"> Almacenamiento DOM</h3>
 
         <p>El almacenamiento Modelo de Objeto de Documento (Document Object Model), también conocido como almacenamiento web, es como cookies pero más poderoso.
             Mientras el tamaño de almacenamiento combinado máximo para todas las cookies de una única URL es de 4 kilobytes,
@@ -79,7 +79,7 @@
             Debido a que el almacenamiento DOM usa Javascript para leer y escribir los datos, habilitarlo no hará nada a menos que Javascript sea habilitado también.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_subtitles_blue_dark.png"> Datos de formulario</h3>
+        <h3><img class="title" src="../shared_images/subtitles_blue_dark.png"> Datos de formulario</h3>
 
         <p>Los datos de formulario contienen información escrita en formularios web, como nombres de usuario, direcciones, números de teléfono, etcétera,
             y los enumera en un cuadro desplegable en futuras visitas.
index b532b7d..e2ec490 100644 (file)
@@ -72,7 +72,7 @@
             y de terceras partes</a>. Así que habilitando las cookies de primera parte se habilitarán también las de terceras partes.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_web_blue_light.png"> Almacenamiento DOM</h3>
+        <h3><img class="title" src="../shared_images/web_blue_light.png"> Almacenamiento DOM</h3>
 
         <p>El almacenamiento Modelo de Objeto de Documento (Document Object Model), también conocido como almacenamiento web, es como cookies pero más poderoso.
             Mientras el tamaño de almacenamiento combinado máximo para todas las cookies de una única URL es de 4 kilobytes,
@@ -80,7 +80,7 @@
             Debido a que el almacenamiento DOM usa Javascript para leer y escribir los datos, habilitarlo no hará nada a menos que Javascript sea habilitado también.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_subtitles_blue_light.png"> Datos de formulario</h3>
+        <h3><img class="title" src="../shared_images/subtitles_blue_light.png"> Datos de formulario</h3>
 
         <p>Los datos de formulario contienen información escrita en formularios web, como nombres de usuario, direcciones, números de teléfono, etcétera,
             y los enumera en un cuadro desplegable en futuras visitas.
index 93b0192..0b21cc4 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_vpn_lock_blue_dark.png"> Conectar con confianza</h3>
+        <h3><img class="title" src="../shared_images/vpn_lock_blue_dark.png"> Conectar con confianza</h3>
 
         <p>Al visitar una URL cifrada (que empieza con HTTPS), el servidor web usa un certificado SSL para cifrar tanto la información enviada al navegador como asimismo para identificar al servidor.
             El propósito de la identificación del servidor es para prevenir que una máquina ubicada entre el navegador y el servidor web pretenda ser el servidor y descifrar la información en tránsito.
index 5bdb367..49c422d 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_vpn_lock_blue_light.png"> Conectar con confianza</h3>
+        <h3><img class="title" src="../shared_images/vpn_lock_blue_light.png"> Conectar con confianza</h3>
 
         <p>Al visitar una URL cifrada (que empieza con HTTPS), el servidor web usa un certificado SSL para cifrar tanto la información enviada al navegador como asimismo para identificar al servidor.
             El propósito de la identificación del servidor es para prevenir que una máquina ubicada entre el navegador y el servidor web pretenda ser el servidor y descifrar la información en tránsito.
index a00544e..20cca82 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_location_off_blue_dark.png"> No Rastrear</h3>
+        <h3><img class="title" src="../shared_images/location_off_blue_dark.png"> No Rastrear</h3>
 
         <p>Hace algunos años la W3C (Consorcio Mundial de la Red) creó un mecanismo para que los navegadores informaran a los servidores web que no les gustaría ser rastreados.
             Esto se logra incluyendo un <a href="https://en.wikipedia.org/wiki/Do_Not_Track">encabezado DNT (Do Not Track o No Rastrear)</a> con las solicitudes web.</p>
index 0739b34..376b9b6 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_location_off_blue_light.png"> No Rastrear</h3>
+        <h3><img class="title" src="../shared_images/location_off_blue_light.png"> No Rastrear</h3>
 
         <p>Hace algunos años la W3C (Consorcio Mundial de la Red) creó un mecanismo para que los navegadores informaran a los servidores web que no les gustaría ser rastreados.
             Esto se logra incluyendo un <a href="https://en.wikipedia.org/wiki/Do_Not_Track">encabezado DNT (Do Not Track o No Rastrear)</a> con las solicitudes web.</p>
index 6a0f55d..b222a0e 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_devices_other_blue_dark.png"> Identificación del navegador</h3>
+        <h3><img class="title" src="../shared_images/devices_other_blue_dark.png"> Identificación del navegador</h3>
 
         <p>Cuando los navegadores web se conectan a las páginas web, envían un agente de usuario, que identifica al navegador y a las capacidades de rendering que posee.
             El servidor web puede usar esta información para decidir qué versión de página web enviar al navegador.
index 78e28da..c414540 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_devices_other_blue_light.png"> Identificación del navegador</h3>
+        <h3><img class="title" src="../shared_images/devices_other_blue_light.png"> Identificación del navegador</h3>
 
         <p>Cuando los navegadores web se conectan a las páginas web, envían un agente de usuario, que identifica al navegador y a las capacidades de rendering que posee.
             El servidor web puede usar esta información para decidir qué versión de página web enviar al navegador.
index e3e7782..e9e451d 100644 (file)
     <body>
         <h3>Collegamenti</h3>
 
-        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/ic_chrome_reader_mode_blue_dark.png"></a>
+        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/chrome_reader_mode_blue_dark.png"></a>
             <a href="https://www.stoutner.com/category/privacy-browser/">Novità</a></p>
 
-        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/ic_map_blue_dark.png"></a> <a href="https://www.stoutner.com/category/roadmap/">Roadmap</a></p>
+        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/map_blue_dark.png"></a> <a href="https://www.stoutner.com/category/roadmap/">Roadmap</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/ic_bug_report_blue_dark.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/bug_report_blue_dark.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Segnalazioni di Bug e richieste di nuove funzionalità</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/ic_question_answer_blue_dark.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/question_answer_blue_dark.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/boards">Forum</a></p>
 
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/ic_more_blue_dark.png"></a>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/more_blue_dark.png"></a>
             <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary">GitWeb</a></p>
     </body>
 </html>
\ No newline at end of file
index 5d058c6..8756e15 100644 (file)
     <body>
         <h3>Collegamenti</h3>
 
-        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/ic_chrome_reader_mode_blue_light.png"></a>
+        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/chrome_reader_mode_blue_light.png"></a>
             <a href="https://www.stoutner.com/category/privacy-browser/">Novità</a></p>
 
-        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/ic_map_blue_light.png"></a> <a href="https://www.stoutner.com/category/roadmap/">Roadmap</a></p>
+        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/map_blue_light.png"></a> <a href="https://www.stoutner.com/category/roadmap/">Roadmap</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/ic_bug_report_blue_light.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/bug_report_blue_light.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Segnalazioni di Bug e richieste di nuove funzionalità</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/ic_question_answer_blue_light.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/question_answer_blue_light.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/boards">Forum</a></p>
 
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/ic_more_blue_light.png"></a>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/more_blue_light.png"></a>
             <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary">GitWeb</a></p>
     </body>
 </html>
\ No newline at end of file
index 7ca33e8..2b3514c 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_bookmark_border_blue_dark.png"> Segnalibri</h3>
+        <h3><img class="title" src="../shared_images/bookmark_border_blue_dark.png"> Segnalibri</h3>
 
         <p>E' possibile visualizzare i segnalibri attraverso un cassetto che si apre scorrendo dal lato destro dello schermo.</p>
 
index 514cfa9..0c30500 100644 (file)
@@ -26,7 +26,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_bookmark_border_blue_light.png"> Segnalibri</h3>
+        <h3><img class="title" src="../shared_images/bookmark_border_blue_light.png"> Segnalibri</h3>
 
         <p>E' possibile visualizzare i segnalibri attraverso un cassetto che si apre scorrendo dal lato destro dello schermo.</p>
 
index 92035de..151ec01 100644 (file)
     <body>
         <h3>Websites</h3>
 
-        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/ic_chrome_reader_mode_blue_dark.png"></a>
+        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/chrome_reader_mode_blue_dark.png"></a>
             <a href="https://www.stoutner.com/category/privacy-browser/">Новости</a></p>
 
-        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/ic_map_blue_dark.png"></a>
+        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/map_blue_dark.png"></a>
             <a href="https://www.stoutner.com/category/roadmap/">Дорожная карта</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/ic_bug_report_blue_dark.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/bug_report_blue_dark.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Система отслеживания ошибок и пожеланий</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/ic_question_answer_blue_dark.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/question_answer_blue_dark.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/boards">Форум</a></p>
 
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/ic_more_blue_dark.png"></a>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/more_blue_dark.png"></a>
             <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary">GitWeb</a></p>
     </body>
 </html>
\ No newline at end of file
index ae3b8b1..eeb9e5c 100644 (file)
     <body>
         <h3>Websites</h3>
 
-        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/ic_chrome_reader_mode_blue_light.png"></a>
+        <p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../shared_images/chrome_reader_mode_blue_light.png"></a>
             <a href="https://www.stoutner.com/category/privacy-browser/">Новости</a></p>
 
-        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/ic_map_blue_light.png"></a>
+        <p><a href="https://www.stoutner.com/category/roadmap/"><img class="icon" src="../shared_images/map_blue_light.png"></a>
             <a href="https://www.stoutner.com/category/roadmap/">Дорожная карта</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/ic_bug_report_blue_light.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/issues"><img class="icon" src="../shared_images/bug_report_blue_light.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Система отслеживания ошибок и пожеланий</a></p>
 
-        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/ic_question_answer_blue_light.png"></a>
+        <p><a href="https://redmine.stoutner.com/projects/privacy-browser/boards"><img class="icon" src="../shared_images/question_answer_blue_light.png"></a>
             <a href="https://redmine.stoutner.com/projects/privacy-browser/boards">Форум</a></p>
 
-        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/ic_more_blue_light.png"></a>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary"><img class="icon" src="../shared_images/more_blue_light.png"></a>
             <a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=summary">GitWeb</a></p>
     </body>
 </html>
\ No newline at end of file
index ce412f3..3bd043d 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_bookmark_border_blue_dark.png"> Закладки</h3>
+        <h3><img class="title" src="../shared_images/bookmark_border_blue_dark.png"> Закладки</h3>
 
         <p>К закладкам можно получить доступ из боковой панели, выполнив свайп от правой части экрана.</p>
 
index 3508bf5..a3d3d6f 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_bookmark_border_blue_light.png"> Закладки</h3>
+        <h3><img class="title" src="../shared_images/bookmark_border_blue_light.png"> Закладки</h3>
 
         <p>К закладкам можно получить доступ из боковой панели, выполнив свайп от правой части экрана.</p>
 
index b7da2e7..2dd3d12 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_dns_blue_dark.png"> Безопасный просмотр веб-страниц</h3>
+        <h3><img class="title" src="../shared_images/dns_blue_dark.png"> Безопасный просмотр веб-страниц</h3>
 
         <p>По умолчанию в Privacy Browser отключены JavaScript, файлы cookie и хранилище DOM. Однако, для правильной работы, некоторым веб-сайтам эти опции необходимы.
             Настройки домена могут автоматически включать нужный набор опций при посещении определенного домена.</p>
index 89385d5..15e9ff5 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_dns_blue_dark.png"> Безопасный просмотр веб-страниц</h3>
+        <h3><img class="title" src="../shared_images/dns_blue_dark.png"> Безопасный просмотр веб-страниц</h3>
 
         <p>По умолчанию в Privacy Browser отключены JavaScript, файлы cookie и хранилище DOM. Однако, для правильной работы, некоторым веб-сайтам эти опции необходимы.
             Настройки домена могут автоматически включать нужный набор опций при посещении определенного домена.</p>
index c885d43..9116af9 100644 (file)
@@ -75,7 +75,7 @@
             Таким образом, включение первичных файлов cookie также разрешит и сторонние.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_web_blue_dark.png"> Хранилище DOM</h3>
+        <h3><img class="title" src="../shared_images/web_blue_dark.png"> Хранилище DOM</h3>
 
         <p>Хранилище объектной модели документа (Document Object Model), также известное как веб-хранилище, называют cookie (печенье) на стероидах.
             В то время как максимальный объем хранения для всех файлов cookie с одного URL-адреса составляет 4 килобайта,
@@ -83,7 +83,7 @@
             Поскольку хранилище DOM использует JavaScript для чтения и записи данных, включение его ни на что не влияет при отключенном JavaScript.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_subtitles_blue_dark.png"> Данные формы</h3>
+        <h3><img class="title" src="../shared_images/subtitles_blue_dark.png"> Данные формы</h3>
 
         <p>Данные формы содержат информацию, вводимую в веб-формы, такие как имена пользователей, адреса, телефонные номера и т. д., и перечисляются в раскрывающемся списке при будущих посещениях.
             В отличие от других форм локального хранилища данные формы не отправляются на веб-сервер без специального взаимодействия с пользователем.</p>
index 7f6fc93..4373393 100644 (file)
@@ -75,7 +75,7 @@
             Таким образом, включение первичных файлов cookie также разрешит и сторонние.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_web_blue_dark.png"> Хранилище DOM</h3>
+        <h3><img class="title" src="../shared_images/web_blue_dark.png"> Хранилище DOM</h3>
 
         <p>Хранилище объектной модели документа (Document Object Model), также известное как веб-хранилище, называют cookie (печенье) на стероидах.
             В то время как максимальный объем хранения для всех файлов cookie с одного URL-адреса составляет 4 килобайта,
@@ -83,7 +83,7 @@
             Поскольку хранилище DOM использует JavaScript для чтения и записи данных, включение его ни на что не влияет при отключенном JavaScript.</p>
 
 
-        <h3><img class="title" src="../shared_images/ic_subtitles_blue_dark.png"> Данные формы</h3>
+        <h3><img class="title" src="../shared_images/subtitles_blue_dark.png"> Данные формы</h3>
 
         <p>Данные формы содержат информацию, вводимую в веб-формы, такие как имена пользователей, адреса, телефонные номера и т. д., и перечисляются в раскрывающемся списке при будущих посещениях.
             В отличие от других форм локального хранилища данные формы не отправляются на веб-сервер без специального взаимодействия с пользователем.</p>
index e067d05..871c4c1 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_vpn_lock_blue_dark.png"> Подключение с уверенностью</h3>
+        <h3><img class="title" src="../shared_images/vpn_lock_blue_dark.png"> Подключение с уверенностью</h3>
 
         <p>При посещении зашифрованного URL (тот, который начинается с HTTPS) веб-сервер использует сертификат SSL для шифрования информации, отправленной в браузер, и для идентификации сервера.
             Цель идентификации сервера состоит в том, чтобы запретить машине, расположенной между браузером и веб-сервером, притворяться сервером и дешифровать информацию во время ее транзита.
index debb7c4..8c67ae1 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_vpn_lock_blue_dark.png"> Подключение с уверенностью</h3>
+        <h3><img class="title" src="../shared_images/vpn_lock_blue_dark.png"> Подключение с уверенностью</h3>
 
         <p>При посещении зашифрованного URL (тот, который начинается с HTTPS) веб-сервер использует сертификат SSL для шифрования информации, отправленной в браузер, и для идентификации сервера.
             Цель идентификации сервера состоит в том, чтобы запретить машине, расположенной между браузером и веб-сервером, притворяться сервером и дешифровать информацию во время ее транзита.
index ed8c2b0..aeff868 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_location_off_blue_dark.png"> Не отслеживать</h3>
+        <h3><img class="title" src="../shared_images/location_off_blue_dark.png"> Не отслеживать</h3>
 
         <p>Несколько лет назад W3C (консорциум World Wide Web) создал механизм для браузеров для информирования веб-серверов о том, что они не хотели бы отслеживаться.
             Это достигается путем включения <a href="https://en.wikipedia.org/wiki/Do_Not_Track"> заголовка DNT (Не отслеживать) </a> в веб-запросы.</p>
index 3b23acb..595282f 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_location_off_blue_light.png"> Не отслеживать</h3>
+        <h3><img class="title" src="../shared_images/location_off_blue_light.png"> Не отслеживать</h3>
 
         <p>Несколько лет назад W3C (консорциум World Wide Web) создал механизм для браузеров для информирования веб-серверов о том, что они не хотели бы отслеживаться.
             Это достигается путем включения <a href="https://en.wikipedia.org/wiki/Do_Not_Track"> заголовка DNT (Не отслеживать) </a> в веб-запросы.</p>
index eba45f6..376aeca 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_devices_other_blue_dark.png"> Идентификация браузера</h3>
+        <h3><img class="title" src="../shared_images/devices_other_blue_dark.png"> Идентификация браузера</h3>
 
         <p>При подключении браузера к веб-сайтам происходит отправка пользовательского агента, который идентифицирует браузер и возможности визуализации, которыми он обладает.
             Веб-сервер может использовать эту информацию, чтобы решить, какую версию сайта отправить в браузер.
index bda9959..8428944 100644 (file)
@@ -24,7 +24,7 @@
     </head>
 
     <body>
-        <h3><img class="title" src="../shared_images/ic_devices_other_blue_light.png"> Идентификация браузера</h3>
+        <h3><img class="title" src="../shared_images/devices_other_blue_light.png"> Идентификация браузера</h3>
 
         <p>При подключении браузера к веб-сайтам происходит отправка пользовательского агента, который идентифицирует браузер и возможности визуализации, которыми он обладает.
             Веб-сервер может использовать эту информацию, чтобы решить, какую версию сайта отправить в браузер.
index 35a1eff..9f4231a 100644 (file)
@@ -136,15 +136,15 @@ public class BookmarksActivity extends AppCompatActivity implements CreateBookma
         final Toolbar bookmarksAppBar = findViewById(R.id.bookmarks_toolbar);
         setSupportActionBar(bookmarksAppBar);
 
-        // Get a handle for the activity, the app bar, and the `ListView`.
+        // Get a handle for the activity, the app bar, and the ListView.
         final Activity bookmarksActivity = this;
         appBar = getSupportActionBar();
         bookmarksListView = findViewById(R.id.bookmarks_listview);
 
-        // This assert removes the incorrect warning in Android Studio on the following line that `appBar` might be null.
+        // Remove the incorrect lint warning that `appBar` might be null.
         assert appBar != null;
 
-        // Display the home arrow on `SupportActionBar`.
+        // Display the home arrow on the app bar.
         appBar.setDisplayHomeAsUpEnabled(true);
 
         // Initialize the database helper.  `this` specifies the context.  The two `nulls` do not specify the database name or a `CursorFactory`.
index d66ae03..006af07 100644 (file)
@@ -108,14 +108,14 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
         // Remove the incorrect warning in Android Studio that `appBar` might be null.
         assert appBar != null;
 
-        // Display the `Spinner` and the back arrow in the `AppBar`.
+        // Display the spinner and the back arrow in the app bar.
         appBar.setCustomView(R.layout.bookmarks_databaseview_spinner);
         appBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_HOME_AS_UP);
 
         // Initialize the database handler.  `this` specifies the context.  The two `null`s do not specify the database name or a `CursorFactory`.  The `0` is to specify a database version, but that is set instead using a constant in `BookmarksDatabaseHelper`.
         bookmarksDatabaseHelper = new BookmarksDatabaseHelper(this, null, null, 0);
 
-        // Setup a `MatrixCursor` for "All Folders" and "Home Folder".
+        // Setup a matrix cursor for "All Folders" and "Home Folder".
         String[] matrixCursorColumnNames = {BookmarksDatabaseHelper._ID, BookmarksDatabaseHelper.BOOKMARK_NAME};
         MatrixCursor matrixCursor = new MatrixCursor(matrixCursorColumnNames);
         matrixCursor.addRow(new Object[]{ALL_FOLDERS_DATABASE_ID, getString(R.string.all_folders)});
@@ -127,28 +127,26 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
         // Combine `matrixCursor` and `foldersCursor`.
         MergeCursor foldersMergeCursor = new MergeCursor(new Cursor[]{matrixCursor, foldersCursor});
 
-        // Create a `ResourceCursorAdapter` for the `Spinner` with `this` context.  `0` specifies no flags.;
+        // Create a resource cursor adapter for the spinner.
         ResourceCursorAdapter foldersCursorAdapter = new ResourceCursorAdapter(this, R.layout.bookmarks_databaseview_spinner_item, foldersMergeCursor, 0) {
             @Override
             public void bindView(View view, Context context, Cursor cursor) {
-                // Get a handle for the `Spinner` item `TextView`.
+                // Get a handle for the spinner item text view.
                 TextView spinnerItemTextView = view.findViewById(R.id.spinner_item_textview);
 
-                // Set the `TextView` to display the folder name.
+                // Set the text view to display the folder name.
                 spinnerItemTextView.setText(cursor.getString(cursor.getColumnIndex(BookmarksDatabaseHelper.BOOKMARK_NAME)));
             }
         };
 
-        // Set the `ResourceCursorAdapter` drop drown view resource.
+        // Set the resource cursor adapter drop drown view resource.
         foldersCursorAdapter.setDropDownViewResource(R.layout.bookmarks_databaseview_spinner_dropdown_item);
 
-        // Get a handle for the folder `Spinner`.
+        // Get a handle for the folder spinner and set the adapter.
         Spinner folderSpinner = findViewById(R.id.bookmarks_databaseview_spinner);
-
-        // Set the adapter for the folder `Spinner`.
         folderSpinner.setAdapter(foldersCursorAdapter);
 
-        // Handle clicks on the `Spinner` dropdown.
+        // Handle clicks on the spinner dropdown.
         folderSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
             @Override
             public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
@@ -158,7 +156,7 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
                 // Store the current folder database ID.
                 currentFolderDatabaseId = databaseId;
 
-                // Populate the bookmarks `ListView` based on the `Spinner` selection.
+                // Populate the bookmarks list view based on the spinner selection.
                 switch (databaseId) {
                     // Get a cursor with all the folders.
                     case ALL_FOLDERS_DATABASE_ID:
@@ -185,7 +183,7 @@ public class BookmarksDatabaseViewActivity extends AppCompatActivity implements
                         currentFolderName = folderName;
                 }
 
-                // Update the `ListView`.
+                // Update the list view.
                 bookmarksCursorAdapter.changeCursor(bookmarksCursor);
             }
 
index 97362df..f594c59 100644 (file)
@@ -154,10 +154,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         HttpAuthenticationDialog.HttpAuthenticationListener, NavigationView.OnNavigationItemSelectedListener, PinnedSslCertificateMismatchDialog.PinnedSslCertificateMismatchListener,
         SslCertificateErrorDialog.SslCertificateErrorListener, UrlHistoryDialog.UrlHistoryListener {
 
-    // `darkTheme` is public static so it can be accessed from `AboutActivity`, `GuideActivity`, `AddDomainDialog`, `SettingsActivity`, `DomainsActivity`, `DomainsListFragment`, `BookmarksActivity`,
-    // `BookmarksDatabaseViewActivity`, `CreateBookmarkDialog`, `CreateBookmarkFolderDialog`, `DownloadFileDialog`, `DownloadImageDialog`, `EditBookmarkDialog`, `EditBookmarkFolderDialog`,
-    // `EditBookmarkDatabaseViewDialog`, `HttpAuthenticationDialog`, `MoveToFolderDialog`, `SslCertificateErrorDialog`, `UrlHistoryDialog`, `ViewSslCertificateDialog`, `CreateHomeScreenShortcutDialog`,
-    //  and `OrbotProxyHelper`. It is also used in `onCreate()`, `applyAppSettings()`, `applyDomainSettings()`, and `updatePrivacyIcons()`.
+    // `darkTheme` is public static so it can be accessed from everywhere.
     public static boolean darkTheme;
 
     // `allowScreenshots` is public static so it can be accessed from everywhere.  It is also used in `onCreate()`.
@@ -200,6 +197,44 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
     public static String fanboyAnnoyanceVersion;
     public static String fanboySocialVersion;
 
+    // The request items are public static so they can be accessed by `BlockListHelper`, `RequestsArrayAdapter`, and `ViewRequestsDialog`.  They are also used in `onCreate()`.
+    public static List<String[]> resourceRequests;
+    public static String[] whiteListResultStringArray;
+    public final static int REQUEST_DISPOSITION = 0;
+    public final static int REQUEST_URL = 1;
+    public final static int REQUEST_BLOCKLIST = 2;
+    public final static int REQUEST_SUBLIST = 3;
+    public final static int REQUEST_BLOCKLIST_ENTRIES = 4;
+    public final static int REQUEST_BLOCKLIST_ORIGINAL_ENTRY = 5;
+
+    public final static int REQUEST_DEFAULT = 0;
+    public final static int REQUEST_ALLOWED = 1;
+    public final static int REQUEST_BLOCKED = 2;
+
+    public final static int MAIN_WHITELIST = 1;
+    public final static int FINAL_WHITELIST = 2;
+    public final static int DOMAIN_WHITELIST = 3;
+    public final static int DOMAIN_INITIAL_WHITELIST = 4;
+    public final static int DOMAIN_FINAL_WHITELIST = 5;
+    public final static int THIRD_PARTY_WHITELIST = 6;
+    public final static int THIRD_PARTY_DOMAIN_WHITELIST = 7;
+    public final static int THIRD_PARTY_DOMAIN_INITIAL_WHITELIST = 8;
+
+    public final static int MAIN_BLACKLIST = 9;
+    public final static int INITIAL_BLACKLIST = 10;
+    public final static int FINAL_BLACKLIST = 11;
+    public final static int DOMAIN_BLACKLIST = 12;
+    public final static int DOMAIN_INITIAL_BLACKLIST = 13;
+    public final static int DOMAIN_FINAL_BLACKLIST = 14;
+    public final static int DOMAIN_REGULAR_EXPRESSION_BLACKLIST = 15;
+    public final static int THIRD_PARTY_BLACKLIST = 16;
+    public final static int THIRD_PARTY_INITIAL_BLACKLIST = 17;
+    public final static int THIRD_PARTY_DOMAIN_BLACKLIST = 18;
+    public final static int THIRD_PARTY_DOMAIN_INITIAL_BLACKLIST = 19;
+    public final static int THIRD_PARTY_REGULAR_EXPRESSION_BLACKLIST = 20;
+    public final static int THIRD_PARTY_DOMAIN_REGULAR_EXPRESSION_BLACKLIST = 21;
+    public final static int REGULAR_EXPRESSION_BLACKLIST = 22;
+
     // `currentBookmarksFolder` is public static so it can be accessed from `BookmarksActivity`.  It is also used in `onCreate()`, `onBackPressed()`, `onCreateBookmark()`, `onCreateBookmarkFolder()`,
     // `onSaveEditBookmark()`, `onSaveEditBookmarkFolder()`, and `loadBookmarksFolder()`.
     public static String currentBookmarksFolder;
@@ -754,6 +789,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         final MenuItem navigationBackMenuItem = navigationMenu.getItem(1);
         final MenuItem navigationForwardMenuItem = navigationMenu.getItem(2);
         final MenuItem navigationHistoryMenuItem = navigationMenu.getItem(3);
+        final MenuItem navigationRequestsMenuItem = navigationMenu.getItem(4);
 
         // Initialize the bookmarks database helper.  `this` specifies the context.  The two `nulls` do not specify the database name or a `CursorFactory`.
         // The `0` specifies a database version, but that is ignored and set instead using a constant in `BookmarksDatabaseHelper`.
@@ -816,7 +852,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
             return true;
         });
 
-        // The `DrawerListener` allows us to update the Navigation Menu.
+        // The `DrawerListener` is used to update the Navigation Menu.
         drawerLayout.addDrawerListener(new DrawerLayout.DrawerListener() {
             @Override
             public void onDrawerSlide(@NonNull View drawerView, float slideOffset) {
@@ -833,10 +869,21 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
             @Override
             public void onDrawerStateChanged(int newState) {
                 if ((newState == DrawerLayout.STATE_SETTLING) || (newState == DrawerLayout.STATE_DRAGGING)) {  // The drawer is opening or closing.
-                    // Update the `Back`, `Forward`, and `History` menu items.
+                    // Initialize a the blocked requests counter.
+                    int blockedRequests = 0;
+
+                    // Count the number of blocked requests.
+                    for (int i = 0; i < resourceRequests.size(); i++) {
+                        if (Integer.valueOf(resourceRequests.get(i)[REQUEST_DISPOSITION]) == REQUEST_BLOCKED) {
+                            blockedRequests++;
+                        }
+                    }
+
+                    // Update the back, forward, history, and requests menu items.
                     navigationBackMenuItem.setEnabled(mainWebView.canGoBack());
                     navigationForwardMenuItem.setEnabled(mainWebView.canGoForward());
                     navigationHistoryMenuItem.setEnabled((mainWebView.canGoBack() || mainWebView.canGoForward()));
+                    navigationRequestsMenuItem.setTitle(getResources().getString(R.string.requests) + " - " + blockedRequests);
 
                     // Hide the keyboard (if displayed) so we can see the navigation menu.  `0` indicates no additional flags.
                     inputMethodManager.hideSoftInputFromWindow(mainWebView.getWindowToken(), 0);
@@ -1103,6 +1150,9 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         // Instantiate the block list helper.
         BlockListHelper blockListHelper = new BlockListHelper();
 
+        // Initialize the list of resource requests.
+        resourceRequests = new ArrayList<>();
+
         // Parse the block lists.
         final ArrayList<List<String[]>> easyList = blockListHelper.parseBlockList(getAssets(), "blocklists/easylist.txt");
         final ArrayList<List<String[]>> easyPrivacy = blockListHelper.parseBlockList(getAssets(), "blocklists/easyprivacy.txt");
@@ -1188,13 +1238,16 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                 }
             }
 
-            // Check requests against the block lists.  The deprecated `shouldInterceptRequest` must be used until minimum API >= 21.
+            // Check requests against the block lists.  The deprecated `shouldInterceptRequest()` must be used until minimum API >= 21.
             @SuppressWarnings("deprecation")
             @Override
             public WebResourceResponse shouldInterceptRequest(WebView view, String url){
                 // Create an empty web resource response to be used if the resource request is blocked.
                 WebResourceResponse emptyWebResourceResponse = new WebResourceResponse("text/plain", "utf8", new ByteArrayInputStream("".getBytes()));
 
+                // Reset `whiteListResultStringArray`.
+                whiteListResultStringArray = null;
+
                 // Check EasyList if it is enabled.
                 if (easyListEnabled) {
                     if (blockListHelper.isBlocked(formattedUrlString, url, easyList)) {
@@ -1224,6 +1277,13 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                     }
                 }
 
+                // Add the request to the log.
+                if (whiteListResultStringArray != null ) {  // The request was processed by a whitelist.
+                    resourceRequests.add(whiteListResultStringArray);
+                } else {  // The request didn't match any blocklist entry.  Log it as a defult request.
+                    resourceRequests.add(new String[]{String.valueOf(REQUEST_DEFAULT), url});
+                }
+
                 // The resource request has not been blocked.  `return null` loads the requested resource.
                 return null;
             }
@@ -1241,7 +1301,11 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
 
             // Update the URL in urlTextBox when the page starts to load.
             @Override
-            public void onPageStarted(WebView view, String url, Bitmap favicon) {// If night mode is enabled, hide `mainWebView` until after the night mode CSS is applied.
+            public void onPageStarted(WebView view, String url, Bitmap favicon) {
+                // Reset the list of resource requests.
+                resourceRequests.clear();
+
+                // If night mode is enabled, hide `mainWebView` until after the night mode CSS is applied.
                 if (nightMode) {
                     mainWebView.setVisibility(View.INVISIBLE);
                 }
@@ -2184,6 +2248,12 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                 urlHistoryDialogFragment.show(getSupportFragmentManager(), getString(R.string.history));
                 break;
 
+            case R.id.requests:
+                // Launch the requests activity.
+                Intent requestsIntent = new Intent(this, RequestsActivity.class);
+                startActivity(requestsIntent);
+                break;
+
             case R.id.downloads:
                 // Launch the system Download Manager.
                 Intent downloadManagerIntent = new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS);
@@ -2199,7 +2269,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                 reapplyDomainSettingsOnRestart = true;
                 currentDomainName = "";
 
-                // Launch `DomainsActivity`.
+                // Launch the domains activity.
                 Intent domainsIntent = new Intent(this, DomainsActivity.class);
                 startActivity(domainsIntent);
                 break;
@@ -2212,7 +2282,7 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
                 reapplyDomainSettingsOnRestart = true;
                 currentDomainName = "";
 
-                // Launch `SettingsActivity`.
+                // Launch the settings activity.
                 Intent settingsIntent = new Intent(this, SettingsActivity.class);
                 startActivity(settingsIntent);
                 break;
@@ -3123,11 +3193,11 @@ public class MainWebViewActivity extends AppCompatActivity implements CreateBook
         // Apply any custom domain settings.
         applyDomainSettings(url, true, false);
 
-        // Load the URL.
-        mainWebView.loadUrl(url, customHeaders);
-
         // Set `urlIsLoading` to prevent changes in the user agent on websites with redirects from reloading the current website.
         urlIsLoading = true;
+
+        // Load the URL.
+        mainWebView.loadUrl(url, customHeaders);
     }
 
     public void findPreviousOnPage(View view) {
diff --git a/app/src/main/java/com/stoutner/privacybrowser/activities/RequestsActivity.java b/app/src/main/java/com/stoutner/privacybrowser/activities/RequestsActivity.java
new file mode 100644 (file)
index 0000000..8d91126
--- /dev/null
@@ -0,0 +1,217 @@
+/*
+ * Copyright © 2018 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+ *
+ * Privacy Browser is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Privacy Browser is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package com.stoutner.privacybrowser.activities;
+
+import android.content.Context;
+import android.database.Cursor;
+import android.database.MatrixCursor;
+import android.os.Bundle;
+import android.support.v7.app.ActionBar;
+import android.support.v7.app.AppCompatActivity;
+import android.support.v7.app.AppCompatDialogFragment;
+import android.support.v7.widget.Toolbar;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.AdapterView;
+import android.widget.ArrayAdapter;
+import android.widget.ListView;
+import android.widget.ResourceCursorAdapter;
+import android.widget.Spinner;
+import android.widget.TextView;
+
+import com.stoutner.privacybrowser.R;
+import com.stoutner.privacybrowser.adapters.RequestsArrayAdapter;
+import com.stoutner.privacybrowser.dialogs.ViewRequestDialog;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class RequestsActivity extends AppCompatActivity implements ViewRequestDialog.ViewRequestListener {
+    // The list view is used in `onCreate()` and `launchViewRequestDialog()`.
+    private ListView resourceRequestsListView;
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        // Disable screenshots if not allowed.
+        if (!MainWebViewActivity.allowScreenshots) {
+            getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
+        }
+
+        // Set the activity theme.
+        if (MainWebViewActivity.darkTheme) {
+            setTheme(R.style.PrivacyBrowserDark_SecondaryActivity);
+        } else {
+            setTheme(R.style.PrivacyBrowserLight_SecondaryActivity);
+        }
+
+        // Run the default commands.
+        super.onCreate(savedInstanceState);
+
+        // Set the content view.
+        setContentView(R.layout.requests_coordinatorlayout);
+
+        // Use the `SupportActionBar` from `android.support.v7.app.ActionBar` until the minimum API is >= 21.
+        Toolbar blockListsAppBar = findViewById(R.id.blocklists_toolbar);
+        setSupportActionBar(blockListsAppBar);
+
+        // Get a handle for the app bar and the list view.
+        ActionBar appBar = getSupportActionBar();
+        resourceRequestsListView = findViewById(R.id.resource_requests_listview);
+
+        // Remove the incorrect lint warning that `appBar` might be null.
+        assert appBar != null;
+
+        // Display the spinner and the back arrow in the app bar.
+        appBar.setCustomView(R.layout.requests_spinner);
+        appBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_HOME_AS_UP);
+
+        // Initialize the resource array lists.
+        List<String[]> defaultResourceRequests = new ArrayList<>();
+        List<String[]> allowedResourceRequests = new ArrayList<>();
+        List<String[]> blockedResourceRequests = new ArrayList<>();
+
+        // Populate the resource array lists.
+        for (String[] request : MainWebViewActivity.resourceRequests) {
+            switch (Integer.valueOf(request[MainWebViewActivity.REQUEST_DISPOSITION])) {
+                case MainWebViewActivity.REQUEST_DEFAULT:
+                    defaultResourceRequests.add(request);
+                    break;
+
+                case MainWebViewActivity.REQUEST_ALLOWED:
+                    allowedResourceRequests.add(request);
+                    break;
+
+                case MainWebViewActivity.REQUEST_BLOCKED:
+                    blockedResourceRequests.add(request);
+                    break;
+            }
+        }
+
+        // Setup a matrix cursor for the resource lists.
+        MatrixCursor spinnerCursor = new MatrixCursor(new String[]{"_id", "Requests"});
+        spinnerCursor.addRow(new Object[]{0, getString(R.string.all) + " - " + MainWebViewActivity.resourceRequests.size()});
+        spinnerCursor.addRow(new Object[]{1, getString(R.string.default_label) + " - " + defaultResourceRequests.size()});
+        spinnerCursor.addRow(new Object[]{2, getString(R.string.allowed) + " - " + allowedResourceRequests.size()});
+        spinnerCursor.addRow(new Object[]{3, getString(R.string.blocked) + " - " + blockedResourceRequests.size()});
+
+        // Create a resource cursor adapter for the spinner.
+        ResourceCursorAdapter spinnerCursorAdapter = new ResourceCursorAdapter(this, R.layout.requests_spinner_item, spinnerCursor, 0) {
+            @Override
+            public void bindView(View view, Context context, Cursor cursor) {
+                // Get a handle for the spinner item text view.
+                TextView spinnerItemTextView = view.findViewById(R.id.spinner_item_textview);
+
+                // Set the text view to display the resource list.
+                spinnerItemTextView.setText(cursor.getString(1));
+            }
+        };
+
+        // Set the resource cursor adapter drop down view resource.
+        spinnerCursorAdapter.setDropDownViewResource(R.layout.requests_spinner_dropdown_item);
+
+        // Get a handle for the app bar spinner and set the adapter.
+        Spinner appBarSpinner = findViewById(R.id.requests_spinner);
+        appBarSpinner.setAdapter(spinnerCursorAdapter);
+
+        // Handle clicks on the spinner dropdown.
+        appBarSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
+            @Override
+            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
+                switch (position) {
+                    case 0:  // All requests.
+                        // Get an adapter for all the request.
+                        ArrayAdapter<String[]> allResourceRequestsArrayAdapter = new RequestsArrayAdapter(getApplicationContext(), MainWebViewActivity.resourceRequests);
+
+                        // Display the adapter in the list view.
+                        resourceRequestsListView.setAdapter(allResourceRequestsArrayAdapter);
+                        break;
+
+                    case 1:  // Default requests.
+                        // Get an adapter for the default requests.
+                        ArrayAdapter<String[]> defaultResourceRequestsArrayAdapter = new RequestsArrayAdapter(getApplicationContext(), defaultResourceRequests);
+
+                        // Display the adapter in the list view.
+                        resourceRequestsListView.setAdapter(defaultResourceRequestsArrayAdapter);
+                        break;
+
+                    case 2:  // Allowed requests.
+                        // Get an adapter for the allowed requests.
+                        ArrayAdapter<String[]> allowedResourceRequestsArrayAdapter = new RequestsArrayAdapter(getApplicationContext(), allowedResourceRequests);
+
+                        // Display the adapter in the list view.
+                        resourceRequestsListView.setAdapter(allowedResourceRequestsArrayAdapter);
+                        break;
+
+                    case 3:  // Blocked requests.
+                        // Get an adapter fo the blocked requests.
+                        ArrayAdapter<String[]> blockedResourceRequestsArrayAdapter = new RequestsArrayAdapter(getApplicationContext(), blockedResourceRequests);
+
+                        // Display the adapter in the list view.
+                        resourceRequestsListView.setAdapter(blockedResourceRequestsArrayAdapter);
+                        break;
+                }
+            }
+
+            @Override
+            public void onNothingSelected(AdapterView<?> parent) {
+                // Do nothing.
+            }
+        });
+
+        // Create an array adapter with the list of the resource requests.
+        ArrayAdapter<String[]> resourceRequestsArrayAdapter = new RequestsArrayAdapter(getApplicationContext(), MainWebViewActivity.resourceRequests);
+
+        // Populate the list view with the resource requests adapter.
+        resourceRequestsListView.setAdapter(resourceRequestsArrayAdapter);
+
+        // Listen for taps on entries in the list view.
+        resourceRequestsListView.setOnItemClickListener((AdapterView<?> parent, View view, int position, long id) -> {
+            // Display the view request dialog.  The list view is 0 based, so the position must be incremented by 1.
+            launchViewRequestDialog(position + 1);
+        });
+    }
+
+    @Override
+    public void onPrevious(int id) {
+        // Show the previous dialog.
+        launchViewRequestDialog(id -1);
+    }
+
+    @Override
+    public void onNext(int id) {
+        // Show the next dialog.
+        launchViewRequestDialog(id + 1);
+    }
+
+    private void launchViewRequestDialog(int id) {
+        // Determine if this is the last request in the list.
+        boolean isLastRequest = (id == resourceRequestsListView.getCount());
+
+        // Get the string array for the selected resource request.  The resource requests list view is zero based.
+        String[] selectedRequestStringArray = (String[]) resourceRequestsListView.getItemAtPosition(id - 1);
+
+        // Remove the warning that `selectedRequest` might be null.
+        assert selectedRequestStringArray != null;
+
+        // Show the request detail dialog.
+        AppCompatDialogFragment viewRequestDialogFragment = ViewRequestDialog.request(id, isLastRequest, selectedRequestStringArray);
+        viewRequestDialogFragment.show(getSupportFragmentManager(), getString(R.string.request_details));
+    }
+}
\ No newline at end of file
index 0ebed74..be6d11a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2016-2017 Soren Stoutner <soren@stoutner.com>.
+ * Copyright © 2016-2018 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
  *
@@ -40,7 +40,7 @@ public class HistoryArrayAdapter extends ArrayAdapter<History> {
     private final int currentPage;
 
     public HistoryArrayAdapter(Context context, ArrayList<History> historyArrayList, int currentPageId) {
-        // We need to call `super` from the base `ArrayAdapter`.  `0` is the `textViewResourceId`.
+        // `super` must be called from the base `ArrayAdapter`.  `0` is the `textViewResourceId`, which is unused.
         super(context, 0, historyArrayList);
 
         // Store `currentPageId` in the class variable.
@@ -50,15 +50,15 @@ public class HistoryArrayAdapter extends ArrayAdapter<History> {
     @Override
     @NonNull
     public View getView(int position, View convertView, @NonNull ViewGroup parent) {
-        // Inflate the view if it is `null`.
+        // Inflate the view if it is null.
         if (convertView == null) {
             // `false` does not attach `url_history_item_linearlayout` to `parent`.
             convertView = LayoutInflater.from(getContext()).inflate(R.layout.url_history_item_linearlayout, parent, false);
         }
 
         // Get handles for `favoriteIconImageView` and `urlTextView`.
-        ImageView favoriteIconImageView = (ImageView) convertView.findViewById(R.id.history_favorite_icon_imageview);
-        TextView urlTextView = (TextView) convertView.findViewById(R.id.history_url_textview);
+        ImageView favoriteIconImageView = convertView.findViewById(R.id.history_favorite_icon_imageview);
+        TextView urlTextView = convertView.findViewById(R.id.history_url_textview);
 
         // Get the URL history for this position.
         History history = getItem(position);
diff --git a/app/src/main/java/com/stoutner/privacybrowser/adapters/RequestsArrayAdapter.java b/app/src/main/java/com/stoutner/privacybrowser/adapters/RequestsArrayAdapter.java
new file mode 100644 (file)
index 0000000..e0c58ce
--- /dev/null
@@ -0,0 +1,127 @@
+/*
+ * Copyright © 2018 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+ *
+ * Privacy Browser is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Privacy Browser is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package com.stoutner.privacybrowser.adapters;
+
+import android.content.Context;
+import android.support.annotation.NonNull;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.LinearLayout;
+import android.widget.TextView;
+
+import com.stoutner.privacybrowser.R;
+import com.stoutner.privacybrowser.activities.MainWebViewActivity;
+
+import java.util.List;
+
+public class RequestsArrayAdapter extends ArrayAdapter<String[]> {
+    public RequestsArrayAdapter(Context context, List<String[]> resourceRequestsList) {
+        // `super` must be called form the base ArrayAdapter.  `0` is the `textViewResourceId`, which is unused.
+        super(context, 0, resourceRequestsList);
+    }
+
+    @Override
+    @NonNull
+    public View getView(int position, View view, @NonNull ViewGroup parent) {
+        // Get a handle for the context.
+        Context context = getContext();
+
+        // Inflate the view if it is null.
+        if (view == null) {
+            view = LayoutInflater.from(context).inflate(R.layout.requests_item_linearlayout, parent, false);
+        }
+
+        // Get handles for the views.
+        LinearLayout linearLayout = view.findViewById(R.id.request_item_linearlayout);
+        TextView actionTextView = view.findViewById(R.id.request_item_action);
+        TextView urlTextView = view.findViewById(R.id.request_item_url);
+
+        // Get the string array for this entry.
+        String[] entryStringArray = getItem(position);
+
+        // Remove the lint warning below that `entryStringArray` might be null.
+        assert entryStringArray != null;
+
+        // The ID is one greater than the position because it is 0 based.
+        int id = position + 1;
+
+        // Set the action text and the background color.
+        switch (Integer.valueOf(entryStringArray[0])) {
+            case MainWebViewActivity.REQUEST_DEFAULT:
+                // Create the disposition string.
+                String requestDefault = id + ". " + context.getResources().getString(R.string.allowed);
+
+                // Set the disposition text.
+                actionTextView.setText(requestDefault);
+
+                // Set the background color.
+                linearLayout.setBackgroundColor(context.getResources().getColor(R.color.transparent));
+                break;
+
+            case MainWebViewActivity.REQUEST_ALLOWED:
+                // Create the disposition string.
+                String requestAllowed = id + ". " + context.getResources().getString(R.string.allowed);
+
+                // Set the disposition text.
+                actionTextView.setText(requestAllowed);
+
+                // Set the background color.
+                if (MainWebViewActivity.darkTheme) {
+                    linearLayout.setBackgroundColor(context.getResources().getColor(R.color.blue_700_50));
+                } else {
+                    linearLayout.setBackgroundColor(context.getResources().getColor(R.color.blue_100));
+                }
+                break;
+
+
+            case MainWebViewActivity.REQUEST_BLOCKED:
+                // Create the disposition string.
+                String requestBlocked = id + ". " + context.getResources().getString(R.string.blocked);
+
+                // Set the disposition text.
+                actionTextView.setText(requestBlocked);
+
+                // Set the background color.
+                if (MainWebViewActivity.darkTheme) {
+                    linearLayout.setBackgroundColor(context.getResources().getColor(R.color.red_700_50));
+                } else {
+                    linearLayout.setBackgroundColor(context.getResources().getColor(R.color.red_100));
+                }
+                break;
+        }
+
+        // Set the URL text.
+        urlTextView.setText(entryStringArray[1]);
+
+        // Set the text color.  For some unexplained reason, `android:textColor="?android:textColorPrimary"` doesn't work in the layout file.  Probably some bug relating to array adapters.
+        if (MainWebViewActivity.darkTheme) {
+            actionTextView.setTextColor(context.getResources().getColor(R.color.gray_200));
+            urlTextView.setTextColor(context.getResources().getColor(R.color.gray_200));
+        } else {
+            actionTextView.setTextColor(context.getResources().getColor(R.color.black));
+            urlTextView.setTextColor(context.getResources().getColor(R.color.black));
+        }
+
+        // Return the modified view.
+        return view;
+    }
+}
index c67c3ae..edffc63 100644 (file)
@@ -53,14 +53,11 @@ public class AddDomainDialog extends AppCompatDialogFragment {
 
 
     public void onAttach(Context context) {
+        // Run the default commands.
         super.onAttach(context);
 
-        // Get a handle for `AddDomainListener` from `context`.
-        try {
-            addDomainListener = (AddDomainListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement `AddDomainListener`.");
-        }
+        // Get a handle for the listener from the launching context.
+        addDomainListener = (AddDomainListener) context;
     }
 
     // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
index caadd02..d034aac 100644 (file)
@@ -51,12 +51,8 @@ public class CreateBookmarkDialog extends AppCompatDialogFragment {
     public void onAttach(Context context) {
         super.onAttach(context);
 
-        // Get a handle for `CreateBookmarkListener` from `context`.
-        try {
-            createBookmarkListener = (CreateBookmarkListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement `CreateBookmarkListener`.");
-        }
+        // Get a handle for `CreateBookmarkListener` from the launching context.
+        createBookmarkListener = (CreateBookmarkListener) context;
     }
 
     // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
index 98fb9dc..670d237 100644 (file)
@@ -54,12 +54,8 @@ public class CreateBookmarkFolderDialog extends AppCompatDialogFragment {
     public void onAttach(Context context) {
         super.onAttach(context);
 
-        // Get a handle for `createBookmarkFolderListener` from `context`.
-        try {
-            createBookmarkFolderListener = (CreateBookmarkFolderListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement CreateBookmarkFolderListener.");
-        }
+        // Get a handle for `createBookmarkFolderListener` from the launching context.
+        createBookmarkFolderListener = (CreateBookmarkFolderListener) context;
     }
 
     // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
index f332128..ca8d72b 100644 (file)
@@ -50,12 +50,11 @@ public class CreateHomeScreenShortcutDialog extends AppCompatDialogFragment {
 
     // Check to make sure that the parent activity implements the listener.
     public void onAttach(Context context) {
+        // Run the default commands.
         super.onAttach(context);
-        try {
-            createHomeScreenShortcutListener = (CreateHomeScreenShortcutListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement CreateHomeScreenShortcutListener.");
-        }
+
+        // Get a handle for `CreateHomeScreenShortcutListener` from the launching context.
+        createHomeScreenShortcutListener = (CreateHomeScreenShortcutListener) context;
     }
 
     // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
index 5ff4a85..cf94812 100644 (file)
@@ -42,10 +42,22 @@ import com.stoutner.privacybrowser.activities.MainWebViewActivity;
 import java.util.Locale;
 
 public class DownloadFileDialog extends AppCompatDialogFragment {
+    // `downloadFileListener` is used in `onAttach()` and `onCreateDialog()`.
+    private DownloadFileListener downloadFileListener;
+
+    // The public interface is used to send information back to the parent activity.
+    public interface DownloadFileListener {
+        void onDownloadFile(AppCompatDialogFragment dialogFragment, String downloadUrl);
+    }
+
+    @Override
+    public void onAttach(Context context) {
+        // Run the default commands.
+        super.onAttach(context);
 
-    private String downloadUrl;
-    private String downloadFileName;
-    private String fileSize;
+        // Get a handle for `DownloadFileListener` from the launching context.
+        downloadFileListener = (DownloadFileListener) context;
+    }
 
     public static DownloadFileDialog fromUrl(String urlString, String contentDisposition, long contentLength) {
         // Create an arguments bundle.
@@ -78,52 +90,28 @@ public class DownloadFileDialog extends AppCompatDialogFragment {
     }
 
     @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
+    @NonNull
+    // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
+    @SuppressLint("InflateParams")
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
         // Remove the warning below that `getArguments()` might be null.
         assert getArguments() != null;
 
-        // Store the strings in the local class variables.
-        downloadUrl = getArguments().getString("URL");
-        downloadFileName = getArguments().getString("File_Name");
-
-        // Get the `File_Size`.
+        // Store the variables from the bundle.
+        String downloadUrl = getArguments().getString("URL");
+        String downloadFileName = getArguments().getString("File_Name");
         long fileSizeLong = getArguments().getLong("File_Size");
 
+        // Initialize the file size string.
+        String fileSize;
+
         // Convert `fileSizeLong` to a String.
         if (fileSizeLong == -1) {  // We don't know the file size.
             fileSize = getString(R.string.unknown_size);
         } else {  // Convert `fileSize` to MB and store it in `fileSizeString`.  `%.3g` displays the three most significant digits.
             fileSize = String.format(Locale.getDefault(), "%.3g", (float) fileSizeLong / 1048576) + " MB";
         }
-    }
-
-    // The public interface is used to send information back to the parent activity.
-    public interface DownloadFileListener {
-        void onDownloadFile(AppCompatDialogFragment dialogFragment, String downloadUrl);
-    }
-
-    // `downloadFileListener` is used in `onAttach()` and `onCreateDialog()`.
-    private DownloadFileListener downloadFileListener;
-
-    @Override
-    public void onAttach(Context context) {
-        super.onAttach(context);
-
-        // Check to make sure the parent activity implements the listener.
-        try {
-            downloadFileListener = (DownloadFileListener) context;
-        } catch (ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement DownloadFileListener.");
-        }
-    }
 
-    @Override
-    @NonNull
-    // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
-    @SuppressLint("InflateParams")
-    public Dialog onCreateDialog(Bundle savedInstanceState) {
         // Remove the warning below that `getActivity()` might be null;
         assert getActivity() != null;
 
index 2221bfe..94f2586 100644 (file)
@@ -41,9 +41,23 @@ import com.stoutner.privacybrowser.activities.MainWebViewActivity;
 // `android.support.v7.app.AlertDialog` uses more of the horizontal screen real estate versus `android.app.AlertDialog's` smaller width.
 // We have to use `AppCompatDialogFragment` instead of `DialogFragment` or an error is produced on API <=22.
 public class DownloadImageDialog extends AppCompatDialogFragment {
+    // `downloadImageListener` is used in `onAttach()` and `onCreateDialog()`.
+    private DownloadImageListener downloadImageListener;
+
+    // The public interface is used to send information back to the parent activity.
+    public interface DownloadImageListener {
+        void onDownloadImage(AppCompatDialogFragment dialogFragment, String downloadUrl);
+    }
+
+    // Check to make sure tha the parent activity implements the listener.
+    @Override
+    public void onAttach(Context context) {
+        // Run the default commands.
+        super.onAttach(context);
 
-    private String imageUrl;
-    private String imageFileName;
+        // Get a handle for `DownloadImageListener` from the launching context.
+        downloadImageListener = (DownloadImageListener) context;
+    }
 
     public static DownloadImageDialog imageUrl(String imageUrlString) {
         // Create an arguments bundle.
@@ -66,42 +80,18 @@ public class DownloadImageDialog extends AppCompatDialogFragment {
         return thisDownloadFileDialog;
     }
 
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // Remove the warning below that `getArguments()` might be null.
-        assert getArguments() != null;
-
-        // Store the strings in the local class variables.
-        imageUrl = getArguments().getString("URL");
-        imageFileName = getArguments().getString("Image_Name");
-    }
-
-    // The public interface is used to send information back to the parent activity.
-    public interface DownloadImageListener {
-        void onDownloadImage(AppCompatDialogFragment dialogFragment, String downloadUrl);
-    }
-
-    // `downloadImageListener` is used in `onAttach()` and `onCreateDialog()`.
-    private DownloadImageListener downloadImageListener;
-
-    // Check to make sure tha the parent activity implements the listener.
-    @Override
-    public void onAttach(Context context) {
-        super.onAttach(context);
-        try {
-            downloadImageListener = (DownloadImageListener) context;
-        } catch (ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement DownloadImageListener.");
-        }
-    }
-
     // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
     @SuppressLint("InflateParams")
     @Override
     @NonNull
     public Dialog onCreateDialog(Bundle savedInstanceState) {
+        // Remove the warning below that `getArguments()` might be null.
+        assert getArguments() != null;
+
+        // Get the strings from the bundle.
+        String imageUrl = getArguments().getString("URL");
+        String imageFileName = getArguments().getString("Image_Name");
+
         // Remove the warning below that `.getActivity()` might be null.
         assert getActivity() != null;
 
index 57b3889..117f000 100644 (file)
@@ -34,7 +34,22 @@ public class DownloadLocationPermissionDialog extends DialogFragment {
     public static final int DOWNLOAD_FILE = 1;
     public static final int DOWNLOAD_IMAGE = 2;
 
-    private int downloadType;
+    // `downloadLocationPermissionDialogListener` is used in `onAttach()` and `onCreateDialog()`.
+    private DownloadLocationPermissionDialogListener downloadLocationPermissionDialogListener;
+
+    // The public interface is used to send information back to the parent activity.
+    public interface DownloadLocationPermissionDialogListener {
+        void onCloseDownloadLocationPermissionDialog(int downloadType);
+    }
+
+    @Override
+    public void onAttach(Context context) {
+        // Run the default commands.
+        super.onAttach(context);
+
+        // Get a handle for `DownloadLocationPermissionDialogListener` from the launching context.
+        downloadLocationPermissionDialogListener = (DownloadLocationPermissionDialogListener) context;
+    }
 
     public static DownloadLocationPermissionDialog downloadType(int type) {
         // Create an arguments bundle.
@@ -50,35 +65,10 @@ public class DownloadLocationPermissionDialog extends DialogFragment {
     }
 
     @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
         // Store the download type in the local class variable.
-        downloadType = getArguments().getInt("Download_Type");
-    }
+        int downloadType = getArguments().getInt("Download_Type");
 
-    // The public interface is used to send information back to the parent activity.
-    public interface DownloadLocationPermissionDialogListener {
-        void onCloseDownloadLocationPermissionDialog(int downloadType);
-    }
-
-    // `downloadLocationPermissionDialogListener` is used in `onAttach()` and `onCreateDialog()`.
-    private DownloadLocationPermissionDialogListener downloadLocationPermissionDialogListener;
-
-    @Override
-    public void onAttach(Context context) {
-        super.onAttach(context);
-
-        // Check to make sure the parent activity implements the listener.
-        try {
-            downloadLocationPermissionDialogListener = (DownloadLocationPermissionDialogListener) context;
-        } catch (ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement DownloadLocationPermissionDialogListener.");
-        }
-    }
-
-    @Override
-    public Dialog onCreateDialog(Bundle savedInstanceState) {
         // Use a builder to create the alert dialog.
         AlertDialog.Builder dialogBuilder;
 
index 028db1b..e24c893 100644 (file)
@@ -58,7 +58,6 @@ public class EditBookmarkDatabaseViewDialog extends AppCompatDialogFragment {
 
     // Instantiate the class variables.
     private EditBookmarkDatabaseViewListener editBookmarkDatabaseViewListener;
-    private int bookmarkDatabaseId;
     private String currentBookmarkName;
     private String currentUrl;
     private int currentFolderDatabaseId;
@@ -80,12 +79,9 @@ public class EditBookmarkDatabaseViewDialog extends AppCompatDialogFragment {
         // Run the default commands.
         super.onAttach(context);
 
-        // Get a handle for `EditBookmarkDatabaseViewListener` from `context`.
-        try {
-            editBookmarkDatabaseViewListener = (EditBookmarkDatabaseViewListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement EditBookmarkDatabaseViewListener.");
-        }
+        // Get a handle for `EditBookmarkDatabaseViewListener` from the launching context.
+
+        editBookmarkDatabaseViewListener = (EditBookmarkDatabaseViewListener) context;
     }
 
     // Store the database ID in the arguments bundle.
@@ -104,24 +100,18 @@ public class EditBookmarkDatabaseViewDialog extends AppCompatDialogFragment {
         return editBookmarkDatabaseViewDialog;
     }
 
+        // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
+    @SuppressLint("InflateParams")
     @Override
-    public void onCreate(Bundle savedInstanceState) {
-        // Run the default commands.
-        super.onCreate(savedInstanceState);
-
+    @NonNull
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
         // Remove the incorrect lint warning below that `getInt()` might be null.
         assert getArguments() != null;
 
-        // Store the bookmark database ID in the class variable.
-        bookmarkDatabaseId = getArguments().getInt("Database ID");
-    }
+        // Get the bookmark database ID from the bundle.
+        int bookmarkDatabaseId = getArguments().getInt("Database ID");
 
-    // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
-    @SuppressLint("InflateParams")
-    @Override
-    @NonNull
-    public Dialog onCreateDialog(Bundle savedInstanceState) {
-        // Initialize the database helper.  The two `nulls` do not specify the database name or a `CursorFactory`.  The `0` specifies a database version, but that is ignored and set instead using a constant in `BookmarksDatabaseHelper`.
+        // Initialize the database helper.  The `0` specifies a database version, but that is ignored and set instead using a constant in `BookmarksDatabaseHelper`.
         BookmarksDatabaseHelper bookmarksDatabaseHelper = new BookmarksDatabaseHelper(getContext(), null, null, 0);
 
         // Get a cursor with the selected bookmark and move it to the first position.
index 492c113..27be599 100644 (file)
@@ -49,7 +49,6 @@ import com.stoutner.privacybrowser.helpers.BookmarksDatabaseHelper;
 public class EditBookmarkDialog extends AppCompatDialogFragment {
     // Instantiate the class variables.
     private EditBookmarkListener editBookmarkListener;
-    private int selectedBookmarkDatabaseId;
     private EditText nameEditText;
     private EditText urlEditText;
     private RadioButton newIconRadioButton;
@@ -66,12 +65,8 @@ public class EditBookmarkDialog extends AppCompatDialogFragment {
         // Run the default commands.
         super.onAttach(context);
 
-        // Get a handle for `EditBookmarkListener` from `context`.
-        try {
-            editBookmarkListener = (EditBookmarkListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement EditBookmarkListener.");
-        }
+        // Get a handle for `EditBookmarkListener` from the launching context.
+        editBookmarkListener = (EditBookmarkListener) context;
     }
 
     // Store the database ID in the arguments bundle.
@@ -90,24 +85,18 @@ public class EditBookmarkDialog extends AppCompatDialogFragment {
         return editBookmarkDialog;
     }
 
+    // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
+    @SuppressLint("InflateParams")
     @Override
-    public void onCreate(Bundle savedInstanceState) {
-        // Run the default commands.
-        super.onCreate(savedInstanceState);
-
+    @NonNull
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
         // Remove the incorrect lint warning that `getInt()` might be null.
         assert getArguments() != null;
 
         // Store the bookmark database ID in the class variable.
-        selectedBookmarkDatabaseId = getArguments().getInt("Database ID");
-    }
+        int selectedBookmarkDatabaseId = getArguments().getInt("Database ID");
 
-    // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
-    @SuppressLint("InflateParams")
-    @Override
-    @NonNull
-    public Dialog onCreateDialog(Bundle savedInstanceState) {
-        // Initialize the database helper.  The two `nulls` do not specify the database name or a `CursorFactory`.  The `0` specifies a database version, but that is ignored and set instead using a constant in `BookmarksDatabaseHelper`.
+        // Initialize the database helper.  The `0` specifies a database version, but that is ignored and set instead using a constant in `BookmarksDatabaseHelper`.
         BookmarksDatabaseHelper bookmarksDatabaseHelper = new BookmarksDatabaseHelper(getContext(), null, null, 0);
 
         // Get a `Cursor` with the selected bookmark and move it to the first position.
@@ -130,7 +119,7 @@ public class EditBookmarkDialog extends AppCompatDialogFragment {
         // Remove the incorrect lint warning that `getActivity()` might be null.
         assert getActivity() != null;
 
-        // Set the view.  The parent view is `null` because it will be assigned by `AlertDialog`.
+        // Set the view.  The parent view is null because it will be assigned by the alert dialog.
         dialogBuilder.setView(getActivity().getLayoutInflater().inflate(R.layout.edit_bookmark_dialog, null));
 
         // Set the listener for the negative button.
index af26e0b..0fb537b 100644 (file)
@@ -60,7 +60,6 @@ public class EditBookmarkFolderDatabaseViewDialog extends AppCompatDialogFragmen
     // Instantiate the class variables.
     private EditBookmarkFolderDatabaseViewListener editBookmarkFolderDatabaseViewListener;
     private BookmarksDatabaseHelper bookmarksDatabaseHelper;
-    private int folderDatabaseId;
     private StringBuilder exceptFolders;
     private String currentFolderName;
     private int currentParentFolderDatabaseId;
@@ -80,12 +79,8 @@ public class EditBookmarkFolderDatabaseViewDialog extends AppCompatDialogFragmen
         // Run the default commands.
         super.onAttach(context);
 
-        // Get a handle for `EditBookmarkDatabaseViewListener` from `context`.
-        try {
-            editBookmarkFolderDatabaseViewListener = (EditBookmarkFolderDatabaseViewListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement EditBookmarkFolderDatabaseViewListener.");
-        }
+        // Get a handle for `EditBookmarkDatabaseViewListener` from the launching context.
+        editBookmarkFolderDatabaseViewListener = (EditBookmarkFolderDatabaseViewListener) context;
     }
 
     // Store the database ID in the arguments bundle.
@@ -104,23 +99,17 @@ public class EditBookmarkFolderDatabaseViewDialog extends AppCompatDialogFragmen
         return editBookmarkFolderDatabaseViewDialog;
     }
 
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        // Run the default commands.
-        super.onCreate(savedInstanceState);
-
-        // Remove the incorrect lint warning that `getInt()` might be null.
-        assert getArguments() != null;
-
-        // Store the bookmark database ID in the class variable.
-        folderDatabaseId = getArguments().getInt("Database ID");
-    }
-
     // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
     @SuppressLint("InflateParams")
     @Override
     @NonNull
     public Dialog onCreateDialog(Bundle savedInstanceState) {
+        // Remove the incorrect lint warning that `getInt()` might be null.
+        assert getArguments() != null;
+
+        // Get the bookmark database ID from the bundle.
+        int folderDatabaseId = getArguments().getInt("Database ID");
+
         // Initialize the database helper.  The two `nulls` do not specify the database name or a `CursorFactory`.  The `0` specifies a database version, but that is ignored and set instead using a constant in `BookmarksDatabaseHelper`.
         bookmarksDatabaseHelper = new BookmarksDatabaseHelper(getContext(), null, null, 0);
 
@@ -250,7 +239,7 @@ public class EditBookmarkFolderDatabaseViewDialog extends AppCompatDialogFragmen
         // Select the current folder in the `Spinner` if the bookmark isn't in the "Home Folder".
         if (!parentFolder.equals("")) {
             // Get the database ID of the parent folder.
-            int folderDatabaseId = bookmarksDatabaseHelper.getFolderDatabaseId(folderCursor.getString(folderCursor.getColumnIndex(BookmarksDatabaseHelper.PARENT_FOLDER)));
+            int parentFolderDatabaseId = bookmarksDatabaseHelper.getFolderDatabaseId(folderCursor.getString(folderCursor.getColumnIndex(BookmarksDatabaseHelper.PARENT_FOLDER)));
 
             // Initialize `parentFolderPosition` and the iteration variable.
             int parentFolderPosition = 0;
@@ -258,7 +247,7 @@ public class EditBookmarkFolderDatabaseViewDialog extends AppCompatDialogFragmen
 
             // Find the parent folder position in folders `ResourceCursorAdapter`.
             do {
-                if (foldersCursorAdapter.getItemId(i) == folderDatabaseId) {
+                if (foldersCursorAdapter.getItemId(i) == parentFolderDatabaseId) {
                     // Store the current position for the parent folder.
                     parentFolderPosition = i;
                 } else {
index 8f41bfc..0ef29c7 100644 (file)
@@ -47,25 +47,20 @@ import com.stoutner.privacybrowser.activities.MainWebViewActivity;
 import com.stoutner.privacybrowser.helpers.BookmarksDatabaseHelper;
 
 public class EditBookmarkFolderDialog extends AppCompatDialogFragment {
+    // Instantiate the class variable.
+    private EditBookmarkFolderListener editBookmarkFolderListener;
+
     // The public interface is used to send information back to the parent activity.
     public interface EditBookmarkFolderListener {
         void onSaveBookmarkFolder(AppCompatDialogFragment dialogFragment, int selectedFolderDatabaseId);
     }
 
-    // Instantiate the class variables.
-    private EditBookmarkFolderListener editBookmarkFolderListener;
-    private int selectedFolderDatabaseId;
-
     public void onAttach(Context context) {
         // Run the default commands.
         super.onAttach(context);
 
-        // Get a handle for `EditFolderListener` from `parentActivity`.
-        try {
-            editBookmarkFolderListener = (EditBookmarkFolderListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement EditBookmarkFolderListener.");
-        }
+        // Get a handle for `EditFolderListener` from the launching context.
+        editBookmarkFolderListener = (EditBookmarkFolderListener) context;
     }
 
     // Store the database ID in the arguments bundle.
@@ -84,23 +79,17 @@ public class EditBookmarkFolderDialog extends AppCompatDialogFragment {
         return editBookmarkFolderDialog;
     }
 
+    // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
+    @SuppressLint("InflateParams")
     @Override
-    public void onCreate(Bundle savedInstanceState) {
-        // Run the default commands.
-        super.onCreate(savedInstanceState);
-
+    @NonNull
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
         // Remove the incorrect lint warning that `getInt()` might be null.
         assert getArguments() != null;
 
         // Store the folder database ID in the class variable.
-        selectedFolderDatabaseId = getArguments().getInt("Database ID");
-    }
+        int selectedFolderDatabaseId = getArguments().getInt("Database ID");
 
-    // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
-    @SuppressLint("InflateParams")
-    @Override
-    @NonNull
-    public Dialog onCreateDialog(Bundle savedInstanceState) {
         // Initialize the database helper.  The two `nulls` do not specify the database name or a `CursorFactory`.  The `0` specifies a database version, but that is ignored and set instead using a constant in `BookmarksDatabaseHelper`.
         final BookmarksDatabaseHelper bookmarksDatabaseHelper = new BookmarksDatabaseHelper(getContext(), null, null, 0);
 
index 6110ed5..46af64e 100644 (file)
@@ -42,34 +42,8 @@ import com.stoutner.privacybrowser.R;
 import com.stoutner.privacybrowser.activities.MainWebViewActivity;
 
 public class HttpAuthenticationDialog extends AppCompatDialogFragment{
-
-    // The private variables are used in `onCreate()` and `onCreateDialog()`.
-    private String httpAuthHost;
-    private String httpAuthRealm;
-
-    public static HttpAuthenticationDialog displayDialog(String host, String realm) {
-        // Store the strings in a `Bundle`.
-        Bundle argumentsBundle = new Bundle();
-        argumentsBundle.putString("Host", host);
-        argumentsBundle.putString("Realm", realm);
-
-        // Add `argumentsBundle` to this instance of `HttpAuthenticationDialog`.
-        HttpAuthenticationDialog thisHttpAuthenticationDialog = new HttpAuthenticationDialog();
-        thisHttpAuthenticationDialog.setArguments(argumentsBundle);
-        return thisHttpAuthenticationDialog;
-    }
-
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // Remove the incorrect lint warnings that `getString()` might be null.
-        assert getArguments() != null;
-
-        // Save the host and realm in class variables.
-        httpAuthHost = getArguments().getString("Host");
-        httpAuthRealm = getArguments().getString("Realm");
-    }
+    // `httpAuthenticationListener` is used in `onAttach()` and `onCreateDialog()`
+    private HttpAuthenticationListener httpAuthenticationListener;
 
     // The public interface is used to send information back to the parent activity.
     public interface HttpAuthenticationListener {
@@ -78,18 +52,23 @@ public class HttpAuthenticationDialog extends AppCompatDialogFragment{
         void onHttpAuthenticationProceed(AppCompatDialogFragment dialogFragment);
     }
 
-    // `httpAuthenticationListener` is used in `onAttach()` and `onCreateDialog()`
-    private HttpAuthenticationListener httpAuthenticationListener;
-
     public void onAttach(Context context) {
         super.onAttach(context);
 
         // Get a handle for `httpAuthenticationListener` from `context`.
-        try {
-            httpAuthenticationListener = (HttpAuthenticationListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement `HttpAuthenticationListener`.");
-        }
+        httpAuthenticationListener = (HttpAuthenticationListener) context;
+    }
+
+    public static HttpAuthenticationDialog displayDialog(String host, String realm) {
+        // Store the strings in a `Bundle`.
+        Bundle argumentsBundle = new Bundle();
+        argumentsBundle.putString("Host", host);
+        argumentsBundle.putString("Realm", realm);
+
+        // Add `argumentsBundle` to this instance of `HttpAuthenticationDialog`.
+        HttpAuthenticationDialog thisHttpAuthenticationDialog = new HttpAuthenticationDialog();
+        thisHttpAuthenticationDialog.setArguments(argumentsBundle);
+        return thisHttpAuthenticationDialog;
     }
 
     // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
@@ -97,6 +76,13 @@ public class HttpAuthenticationDialog extends AppCompatDialogFragment{
     @Override
     @NonNull
     public Dialog onCreateDialog(Bundle savedInstanceState) {
+        // Remove the incorrect lint warnings that `getString()` might be null.
+        assert getArguments() != null;
+
+        // Get the host and realm variables from the bundle.
+        String httpAuthHost = getArguments().getString("Host");
+        String httpAuthRealm = getArguments().getString("Realm");
+
         // Remove the incorrect lint warning that `getActivity()` might be null.
         assert getActivity() != null;
 
index 2dfda36..2bbd4e6 100644 (file)
@@ -55,7 +55,8 @@ import com.stoutner.privacybrowser.helpers.BookmarksDatabaseHelper;
 import java.io.ByteArrayOutputStream;
 
 public class MoveToFolderDialog extends AppCompatDialogFragment {
-    // Instantiate class variables.
+    // Instantiate the class variables.
+    private MoveToFolderListener moveToFolderListener;
     private BookmarksDatabaseHelper bookmarksDatabaseHelper;
     private StringBuilder exceptFolders;
 
@@ -64,18 +65,12 @@ public class MoveToFolderDialog extends AppCompatDialogFragment {
         void onMoveToFolder(AppCompatDialogFragment dialogFragment);
     }
 
-    // `moveToFolderListener` is used in `onAttach()` and `onCreateDialog`.
-    private MoveToFolderListener moveToFolderListener;
-
     public void onAttach(Context context) {
+        // Run the default commands.
         super.onAttach(context);
 
-        // Get a handle for `MoveToFolderListener` from `parentActivity`.
-        try {
-            moveToFolderListener = (MoveToFolderListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement EditBookmarkFolderListener.");
-        }
+        // Get a handle for `MoveToFolderListener` from the launching context.
+        moveToFolderListener = (MoveToFolderListener) context;
     }
 
     // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
index 6796b50..7404708 100644 (file)
@@ -49,10 +49,9 @@ import java.text.DateFormat;
 import java.util.Date;
 
 public class PinnedSslCertificateMismatchDialog extends AppCompatDialogFragment {
-    // `layoutInflater` is used in `onCreateDialog()` and `pagerAdapter`.
+    // Instantiate the class variables.
+    private PinnedSslCertificateMismatchListener pinnedSslCertificateMismatchListener;
     private LayoutInflater layoutInflater;
-
-    // The current website SSL certificate variables are used in `onCreateDialog()` and `pagerAdapter()`.
     private String currentSslIssuedToCNameString;
     private String currentSslIssuedToONameString;
     private String currentSslIssuedToUNameString;
@@ -69,18 +68,13 @@ public class PinnedSslCertificateMismatchDialog extends AppCompatDialogFragment
         void onSslMismatchProceed();
     }
 
-    // `sslCertificateErrorListener` is used in `onAttach` and `onCreateDialog`.
-    private PinnedSslCertificateMismatchDialog.PinnedSslCertificateMismatchListener pinnedSslCertificateMismatchListener;
-
     // Check to make sure that the parent activity implements the listener.
     public void onAttach(Context context) {
+        // Run the default commands.
         super.onAttach(context);
 
-        try {
-            pinnedSslCertificateMismatchListener = (PinnedSslCertificateMismatchDialog.PinnedSslCertificateMismatchListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement PinnedSslCertificateMismatchListener");
-        }
+        // Get a handle for `PinnedSslCertificateMismatchListener` from the launching context.
+        pinnedSslCertificateMismatchListener = (PinnedSslCertificateMismatchListener) context;
     }
 
     // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
index 8bde8de..0c93025 100644 (file)
@@ -44,18 +44,23 @@ import java.text.DateFormat;
 import java.util.Date;
 
 public class SslCertificateErrorDialog extends AppCompatDialogFragment {
+    // `sslCertificateErrorListener` is used in `onAttach` and `onCreateDialog`.
+    private SslCertificateErrorListener sslCertificateErrorListener;
+
+    // The public interface is used to send information back to the parent activity.
+    public interface SslCertificateErrorListener {
+        void onSslErrorCancel();
+
+        void onSslErrorProceed();
+    }
+
+    public void onAttach(Context context) {
+        // Run the default commands.
+        super.onAttach(context);
 
-    // The private variables are used in `onCreate()` and `onCreateDialog()`.
-    private int primaryErrorInt;
-    private String urlWithError;
-    private String issuedToCName;
-    private String issuedToOName;
-    private String issuedToUName;
-    private String issuedByCName;
-    private String issuedByOName;
-    private String issuedByUName;
-    private String startDate;
-    private String endDate;
+        // Get a handle for `SslCertificateErrorListener` from the launching context.
+        sslCertificateErrorListener = (SslCertificateErrorListener) context;
+    }
 
     public static SslCertificateErrorDialog displayDialog(SslError error) {
         // Get the various components of the SSL error message.
@@ -90,53 +95,27 @@ public class SslCertificateErrorDialog extends AppCompatDialogFragment {
         return thisSslCertificateErrorDialog;
     }
 
-    @Override
-    public void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-
-        // Remove the incorrect lint warning that `getArguments()` might be null.
-        assert getArguments() != null;
-
-        // Save the components of the SSL error message in class variables.
-        primaryErrorInt = getArguments().getInt("PrimaryErrorInt");
-        urlWithError = getArguments().getString("UrlWithError");
-        issuedToCName = getArguments().getString("IssuedToCName");
-        issuedToOName = getArguments().getString("IssuedToOName");
-        issuedToUName = getArguments().getString("IssuedToUName");
-        issuedByCName = getArguments().getString("IssuedByCName");
-        issuedByOName = getArguments().getString("IssuedByOName");
-        issuedByUName = getArguments().getString("IssuedByUName");
-        startDate = getArguments().getString("StartDate");
-        endDate = getArguments().getString("EndDate");
-    }
-
-    // The public interface is used to send information back to the parent activity.
-    public interface SslCertificateErrorListener {
-        void onSslErrorCancel();
-
-        void onSslErrorProceed();
-    }
-
-    // `sslCertificateErrorListener` is used in `onAttach` and `onCreateDialog`.
-    private SslCertificateErrorListener sslCertificateErrorListener;
-
-    // Check to make sure that the parent activity implements the listener.
-    public void onAttach(Context context) {
-        super.onAttach(context);
-
-        try {
-            sslCertificateErrorListener = (SslCertificateErrorListener) context;
-        } catch(ClassCastException exception) {
-            throw new ClassCastException(context.toString() + " must implement SslCertificateErrorListener");
-        }
-    }
-
     // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
     @SuppressLint("InflateParams")
     @SuppressWarnings("deprecation")
     @Override
     @NonNull
     public Dialog onCreateDialog(Bundle savedInstanceState) {
+        // Remove the incorrect lint warning that `getArguments()` might be null.
+        assert getArguments() != null;
+
+        // Get the components of the SSL error message from the bundle.
+        int primaryErrorInt = getArguments().getInt("PrimaryErrorInt");
+        String urlWithError = getArguments().getString("UrlWithError");
+        String issuedToCName = getArguments().getString("IssuedToCName");
+        String issuedToOName = getArguments().getString("IssuedToOName");
+        String issuedToUName = getArguments().getString("IssuedToUName");
+        String issuedByCName = getArguments().getString("IssuedByCName");
+        String issuedByOName = getArguments().getString("IssuedByOName");
+        String issuedByUName = getArguments().getString("IssuedByUName");
+        String startDate = getArguments().getString("StartDate");
+        String endDate = getArguments().getString("EndDate");
+
         // Remove the incorrect lint warning that `getActivity()` might be null.
         assert getActivity() != null;
 
index 0093810..9b9d9f6 100644 (file)
@@ -31,7 +31,8 @@ import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.support.annotation.NonNull;
 import android.support.v4.content.ContextCompat;
-// We have to use `AppCompatDialogFragment` instead of `DialogFragment` or an error is produced on API <= 22.  `android.support.v7.app.AlertDialog` also uses more of the horizontal screen real estate versus `android.app.AlertDialog's` smaller width.
+// `AppCompatDialogFragment` must be used instead of `DialogFragment` or an error is produced on API <= 22.
+// `android.support.v7.app.AlertDialog` also uses more of the horizontal screen real estate versus `android.app.AlertDialog's` smaller width.
 import android.support.v7.app.AppCompatDialogFragment;
 import android.util.Base64;
 import android.view.LayoutInflater;
@@ -239,7 +240,7 @@ public class UrlHistoryDialog extends AppCompatDialogFragment{
         alertDialog.show();
 
         // Instantiate a `HistoryArrayAdapter`.
-        final HistoryArrayAdapter historyArrayAdapter = new HistoryArrayAdapter(getContext(), historyArrayList, currentPageId);
+        HistoryArrayAdapter historyArrayAdapter = new HistoryArrayAdapter(getContext(), historyArrayList, currentPageId);
 
         // Get a handle for the list view.
         ListView listView = alertDialog.findViewById(R.id.history_listview);
@@ -249,7 +250,7 @@ public class UrlHistoryDialog extends AppCompatDialogFragment{
 
         // Listen for clicks on entries in the list view.
         listView.setOnItemClickListener((AdapterView<?> parent, View view, int position, long id) -> {
-            // Convert the `long` `id` to an `int`.
+            // Convert the long ID to an int.
             int itemId = (int) id;
 
             // Only consume the click if it is not on the `currentPageId`.
diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewRequestDialog.java b/app/src/main/java/com/stoutner/privacybrowser/dialogs/ViewRequestDialog.java
new file mode 100644 (file)
index 0000000..45bdbab
--- /dev/null
@@ -0,0 +1,310 @@
+/*
+ * Copyright © 2018 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
+ *
+ * Privacy Browser is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Privacy Browser is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package com.stoutner.privacybrowser.dialogs;
+
+import android.annotation.SuppressLint;
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.v7.app.AppCompatDialogFragment;
+import android.view.View;
+import android.view.WindowManager;
+import android.widget.Button;
+import android.widget.TextView;
+
+import com.stoutner.privacybrowser.R;
+import com.stoutner.privacybrowser.activities.MainWebViewActivity;
+
+public class ViewRequestDialog extends AppCompatDialogFragment {
+    // The public interface is used to send information back to the parent activity.
+    public interface ViewRequestListener {
+        void onPrevious(int id);
+
+        void onNext(int id);
+    }
+
+    // `viewRequestListener` is used in `onAttach()` and `onCreateDialog()`.
+    private ViewRequestListener viewRequestListener;
+
+    public void onAttach(Context context) {
+        // Run the default commands.
+        super.onAttach(context);
+
+        // Get a handle for the listener from the launching context.
+        viewRequestListener = (ViewRequestListener) context;
+    }
+
+    public static ViewRequestDialog request(int id, boolean isLastRequest, String[] requestDetails) {
+        // Create a bundle.
+        Bundle bundle = new Bundle();
+
+        // Store the request details.
+        bundle.putInt("ID", id);
+        bundle.putBoolean("Is Last Request", isLastRequest);
+        bundle.putStringArray("Request Details", requestDetails);
+
+        // Add the bundle to the dialog.
+        ViewRequestDialog viewRequestDialog = new ViewRequestDialog();
+        viewRequestDialog.setArguments(bundle);
+
+        // Return the new dialog.
+        return viewRequestDialog;
+    }
+
+    @Override
+    @NonNull
+    // `@SuppressLing("InflateParams")` removes the warning about using `null` as the parent view group when inflating the `AlertDialog`.
+    @SuppressLint("InflateParams")
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
+        // Remove the incorrect lint warning that `getInt()` might be null.
+        assert getArguments() != null;
+
+        // Get the info from the bundle.
+        int id = getArguments().getInt("ID");
+        boolean isLastRequest = getArguments().getBoolean("Is Last Request");
+        String[] requestDetails = getArguments().getStringArray("Request Details");
+
+        // Use an alert dialog builder to create the alert dialog.
+        AlertDialog.Builder dialogBuilder;
+
+        // Set the style and icon according to the theme.
+        if (MainWebViewActivity.darkTheme) {
+            dialogBuilder = new AlertDialog.Builder(getActivity(), R.style.PrivacyBrowserAlertDialogDark);
+            dialogBuilder.setIcon(R.drawable.block_ads_enabled_dark);
+        } else {
+            dialogBuilder = new AlertDialog.Builder(getActivity(), R.style.PrivacyBrowserAlertDialogLight);
+            dialogBuilder.setIcon(R.drawable.block_ads_enabled_light);
+        }
+
+        // Create the dialog title.
+        String title = getResources().getString(R.string.request_details) + " - " + id;
+
+        // Set the title.
+        dialogBuilder.setTitle(title);
+
+        // Remove the incorrect lint warnings about items being null.
+        assert requestDetails != null;
+        assert getActivity() != null;
+
+        // Set the view.  The parent view is null because it will be assigned by the alert dialog.
+        dialogBuilder.setView(getActivity().getLayoutInflater().inflate(R.layout.view_request_dialog, null));
+
+        // Set the close button.
+        dialogBuilder.setNeutralButton(R.string.close, (DialogInterface dialog, int which) -> {
+            // Do nothing.  The dialog will close automatically.
+        });
+
+        // Set the previous button.
+        dialogBuilder.setNegativeButton(R.string.previous, (DialogInterface dialog, int which) -> {
+            // Load the previous request.
+            viewRequestListener.onPrevious(id);
+        });
+
+        // Set the next button.
+        dialogBuilder.setPositiveButton(R.string.next, (DialogInterface dialog, int which) -> {
+            // Load the next request.
+            viewRequestListener.onNext(id);
+        });
+
+        // Create an alert dialog from the alert dialog builder.
+        final AlertDialog alertDialog = dialogBuilder.create();
+
+        // Disable screenshots if not allowed.
+        if (!MainWebViewActivity.allowScreenshots) {
+            // Remove the warning below that `getWindow()` might be null.
+            assert alertDialog.getWindow() != null;
+
+            // Disable screenshots.
+            alertDialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
+        }
+
+        //The alert dialog must be shown before the contents can be modified.
+        alertDialog.show();
+
+        // Get handles for the dialog views.
+        TextView requestAction = alertDialog.findViewById(R.id.request_action);
+        TextView requestUrl = alertDialog.findViewById(R.id.request_url);
+        TextView requestBlockListLabel = alertDialog.findViewById(R.id.request_blocklist_label);
+        TextView requestBlockList = alertDialog.findViewById(R.id.request_blocklist);
+        TextView requestSubListLabel = alertDialog.findViewById(R.id.request_sublist_label);
+        TextView requestSubList = alertDialog.findViewById(R.id.request_sublist);
+        TextView requestBlockListEntriesLabel = alertDialog.findViewById(R.id.request_blocklist_entries_label);
+        TextView requestBlockListEntries = alertDialog.findViewById(R.id.request_blocklist_entries);
+        TextView requestBlockListOriginalEntryLabel = alertDialog.findViewById(R.id.request_blocklist_original_entry_label);
+        TextView requestBlockListOriginalEntry = alertDialog.findViewById(R.id.request_blocklist_original_entry);
+        Button previousButton = alertDialog.getButton(DialogInterface.BUTTON_NEGATIVE);
+        Button nextButton = alertDialog.getButton(DialogInterface.BUTTON_POSITIVE);
+
+        // Disable the previous button if the first resource request is displayed.
+        previousButton.setEnabled(!(id == 1));
+
+        // Disable the next button if the last resource request is displayed.
+        nextButton.setEnabled(!isLastRequest);
+
+        // Set the request action text.
+        switch (Integer.valueOf(requestDetails[MainWebViewActivity.REQUEST_DISPOSITION])) {
+            case MainWebViewActivity.REQUEST_DEFAULT:
+                // Set the text.
+                requestAction.setText(R.string.default_allowed);
+
+                // Set the background color.
+                requestAction.setBackgroundColor(getResources().getColor(R.color.transparent));
+                break;
+
+            case MainWebViewActivity.REQUEST_ALLOWED:
+                // Set the text.
+                requestAction.setText(R.string.allowed);
+
+                // Set the background color.
+                if (MainWebViewActivity.darkTheme) {
+                    requestAction.setBackgroundColor(getResources().getColor(R.color.blue_700_50));
+                } else {
+                    requestAction.setBackgroundColor(getResources().getColor(R.color.blue_100));
+                }
+                break;
+
+            case MainWebViewActivity.REQUEST_BLOCKED:
+                // Set the text.
+                requestAction.setText(R.string.blocked);
+
+                // Set the background color.
+                if (MainWebViewActivity.darkTheme) {
+                    requestAction.setBackgroundColor(getResources().getColor(R.color.red_700_50));
+                } else {
+                    requestAction.setBackgroundColor(getResources().getColor(R.color.red_100));
+                }
+                break;
+        }
+
+        // Display the request URL.
+        requestUrl.setText(requestDetails[MainWebViewActivity.REQUEST_URL]);
+
+        // Modify the dialog based on the request action.
+        if (requestDetails.length == 2) {  // A default request.
+            // Hide the unused views.
+            requestBlockListLabel.setVisibility(View.GONE);
+            requestBlockList.setVisibility(View.GONE);
+            requestSubListLabel.setVisibility(View.GONE);
+            requestSubList.setVisibility(View.GONE);
+            requestBlockListEntriesLabel.setVisibility(View.GONE);
+            requestBlockListEntries.setVisibility(View.GONE);
+            requestBlockListOriginalEntryLabel.setVisibility(View.GONE);
+            requestBlockListOriginalEntry.setVisibility(View.GONE);
+        } else {  // A blocked or allowed request.
+            // Set the text on the text views.
+            requestBlockList.setText(requestDetails[MainWebViewActivity.REQUEST_BLOCKLIST]);
+            requestBlockListEntries.setText(requestDetails[MainWebViewActivity.REQUEST_BLOCKLIST_ENTRIES]);
+            requestBlockListOriginalEntry.setText(requestDetails[MainWebViewActivity.REQUEST_BLOCKLIST_ORIGINAL_ENTRY]);
+
+            // Set the sublist text.
+            switch (Integer.valueOf(requestDetails[MainWebViewActivity.REQUEST_SUBLIST])) {
+                case MainWebViewActivity.MAIN_WHITELIST:
+                    requestSubList.setText(R.string.main_whitelist);
+                    break;
+
+                case MainWebViewActivity.FINAL_WHITELIST:
+                    requestSubList.setText(R.string.final_whitelist);
+                    break;
+
+                case MainWebViewActivity.DOMAIN_WHITELIST:
+                    requestSubList.setText(R.string.domain_whitelist);
+                    break;
+
+                case MainWebViewActivity.DOMAIN_INITIAL_WHITELIST:
+                    requestSubList.setText(R.string.domain_initial_whitelist);
+                    break;
+
+                case MainWebViewActivity.DOMAIN_FINAL_WHITELIST:
+                    requestSubList.setText(R.string.domain_final_whitelist);
+                    break;
+
+                case MainWebViewActivity.THIRD_PARTY_WHITELIST:
+                    requestSubList.setText(R.string.third_party_whiteist);
+                    break;
+
+                case MainWebViewActivity.THIRD_PARTY_DOMAIN_WHITELIST:
+                    requestSubList.setText(R.string.third_party_domain_whitelist);
+                    break;
+
+                case MainWebViewActivity.THIRD_PARTY_DOMAIN_INITIAL_WHITELIST:
+                    requestSubList.setText(R.string.third_party_domain_initial_whitelist);
+                    break;
+
+                case MainWebViewActivity.MAIN_BLACKLIST:
+                    requestSubList.setText(R.string.main_blacklist);
+                    break;
+
+                case MainWebViewActivity.INITIAL_BLACKLIST:
+                    requestSubList.setText(R.string.initial_blacklist);
+                    break;
+
+                case MainWebViewActivity.FINAL_BLACKLIST:
+                    requestSubList.setText(R.string.final_blacklist);
+                    break;
+
+                case MainWebViewActivity.DOMAIN_BLACKLIST:
+                    requestSubList.setText(R.string.domain_blacklist);
+                    break;
+
+                case MainWebViewActivity.DOMAIN_INITIAL_BLACKLIST:
+                    requestSubList.setText(R.string.domain_initial_blacklist);
+                    break;
+
+                case MainWebViewActivity.DOMAIN_FINAL_BLACKLIST:
+                    requestSubList.setText(R.string.domain_final_blacklist);
+                    break;
+
+                case MainWebViewActivity.DOMAIN_REGULAR_EXPRESSION_BLACKLIST:
+                    requestSubList.setText(R.string.domain_regular_expression_blacklist);
+                    break;
+
+                case MainWebViewActivity.THIRD_PARTY_BLACKLIST:
+                    requestSubList.setText(R.string.third_party_blacklist);
+                    break;
+
+                case MainWebViewActivity.THIRD_PARTY_DOMAIN_BLACKLIST:
+                    requestSubList.setText(R.string.third_party_domain_blacklist);
+                    break;
+
+                case MainWebViewActivity.THIRD_PARTY_DOMAIN_INITIAL_BLACKLIST:
+                    requestSubList.setText(R.string.third_party_domain_initial_blacklist);
+                    break;
+
+                case MainWebViewActivity.THIRD_PARTY_REGULAR_EXPRESSION_BLACKLIST:
+                    requestSubList.setText(R.string.third_party_regular_expression_blacklist);
+                    break;
+
+                case MainWebViewActivity.THIRD_PARTY_DOMAIN_REGULAR_EXPRESSION_BLACKLIST:
+                    requestSubList.setText(R.string.third_party_domain_regular_expression_blacklist);
+                    break;
+
+                case MainWebViewActivity.REGULAR_EXPRESSION_BLACKLIST:
+                    requestSubList.setText(R.string.regular_expression_blacklist);
+                    break;
+            }
+        }
+
+        // `onCreateDialog` requires the return of an alert dialog.
+        return alertDialog;
+    }
+}
index ec449a5..55ad050 100644 (file)
@@ -21,46 +21,46 @@ package com.stoutner.privacybrowser.helpers;
 
 import android.content.res.AssetManager;
 import android.net.Uri;
-import android.util.Log;
+
+import com.stoutner.privacybrowser.activities.MainWebViewActivity;
 
 import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.util.ArrayList;
-import java.util.LinkedList;
 import java.util.List;
 import java.util.regex.Pattern;
 
 public class BlockListHelper {
     public ArrayList<List<String[]>> parseBlockList(AssetManager assets, String blockListName) {
         // Initialize the header list.
-        List<String[]> headers = new ArrayList<>();
+        List<String[]> headers = new ArrayList<>();  // 0.
 
         // Initialize the white lists.
-        List<String[]> mainWhiteList = new ArrayList<>();
-        List<String[]> finalWhiteList = new ArrayList<>();
-        List<String[]> domainWhiteList = new ArrayList<>();
-        List<String[]> domainInitialWhiteList = new ArrayList<>();
-        List<String[]> domainFinalWhiteList = new ArrayList<>();
-        List<String[]> thirdPartyWhiteList = new ArrayList<>();
-        List<String[]> thirdPartyDomainWhiteList = new ArrayList<>();
-        List<String[]> thirdPartyDomainInitialWhiteList = new ArrayList<>();
+        List<String[]> mainWhiteList = new ArrayList<>();  // 1.
+        List<String[]> finalWhiteList = new ArrayList<>();  // 2.
+        List<String[]> domainWhiteList = new ArrayList<>();  // 3.
+        List<String[]> domainInitialWhiteList = new ArrayList<>();  // 4.
+        List<String[]> domainFinalWhiteList = new ArrayList<>();  // 5.
+        List<String[]> thirdPartyWhiteList = new ArrayList<>();  // 6.
+        List<String[]> thirdPartyDomainWhiteList = new ArrayList<>();  // 7.
+        List<String[]> thirdPartyDomainInitialWhiteList = new ArrayList<>();  // 8.
 
         // Initialize the black lists
-        List<String[]> mainBlackList = new ArrayList<>();
-        List<String[]> initialBlackList = new ArrayList<>();
-        List<String[]> finalBlackList = new ArrayList<>();
-        List<String[]> domainBlackList = new ArrayList<>();
-        List<String[]> domainInitialBlackList = new ArrayList<>();
-        List<String[]> domainFinalBlackList = new ArrayList<>();
-        List<String[]> thirdPartyBlackList = new ArrayList<>();
-        List<String[]> thirdPartyInitialBlackList = new ArrayList<>();
-        List<String[]> thirdPartyDomainBlackList = new ArrayList<>();
-        List<String[]> thirdPartyDomainInitialBlackList = new ArrayList<>();
-        List<String[]> regularExpressionBlackList = new ArrayList<>();
-        List<String[]> domainRegularExpressionBlackList = new ArrayList<>();
-        List<String[]> thirdPartyRegularExpressionBlackList = new ArrayList<>();
-        List<String[]> thirdPartyDomainRegularExpressionBlackList = new ArrayList<>();
+        List<String[]> mainBlackList = new ArrayList<>();  // 9.
+        List<String[]> initialBlackList = new ArrayList<>();  // 10.
+        List<String[]> finalBlackList = new ArrayList<>();  // 11.
+        List<String[]> domainBlackList = new ArrayList<>();  // 12.
+        List<String[]> domainInitialBlackList = new ArrayList<>();  // 13.
+        List<String[]> domainFinalBlackList = new ArrayList<>();  // 14.
+        List<String[]> domainRegularExpressionBlackList = new ArrayList<>();  // 15.
+        List<String[]> thirdPartyBlackList = new ArrayList<>();  // 16.
+        List<String[]> thirdPartyInitialBlackList = new ArrayList<>();  // 17.
+        List<String[]> thirdPartyDomainBlackList = new ArrayList<>();  // 18.
+        List<String[]> thirdPartyDomainInitialBlackList = new ArrayList<>();  // 19.
+        List<String[]> regularExpressionBlackList = new ArrayList<>();  // 20.
+        List<String[]> thirdPartyRegularExpressionBlackList = new ArrayList<>();  // 21.
+        List<String[]> thirdPartyDomainRegularExpressionBlackList = new ArrayList<>();  // 22.
 
 
         // Populate the block lists.  The `try` is required by `InputStreamReader`.
@@ -73,6 +73,7 @@ public class BlockListHelper {
 
             // Parse the block list.
             while ((blockListEntry = bufferedReader.readLine()) != null) {
+                // Store the original block list entry.
                 String originalBlockListEntry = blockListEntry;
 
                 // Remove any `^` from the block list entry.  Privacy Browser does not process them in the interest of efficiency.
@@ -163,7 +164,7 @@ public class BlockListHelper {
                                                 String secondEntry = entry.substring(wildcardIndex + 1);
 
                                                 // Create an entry string array.
-                                                String[] domainDoubleEntry = {domain, firstEntry, secondEntry};
+                                                String[] domainDoubleEntry = {domain, firstEntry, secondEntry, originalBlockListEntry};
 
                                                 // Add the entry to the white list.
                                                 thirdPartyDomainInitialWhiteList.add(domainDoubleEntry);
@@ -172,7 +173,7 @@ public class BlockListHelper {
                                                 //        "  -  " + originalBlockListEntry);
                                             } else {  // Process a third-party domain initial white list single entry.
                                                 // Create a domain entry string array.
-                                                String[] domainEntry = {domain, entry};
+                                                String[] domainEntry = {domain, entry, originalBlockListEntry};
 
                                                 // Add the entry to the third party domain initial white list.
                                                 thirdPartyDomainInitialWhiteList.add(domainEntry);
@@ -211,7 +212,7 @@ public class BlockListHelper {
                                             String secondEntry = entry.substring(wildcardIndex + 1);
 
                                             // Create an entry string array.
-                                            String[] domainDoubleEntry = {domain, firstEntry, secondEntry};
+                                            String[] domainDoubleEntry = {domain, firstEntry, secondEntry, originalBlockListEntry};
 
                                             // Add the entry to the white list.
                                             thirdPartyDomainWhiteList.add(domainDoubleEntry);
@@ -220,7 +221,7 @@ public class BlockListHelper {
                                             //        originalBlockListEntry);
                                         } else {  // Process a third-party domain single entry.
                                             // Create an entry string array.
-                                            String[] domainEntry = {domain, entry};
+                                            String[] domainEntry = {domain, entry, originalBlockListEntry};
 
                                             // Add the entry to the white list.
                                             thirdPartyDomainWhiteList.add(domainEntry);
@@ -266,7 +267,7 @@ public class BlockListHelper {
                                                 String fifthEntry = fourthEntry.substring(fourthWildcardIndex + 1);
 
                                                 // Create an entry string array.
-                                                String[] quintupleEntry = {firstEntry, realSecondEntry, realThirdEntry, realFourthEntry, fifthEntry};
+                                                String[] quintupleEntry = {firstEntry, realSecondEntry, realThirdEntry, realFourthEntry, fifthEntry, originalBlockListEntry};
 
                                                 // Add the entry to the white list.
                                                 thirdPartyWhiteList.add(quintupleEntry);
@@ -275,7 +276,7 @@ public class BlockListHelper {
                                                 //        realFourthEntry + " , " + fifthEntry + "  -  " + originalBlockListEntry);
                                             } else {  // Process a third-party white list quadruple entry.
                                                 // Create an entry string array.
-                                                String[] quadrupleEntry = {firstEntry, realSecondEntry, realThirdEntry, fourthEntry};
+                                                String[] quadrupleEntry = {firstEntry, realSecondEntry, realThirdEntry, fourthEntry, originalBlockListEntry};
 
                                                 // Add the entry to the white list.
                                                 thirdPartyWhiteList.add(quadrupleEntry);
@@ -285,7 +286,7 @@ public class BlockListHelper {
                                             }
                                         } else {  // Process a third-party white list triple entry.
                                             // Create an entry string array.
-                                            String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry};
+                                            String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry, originalBlockListEntry};
 
                                             // Add the entry to the white list.
                                             thirdPartyWhiteList.add(tripleEntry);
@@ -295,7 +296,7 @@ public class BlockListHelper {
                                         }
                                     } else {  // Process a third-party white list double entry.
                                         // Create an entry string array.
-                                        String[] doubleEntry = {firstEntry, secondEntry};
+                                        String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                                         // Add the entry to the white list.
                                         thirdPartyWhiteList.add(doubleEntry);
@@ -304,7 +305,7 @@ public class BlockListHelper {
                                     }
                                 } else {  // Process a third-party white list single entry.
                                     // Create an entry string array.
-                                    String[] singleEntry = {entry};
+                                    String[] singleEntry = {entry, originalBlockListEntry};
 
                                     // Add the entry to the white list.
                                     thirdPartyWhiteList.add(singleEntry);
@@ -360,7 +361,7 @@ public class BlockListHelper {
                                                 String thirdEntry = secondEntry.substring(secondWildcardIndex + 1);
 
                                                 // Create an entry string array.
-                                                String[] domainTripleEntry = {domain, firstEntry, realSecondEntry, thirdEntry};
+                                                String[] domainTripleEntry = {domain, firstEntry, realSecondEntry, thirdEntry, originalBlockListEntry};
 
                                                 // Add the entry to the white list.
                                                 domainInitialWhiteList.add(domainTripleEntry);
@@ -369,7 +370,7 @@ public class BlockListHelper {
                                                 //        thirdEntry + "  -  " + originalBlockListEntry);
                                             } else {  // Process a domain initial double entry.
                                                 // Create an entry string array.
-                                                String[] domainDoubleEntry = {domain, firstEntry, secondEntry};
+                                                String[] domainDoubleEntry = {domain, firstEntry, secondEntry, originalBlockListEntry};
 
                                                 // Add the entry to the white list.
                                                 domainInitialWhiteList.add(domainDoubleEntry);
@@ -379,7 +380,7 @@ public class BlockListHelper {
                                             }
                                         } else {  // Process a domain initial single entry.
                                             // Create an entry string array.
-                                            String[] domainEntry = {domain, entry};
+                                            String[] domainEntry = {domain, entry, originalBlockListEntry};
 
                                             // Add the entry to the white list.
                                             domainInitialWhiteList.add(domainEntry);
@@ -416,7 +417,7 @@ public class BlockListHelper {
                                         String secondEntry = entry.substring(wildcardIndex + 1);
 
                                         // Create an entry string array.
-                                        String[] domainDoubleEntry = {domain, firstEntry, secondEntry};
+                                        String[] domainDoubleEntry = {domain, firstEntry, secondEntry, originalBlockListEntry};
 
                                         // Add the entry to the white list.
                                         domainFinalWhiteList.add(domainDoubleEntry);
@@ -425,7 +426,7 @@ public class BlockListHelper {
                                         //        originalBlockListEntry);
                                     } else {  // Process a domain final white list single entry.
                                         // create an entry string array.
-                                        String[] domainEntry = {domain, entry};
+                                        String[] domainEntry = {domain, entry, originalBlockListEntry};
 
                                         // Add the entry to the white list.
                                         domainFinalWhiteList.add(domainEntry);
@@ -481,7 +482,7 @@ public class BlockListHelper {
                                                     String fourthEntry = thirdEntry.substring(thirdWildcardIndex + 1);
 
                                                     // Create an entry string array.
-                                                    String[] domainQuadrupleEntry = {domain, firstEntry, realSecondEntry, realThirdEntry, fourthEntry};
+                                                    String[] domainQuadrupleEntry = {domain, firstEntry, realSecondEntry, realThirdEntry, fourthEntry, originalBlockListEntry};
 
                                                     // Add the entry to the white list.
                                                     domainWhiteList.add(domainQuadrupleEntry);
@@ -490,7 +491,7 @@ public class BlockListHelper {
                                                     //        realThirdEntry + " , " + fourthEntry + "  -  " + originalBlockListEntry);
                                                 } else {  // Process a domain white list triple entry.
                                                     // Create an entry string array.
-                                                    String[] domainTripleEntry = {domain, firstEntry, realSecondEntry, thirdEntry};
+                                                    String[] domainTripleEntry = {domain, firstEntry, realSecondEntry, thirdEntry, originalBlockListEntry};
 
                                                     // Add the entry to the white list.
                                                     domainWhiteList.add(domainTripleEntry);
@@ -500,7 +501,7 @@ public class BlockListHelper {
                                                 }
                                             } else {  // Process a domain white list double entry.
                                                 // Create an entry string array.
-                                                String[] domainDoubleEntry = {domain, firstEntry, secondEntry};
+                                                String[] domainDoubleEntry = {domain, firstEntry, secondEntry, originalBlockListEntry};
 
                                                 // Add the entry to the white list.
                                                 domainWhiteList.add(domainDoubleEntry);
@@ -510,7 +511,7 @@ public class BlockListHelper {
                                             }
                                         } else {  // Process a domain white list single entry.
                                             // Create an entry string array.
-                                            String[] domainEntry = {domain, entry};
+                                            String[] domainEntry = {domain, entry, originalBlockListEntry};
 
                                             // Add the entry to the white list.
                                             domainWhiteList.add(domainEntry);
@@ -534,7 +535,7 @@ public class BlockListHelper {
                             String secondEntry = entry.substring(wildcardIndex + 1);
 
                             // Create an entry string array.
-                            String[] doubleEntry = {firstEntry, secondEntry};
+                            String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                             // Add the entry to the white list.
                             finalWhiteList.add(doubleEntry);
@@ -542,7 +543,7 @@ public class BlockListHelper {
                             //Log.i("BlockLists", headers.get(1)[0] + " final white list added: " + firstEntry + " , " + secondEntry + "  -  " + originalBlockListEntry);
                         } else {  // Process a final white list single entry.
                             // Create an entry string array.
-                            String[] singleEntry = {entry};
+                            String[] singleEntry = {entry, originalBlockListEntry};
 
                             // Add the entry to the white list.
                             finalWhiteList.add(singleEntry);
@@ -567,7 +568,7 @@ public class BlockListHelper {
                                 String thirdEntry = secondEntry.substring(secondWildcardIndex + 1);
 
                                 // Create an entry string array.
-                                String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry};
+                                String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry, originalBlockListEntry};
 
                                 // Add the entry to the white list.
                                 mainWhiteList.add(tripleEntry);
@@ -575,7 +576,7 @@ public class BlockListHelper {
                                 //Log.i("BlockLists", headers.get(1)[0] + " main white list added: " + firstEntry + " , " + realSecondEntry + " , " + thirdEntry + "  -  " + originalBlockListEntry);
                             } else {  // Process a main white list double entry.
                                 // Create an entry string array.
-                                String[] doubleEntry = {firstEntry, secondEntry};
+                                String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                                 // Add the entry to the white list.
                                 mainWhiteList.add(doubleEntry);
@@ -584,7 +585,7 @@ public class BlockListHelper {
                             }
                         } else {  // Process a main white list single entry.
                             // Create an entry string array.
-                            String[] singleEntry = {blockListEntry};
+                            String[] singleEntry = {blockListEntry, originalBlockListEntry};
 
                             // Add the entry to the white list.
                             mainWhiteList.add(singleEntry);
@@ -610,7 +611,7 @@ public class BlockListHelper {
                         String secondEntry = entry.substring(wildcardIndex + 1);
 
                         // Create an entry string array.
-                        String[] doubleEntry = {firstEntry, secondEntry};
+                        String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                         // Add the entry to the black list.
                         finalBlackList.add(doubleEntry);
@@ -618,7 +619,7 @@ public class BlockListHelper {
                         //Log.i("BlockLists", headers.get(1)[0] + " final black list added: " + firstEntry + " , " + secondEntry + "  -  " + originalBlockListEntry);
                     } else {  // Process a final black list single entry.
                         // create an entry string array.
-                        String[] singleEntry = {entry};
+                        String[] singleEntry = {entry, originalBlockListEntry};
 
                         // Add the entry to the black list.
                         finalBlackList.add(singleEntry);
@@ -686,7 +687,7 @@ public class BlockListHelper {
                                                 String thirdEntry = secondEntry.substring(secondWildcardIndex + 1);
 
                                                 // Create an entry string array.
-                                                String[] tripleDomainEntry = {domain, firstEntry, realSecondEntry, thirdEntry};
+                                                String[] tripleDomainEntry = {domain, firstEntry, realSecondEntry, thirdEntry, originalBlockListEntry};
 
                                                 // Add the entry to the black list.
                                                 thirdPartyDomainInitialBlackList.add(tripleDomainEntry);
@@ -695,7 +696,7 @@ public class BlockListHelper {
                                                 //        " , " + thirdEntry + "  -  " + originalBlockListEntry);
                                             } else {  // Process a third-party domain initial black list double entry.
                                                 // Create an entry string array.
-                                                String[] doubleDomainEntry = {domain, firstEntry, secondEntry};
+                                                String[] doubleDomainEntry = {domain, firstEntry, secondEntry, originalBlockListEntry};
 
                                                 // Add the entry to the black list.
                                                 thirdPartyDomainInitialBlackList.add(doubleDomainEntry);
@@ -705,7 +706,7 @@ public class BlockListHelper {
                                             }
                                         } else {  // Process a third-party domain initial black list single entry.
                                             // Create an entry string array.
-                                            String[] singleEntry = {domain, entry};
+                                            String[] singleEntry = {domain, entry, originalBlockListEntry};
 
                                             // Add the entry to the black list.
                                             thirdPartyDomainInitialBlackList.add(singleEntry);
@@ -736,7 +737,7 @@ public class BlockListHelper {
                                     }
 
                                     // Create an entry string array.
-                                    String[] domainEntry = {domain, entry};
+                                    String[] domainEntry = {domain, entry, originalBlockListEntry};
 
                                     // Add the entry to the black list.
                                     thirdPartyDomainRegularExpressionBlackList.add(domainEntry);
@@ -789,7 +790,7 @@ public class BlockListHelper {
                                             String secondEntry = entry.substring(wildcardIndex + 1);
 
                                             // Create an entry string array.
-                                            String[] domainDoubleEntry = {domain, firstEntry, secondEntry};
+                                            String[] domainDoubleEntry = {domain, firstEntry, secondEntry, originalBlockListEntry};
 
                                             // Add the entry to the white list.
                                             thirdPartyDomainWhiteList.add(domainDoubleEntry);
@@ -798,7 +799,7 @@ public class BlockListHelper {
                                             //        originalBlockListEntry);
                                         } else {  // Process a third-party domain white list single entry.
                                             // Create an entry string array.
-                                            String[] domainEntry = {domain, entry};
+                                            String[] domainEntry = {domain, entry, originalBlockListEntry};
 
                                             // Add the entry to the white list.
                                             thirdPartyDomainWhiteList.add(domainEntry);
@@ -815,7 +816,7 @@ public class BlockListHelper {
                                             String secondEntry = entry.substring(wildcardIndex + 1);
 
                                             // Create an entry string array.
-                                            String[] domainDoubleEntry = {domain, firstEntry, secondEntry};
+                                            String[] domainDoubleEntry = {domain, firstEntry, secondEntry, originalBlockListEntry};
 
                                             // Add the entry to the black list
                                             thirdPartyDomainBlackList.add(domainDoubleEntry);
@@ -824,7 +825,7 @@ public class BlockListHelper {
                                             //        originalBlockListEntry);
                                         } else {  // Process a third-party domain black list single entry.
                                             // Create an entry string array.
-                                            String[] domainEntry = {domain, entry};
+                                            String[] domainEntry = {domain, entry, originalBlockListEntry};
 
                                             // Add the entry to the black list.
                                             thirdPartyDomainBlackList.add(domainEntry);
@@ -845,7 +846,7 @@ public class BlockListHelper {
                                         String secondEntry = entry.substring(wildcardIndex + 1);
 
                                         // Create an entry string array.
-                                        String[] doubleEntry = {firstEntry, secondEntry};
+                                        String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                                         // Add the entry to the black list.
                                         thirdPartyBlackList.add(doubleEntry);
@@ -853,7 +854,7 @@ public class BlockListHelper {
                                         //Log.i("BlockLists", headers.get(1)[0] + " third-party black list added: " + firstEntry + " , " + secondEntry + "  -  " + originalBlockListEntry);
                                     } else {  // Process a third-party black list single entry.
                                         // Create an entry string array.
-                                        String[] singleEntry = {entry};
+                                        String[] singleEntry = {entry, originalBlockListEntry};
 
                                         // Add an entry to the black list.
                                         thirdPartyBlackList.add(singleEntry);
@@ -878,7 +879,7 @@ public class BlockListHelper {
                                 String secondEntry = entry.substring(wildcardIndex + 1);
 
                                 // Create an entry string array.
-                                String[] thirdPartyDoubleEntry = {firstEntry, secondEntry};
+                                String[] thirdPartyDoubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                                 // Add the entry to the black list.
                                 thirdPartyInitialBlackList.add(thirdPartyDoubleEntry);
@@ -886,7 +887,7 @@ public class BlockListHelper {
                                 //Log.i("BlockLists", headers.get(1)[0] + " third-party initial black list added: " + firstEntry + " , " + secondEntry + "  -  " + originalBlockListEntry);
                             } else {  // Process a third-party initial black list single entry.
                                 // Create an entry string array.
-                                String[] singleEntry = {entry};
+                                String[] singleEntry = {entry, originalBlockListEntry};
 
                                 // Add the entry to the black list.
                                 thirdPartyInitialBlackList.add(singleEntry);
@@ -905,7 +906,7 @@ public class BlockListHelper {
                             }
 
                             // Create an entry string array.
-                            String[] singleEntry = {entry};
+                            String[] singleEntry = {entry, originalBlockListEntry};
 
                             // Add the entry to the black list.
                             thirdPartyRegularExpressionBlackList.add(singleEntry);
@@ -920,7 +921,7 @@ public class BlockListHelper {
                                 entry = entry.substring(0, entry.length() - 1);
 
                                 // Create an entry string array.
-                                String[] singleEntry = {entry};
+                                String[] singleEntry = {entry, originalBlockListEntry};
 
                                 // Add the entry to the black list.
                                 thirdPartyBlackList.add(singleEntry);
@@ -951,7 +952,7 @@ public class BlockListHelper {
                                         String fourthEntry = thirdEntry.substring(thirdWildcardIndex + 1);
 
                                         // Create an entry string array.
-                                        String[] quadrupleEntry = {firstEntry, realSecondEntry, realThirdEntry, fourthEntry};
+                                        String[] quadrupleEntry = {firstEntry, realSecondEntry, realThirdEntry, fourthEntry, originalBlockListEntry};
 
                                         // Add the entry to the black list.
                                         thirdPartyBlackList.add(quadrupleEntry);
@@ -960,7 +961,7 @@ public class BlockListHelper {
                                         //        fourthEntry + "  -  " + originalBlockListEntry);
                                     } else {  // Process a third-party black list triple entry.
                                         // Create an entry string array.
-                                        String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry};
+                                        String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry, originalBlockListEntry};
 
                                         // Add the entry to the black list.
                                         thirdPartyBlackList.add(tripleEntry);
@@ -970,7 +971,7 @@ public class BlockListHelper {
                                     }
                                 } else {  // Process a third-party black list double entry.
                                     // Create an entry string array.
-                                    String[] doubleEntry = {firstEntry, secondEntry};
+                                    String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                                     // Add the entry to the black list.
                                     thirdPartyBlackList.add(doubleEntry);
@@ -983,7 +984,7 @@ public class BlockListHelper {
                             String entry = blockListEntry.substring(0, blockListEntry.indexOf("$"));
 
                             // Create an entry string array.
-                            String[] singleEntry = {entry};
+                            String[] singleEntry = {entry, originalBlockListEntry};
 
                             // Add the entry to the black list.
                             thirdPartyBlackList.add(singleEntry);
@@ -1037,7 +1038,7 @@ public class BlockListHelper {
                                         String thirdEntry = secondEntry.substring((secondWildcardIndex + 1));
 
                                         // Create an entry string array.
-                                        String[] domainTripleEntry = {domain, firstEntry, realSecondEntry, thirdEntry};
+                                        String[] domainTripleEntry = {domain, firstEntry, realSecondEntry, thirdEntry, originalBlockListEntry};
 
                                         // Add the entry to the white list.
                                         domainWhiteList.add(domainTripleEntry);
@@ -1046,7 +1047,7 @@ public class BlockListHelper {
                                         //        "  -  " + originalBlockListEntry);
                                     } else {  // Process a domain white list double entry.
                                         // Create an entry string array.
-                                        String[] domainDoubleEntry = {domain, firstEntry, secondEntry};
+                                        String[] domainDoubleEntry = {domain, firstEntry, secondEntry, originalBlockListEntry};
 
                                         // Add the entry to the white list.
                                         domainWhiteList.add(domainDoubleEntry);
@@ -1055,7 +1056,7 @@ public class BlockListHelper {
                                     }
                                 } else {  // Process a domain white list single entry.
                                     // Create an entry string array.
-                                    String[] domainEntry = {domain, entry};
+                                    String[] domainEntry = {domain, entry, originalBlockListEntry};
 
                                     // Add the entry to the white list.
                                     domainWhiteList.add(domainEntry);
@@ -1098,7 +1099,7 @@ public class BlockListHelper {
                                             //Log.i("BlockLists", headers.get(1)[0] + " not added: " + originalBlockListEntry);
                                         } else {  // Process a domain initial black list entry
                                             // Create an entry string array.
-                                            String[] domainEntry = {domain, entryBase};
+                                            String[] domainEntry = {domain, entryBase, originalBlockListEntry};
 
                                             // Add the entry to the black list.
                                             domainInitialBlackList.add(domainEntry);
@@ -1118,7 +1119,7 @@ public class BlockListHelper {
                                             String secondEntry = entryBase.substring(wildcardIndex + 1);
 
                                             // Create an entry string array.
-                                            String[] domainDoubleEntry = {domain, firstEntry, secondEntry};
+                                            String[] domainDoubleEntry = {domain, firstEntry, secondEntry, originalBlockListEntry};
 
                                             // Add the entry to the black list.
                                             domainFinalBlackList.add(domainDoubleEntry);
@@ -1127,7 +1128,7 @@ public class BlockListHelper {
                                             //        originalBlockListEntry);
                                         } else {  // Process a domain final black list single entry.
                                             // Create an entry string array.
-                                            String[] domainEntry = {domain, entryBase};
+                                            String[] domainEntry = {domain, entryBase, originalBlockListEntry};
 
                                             // Add the entry to the black list.
                                             domainFinalBlackList.add(domainEntry);
@@ -1136,7 +1137,7 @@ public class BlockListHelper {
                                         }
                                     } else if (entry.contains("\\")) {  // Process a domain regular expression black list entry.
                                         // Create an entry string array.
-                                        String[] domainEntry = {domain, entry};
+                                        String[] domainEntry = {domain, entry, originalBlockListEntry};
 
                                         // Add the entry to the black list.
                                         domainRegularExpressionBlackList.add(domainEntry);
@@ -1159,7 +1160,7 @@ public class BlockListHelper {
                                             String thirdEntry = secondEntry.substring(secondWildcardIndex + 1);
 
                                             // Create an entry string array.
-                                            String[] domainTripleEntry = {domain, firstEntry, realSecondEntry, thirdEntry};
+                                            String[] domainTripleEntry = {domain, firstEntry, realSecondEntry, thirdEntry, originalBlockListEntry};
 
                                             // Add the entry to the black list.
                                             domainBlackList.add(domainTripleEntry);
@@ -1168,7 +1169,7 @@ public class BlockListHelper {
                                             //        "  -  " + originalBlockListEntry);
                                         } else {  // Process a domain black list double entry.
                                             // Create an entry string array.
-                                            String[] domainDoubleEntry = {domain, firstEntry, secondEntry};
+                                            String[] domainDoubleEntry = {domain, firstEntry, secondEntry, originalBlockListEntry};
 
                                             // Add the entry to the black list.
                                             domainBlackList.add(domainDoubleEntry);
@@ -1178,7 +1179,7 @@ public class BlockListHelper {
                                         }
                                     } else {  // Process a domain black list single entry.
                                         // Create an entry string array.
-                                        String[] domainEntry = {domain, entry};
+                                        String[] domainEntry = {domain, entry, originalBlockListEntry};
 
                                         // Add the entry to the black list.
                                         domainBlackList.add(domainEntry);
@@ -1206,7 +1207,7 @@ public class BlockListHelper {
                             String secondEntry = blockListEntry.substring(wildcardIndex + 1);
 
                             // Create an entry string array.
-                            String[] doubleEntry = {firstEntry, secondEntry};
+                            String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                             // Add the entry to the white list.
                             mainWhiteList.add(doubleEntry);
@@ -1214,7 +1215,7 @@ public class BlockListHelper {
                             //Log.i("BlockLists", headers.get(1)[0] + " main white list added: " + firstEntry + " , " + secondEntry + "  -  " + originalBlockListEntry);
                         } else {  // Process a white list single entry.
                             // Create an entry string array.
-                            String[] singleEntry = {blockListEntry};
+                            String[] singleEntry = {blockListEntry, originalBlockListEntry};
 
                             // Add the entry to the white list.
                             mainWhiteList.add(singleEntry);
@@ -1226,7 +1227,7 @@ public class BlockListHelper {
                         blockListEntry = blockListEntry.substring(0, blockListEntry.indexOf("$"));
 
                         // Create an entry string array.
-                        String[] singleEntry = {blockListEntry};
+                        String[] singleEntry = {blockListEntry, originalBlockListEntry};
 
                         // Add the entry to the black list.
                         regularExpressionBlackList.add(singleEntry);
@@ -1256,7 +1257,7 @@ public class BlockListHelper {
                                 String secondEntry = entry.substring(wildcardIndex + 1);
 
                                 // Create an entry string array.
-                                String[] doubleEntry = {firstEntry, secondEntry};
+                                String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                                 // Add the entry to the black list.
                                 initialBlackList.add(doubleEntry);
@@ -1264,7 +1265,7 @@ public class BlockListHelper {
                                 //Log.i("BlockLists", headers.get(1)[0] + " initial black list added: " + firstEntry + " , " + secondEntry + "  -  " + originalBlockListEntry);
                             } else {  // Process an initial black list single entry.
                                 // Create an entry string array.
-                                String[] singleEntry = {entry};
+                                String[] singleEntry = {entry, originalBlockListEntry};
 
                                 // Add the entry to the black list.
                                 initialBlackList.add(singleEntry);
@@ -1294,7 +1295,7 @@ public class BlockListHelper {
                                         String thirdEntry = secondEntry.substring(secondWildcardIndex + 1);
 
                                         // Create an entry string array.
-                                        String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry};
+                                        String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry, originalBlockListEntry};
 
                                         // Add the entry to the black list.
                                         finalBlackList.add(tripleEntry);
@@ -1303,7 +1304,7 @@ public class BlockListHelper {
                                         //        originalBlockListEntry);
                                     } else {  // Process a final black list double entry.
                                         // Create an entry string array.
-                                        String[] doubleEntry = {firstEntry, secondEntry};
+                                        String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                                         // Add the entry to the black list.
                                         finalBlackList.add(doubleEntry);
@@ -1312,7 +1313,7 @@ public class BlockListHelper {
                                     }
                                 } else {  // Process a final black list single entry.
                                     // Create an entry sting array.
-                                    String[] singleEntry = {entry};
+                                    String[] singleEntry = {entry, originalBlockListEntry};
 
                                     // Add the entry to the black list.
                                     finalBlackList.add(singleEntry);
@@ -1337,7 +1338,7 @@ public class BlockListHelper {
                                 String thirdEntry = secondEntry.substring(secondWildcardIndex + 1);
 
                                 // Create an entry string array.
-                                String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry};
+                                String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry, originalBlockListEntry};
 
                                 // Add the entry to the black list.
                                 mainBlackList.add(tripleEntry);
@@ -1345,7 +1346,7 @@ public class BlockListHelper {
                                 //Log.i("BlockLists", headers.get(1)[0] + " main black list added: " + firstEntry + " , " + realSecondEntry + " , " + thirdEntry + "  -  " + originalBlockListEntry);
                             } else {  // Process a main black list double entry.
                                 // Create an entry string array.
-                                String[] doubleEntry = {firstEntry, secondEntry};
+                                String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                                 // Add the entry to the black list.
                                 mainBlackList.add(doubleEntry);
@@ -1354,7 +1355,7 @@ public class BlockListHelper {
                             }
                         } else {  // Process a main black list single entry.
                             // Create an entry string array.
-                            String[] singleEntry = {blockListEntry};
+                            String[] singleEntry = {blockListEntry, originalBlockListEntry};
 
                             // Add the entry to the black list.
                             mainBlackList.add(singleEntry);
@@ -1391,7 +1392,7 @@ public class BlockListHelper {
                             String secondEntry = entry.substring(wildcardIndex + 1);
 
                             // Create an entry string array.
-                            String[] doubleEntry = {firstEntry, secondEntry};
+                            String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                             // Add the entry to the black list.
                             initialBlackList.add(doubleEntry);
@@ -1399,7 +1400,7 @@ public class BlockListHelper {
                             //Log.i("BlockLists", headers.get(1)[0] + " initial black list added: " + firstEntry + " , " + secondEntry + "  -  " + originalBlockListEntry);
                         } else {  // Process an initial black list single entry.
                             // Create an entry string array.
-                            String[] singleEntry = {entry};
+                            String[] singleEntry = {entry, originalBlockListEntry};
 
                             // Add the entry to the black list.
                             initialBlackList.add(singleEntry);
@@ -1427,7 +1428,7 @@ public class BlockListHelper {
                                 String thirdEntry = secondEntry.substring(secondWildcardIndex + 1);
 
                                 // Create an entry string array.
-                                String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry};
+                                String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry, originalBlockListEntry};
 
                                 // Add the entry to the black list.
                                 finalBlackList.add(tripleEntry);
@@ -1436,7 +1437,7 @@ public class BlockListHelper {
                                 //        originalBlockListEntry);
                             } else {  // Process a final black list double entry.
                                 // Create an entry string array.
-                                String[] doubleEntry = {firstEntry, secondEntry};
+                                String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                                 // Add the entry to the black list.
                                 finalBlackList.add(doubleEntry);
@@ -1445,7 +1446,7 @@ public class BlockListHelper {
                             }
                         } else {  // Process a final black list single entry.
                             // Create an entry string array.
-                            String[] singleEntry = {entry};
+                            String[] singleEntry = {entry, originalBlockListEntry};
 
                             // Add the entry to the black list.
                             finalBlackList.add(singleEntry);
@@ -1486,7 +1487,7 @@ public class BlockListHelper {
                                         String fifthEntry = fourthEntry.substring(fourthWildcardIndex + 1);
 
                                         // Create an entry string array.
-                                        String[] quintupleEntry = {firstEntry, realSecondEntry, realThirdEntry, realFourthEntry, fifthEntry};
+                                        String[] quintupleEntry = {firstEntry, realSecondEntry, realThirdEntry, realFourthEntry, fifthEntry, originalBlockListEntry};
 
                                         // Add the entry to the black list.
                                         mainBlackList.add(quintupleEntry);
@@ -1495,7 +1496,7 @@ public class BlockListHelper {
                                         //        realFourthEntry + " , " + fifthEntry + "  -  " + originalBlockListEntry);
                                     } else {  // Process a main black list quadruple entry.
                                         // Create an entry string array.
-                                        String[] quadrupleEntry = {firstEntry, realSecondEntry, realThirdEntry, fourthEntry};
+                                        String[] quadrupleEntry = {firstEntry, realSecondEntry, realThirdEntry, fourthEntry, originalBlockListEntry};
 
                                         // Add the entry to the black list.
                                         mainBlackList.add(quadrupleEntry);
@@ -1505,7 +1506,7 @@ public class BlockListHelper {
                                     }
                                 } else {  // Process a main black list triple entry.
                                     // Create an entry string array.
-                                    String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry};
+                                    String[] tripleEntry = {firstEntry, realSecondEntry, thirdEntry, originalBlockListEntry};
 
                                     // Add the entry to the black list.
                                     mainBlackList.add(tripleEntry);
@@ -1514,7 +1515,7 @@ public class BlockListHelper {
                                 }
                             } else {  // Process a main black list double entry.
                                 // Create an entry string array.
-                                String[] doubleEntry = {firstEntry, secondEntry};
+                                String[] doubleEntry = {firstEntry, secondEntry, originalBlockListEntry};
 
                                 // Add the entry to the black list.
                                 mainBlackList.add(doubleEntry);
@@ -1523,7 +1524,7 @@ public class BlockListHelper {
                             }
                         } else {  // Process a main black list single entry.
                             // Create an entry string array.
-                            String[] singleEntry = {blockListEntry};
+                            String[] singleEntry = {blockListEntry, originalBlockListEntry};
 
                             // Add the entry to the black list.
                             mainBlackList.add(singleEntry);
@@ -1575,15 +1576,18 @@ public class BlockListHelper {
     }
 
     public boolean isBlocked(String currentUrl, String resourceUrl, ArrayList<List<String[]>> blockList) {
-        // Get the list title.
-        String blockListTitle = blockList.get(0).get(1)[0];
+        // Get the block list name.
+        String BLOCK_LIST_NAME_STRING = blockList.get(0).get(1)[0];
 
+        // Get the current domain.
         Uri currentUri = Uri.parse(currentUrl);
         String currentDomain = currentUri.getHost();
 
+        // Get the resource domain.
         Uri resourceUri = Uri.parse(resourceUrl);
         String resourceDomain = resourceUri.getHost();
 
+        // Initialize the third-party request tracker.
         boolean thirdPartyRequest = false;
 
         // If one of the domains is `about:blank` it will throw a null object reference on the string comparison.
@@ -1593,30 +1597,36 @@ public class BlockListHelper {
 
         // Process the white lists.
         // Main white list.
-        for (String[] whiteListEntry : blockList.get(1)) {
+        for (String[] whiteListEntry : blockList.get(MainWebViewActivity.MAIN_WHITELIST)) {
             switch (whiteListEntry.length) {
-                case 1:  // There is one entry.
+                case 2:  // There is one entry.
                     if (resourceUrl.contains(whiteListEntry[0])) {
-                        Log.i("BlockLists", "Request allowed by " + blockListTitle + " main white list: " + whiteListEntry[0] + "  -  " + resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.MAIN_WHITELIST), whiteListEntry[0], whiteListEntry[1]};
 
                         // Not blocked.
                         return false;
                     }
                     break;
 
-                case 2:
+                case 3:  // There are two entries.
                     if (resourceUrl.contains(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1])) {
-                        Log.i("BlockLists", "Request allowed by " + blockListTitle + " main white list:  " + whiteListEntry[0] + " , " + whiteListEntry[1] + "  -  " + resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.MAIN_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1],
+                                whiteListEntry[2]};
 
                         // Not blocked.
                         return false;
                     }
                     break;
 
-                case 3:
+                case 4:  // There are three entries.
                     if (resourceUrl.contains(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1]) && resourceUrl.contains(whiteListEntry[2])) {
-                        Log.i("BlockLists", "Request allowed by " + blockListTitle + " main white list:  " + whiteListEntry[0] + " , " + whiteListEntry[1] + " , " + whiteListEntry[2] + "  -  " +
-                                resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.MAIN_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1] + "\n" + whiteListEntry[2], whiteListEntry[3]};
 
                         // Not blocked.
                         return false;
@@ -1626,17 +1636,21 @@ public class BlockListHelper {
         }
 
         // Final white list.
-        for (String[] whiteListEntry : blockList.get(2)) {
-            if (whiteListEntry.length == 1) {  // There is one entry.
+        for (String[] whiteListEntry : blockList.get(MainWebViewActivity.FINAL_WHITELIST)) {
+            if (whiteListEntry.length == 2) {  // There is one entry.
                 if (resourceUrl.contains(whiteListEntry[0])) {
-                    Log.i("BlockLists", "Request allowed by " + blockListTitle + " final white list: " + whiteListEntry[0] + "  -  " + resourceUrl);
+                    // Store the entry in the resource request log.
+                    MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                            String.valueOf(MainWebViewActivity.FINAL_WHITELIST), whiteListEntry[0], whiteListEntry[1]};
 
                     // Not blocked.
                     return false;
                 }
             } else {  // There are two entries.
                 if (resourceUrl.contains(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1])) {
-                    Log.i("BlockLists", "Request allowed by " + blockListTitle + " final white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + "  -  " + resourceUrl);
+                    // Store the entry in the resource request log.
+                    MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                            String.valueOf(MainWebViewActivity.FINAL_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1], whiteListEntry[2]};
 
                     // Not blocked.
                     return false;
@@ -1647,42 +1661,49 @@ public class BlockListHelper {
         // Only check the domain lists if the current domain is not null (like `about:blank`).
         if (currentDomain != null) {
             // Domain white list.
-            for (String[] whiteListEntry : blockList.get(3)) {
+            for (String[] whiteListEntry : blockList.get(MainWebViewActivity.DOMAIN_WHITELIST)) {
                 switch (whiteListEntry.length) {
-                    case 2:  // There is one entry.
+                    case 3:  // There is one entry.
                         if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " domain white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + " --" + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1], whiteListEntry[2]};
 
                             // Not blocked.
                             return false;
                         }
                         break;
 
-                    case 3:  // There are two entries.
+                    case 4:  // There are two entries.
                         if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1]) && resourceUrl.contains(whiteListEntry[2])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " domain white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + " , " + whiteListEntry[2] +
-                                    "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1] + "\n" + whiteListEntry[2], whiteListEntry[3]};
 
                             // Not blocked.
                             return false;
                         }
                         break;
 
-                    case 4:  // There are three entries.
+                    case 5:  // There are three entries.
                         if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1]) && resourceUrl.contains(whiteListEntry[2]) && resourceUrl.contains(whiteListEntry[3])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " domain white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + " , " + whiteListEntry[2] +
-                                    " , " + whiteListEntry[3] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1] + "\n" + whiteListEntry[2] + "\n" + whiteListEntry[3],
+                                    whiteListEntry[4]};
 
                             // Not blocked.
                             return false;
                         }
                         break;
 
-                    case 5:  // There are four entries.
+                    case 6:  // There are four entries.
                         if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1]) && resourceUrl.contains(whiteListEntry[2]) && resourceUrl.contains(whiteListEntry[3]) &&
                                 resourceUrl.contains(whiteListEntry[4])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " domain white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + " , " + whiteListEntry[2] +
-                                    " , " + whiteListEntry[3] + " , " + whiteListEntry[4] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1] + "\n" + whiteListEntry[2] + "\n" + whiteListEntry[3] + "\n" +
+                                    whiteListEntry[4], whiteListEntry[5]};
 
                             // Not blocked.
                             return false;
@@ -1692,31 +1713,36 @@ public class BlockListHelper {
             }
 
             // Domain initial white list.
-            for (String[] whiteListEntry : blockList.get(4)) {
+            for (String[] whiteListEntry : blockList.get(MainWebViewActivity.DOMAIN_INITIAL_WHITELIST)) {
                 switch (whiteListEntry.length) {
-                    case 2:  // There is one entry.
+                    case 3:  // There is one entry.
                         if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.startsWith(whiteListEntry[1])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " domain initial white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_INITIAL_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1], whiteListEntry[2]};
 
                             // Not blocked.
                             return false;
                         }
                         break;
 
-                    case 3:  // There are two entries.
+                    case 4:  // There are two entries.
                         if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.startsWith(whiteListEntry[1]) && resourceUrl.contains(whiteListEntry[2])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " domain initial white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + " , " +
-                                    whiteListEntry[2] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_INITIAL_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1] + "\n" + whiteListEntry[2], whiteListEntry[3]};
 
                             // Not blocked.
                             return false;
                         }
                         break;
 
-                    case 4:  // There are three entries.
+                    case 5:  // There are three entries.
                         if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.startsWith(whiteListEntry[1]) && resourceUrl.contains(whiteListEntry[2]) && resourceUrl.startsWith(whiteListEntry[3])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " domain initial white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + " , " +
-                                    whiteListEntry[2] + " , " + whiteListEntry[3] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_INITIAL_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1] + "\n" + whiteListEntry[2] + "\n" + whiteListEntry[3],
+                                    whiteListEntry[4]};
 
                             // Not blocked.
                             return false;
@@ -1726,21 +1752,25 @@ public class BlockListHelper {
             }
 
             // Domain final white list.
-            for (String[] whiteListEntry : blockList.get(5)) {
+            for (String[] whiteListEntry : blockList.get(MainWebViewActivity.DOMAIN_FINAL_WHITELIST)) {
                 switch (whiteListEntry.length) {
-                    case 2:  // There is one entry;
+                    case 3:  // There is one entry;
                         if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.endsWith(whiteListEntry[1])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " domain final white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_FINAL_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1], whiteListEntry[2]};
 
                             // Not blocked.
                             return false;
                         }
                         break;
 
-                    case 3:  // There are two entries;
+                    case 4:  // There are two entries;
                         if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1]) && resourceUrl.endsWith(whiteListEntry[2])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " domain final white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + " , " +
-                                    whiteListEntry[2] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_FINAL_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1] + "\n" + whiteListEntry[2], whiteListEntry[3]};
+
 
                             // Not blocked.
                             return false;
@@ -1753,51 +1783,59 @@ public class BlockListHelper {
         // Only check the third-party white lists if this is a third-party request.
         if (thirdPartyRequest) {
             // Third-party white list.
-            for (String[] whiteListEntry : blockList.get(6)) {
+            for (String[] whiteListEntry : blockList.get(MainWebViewActivity.THIRD_PARTY_WHITELIST)) {
                 switch (whiteListEntry.length) {
-                    case 1:  // There is one entry
+                    case 2:  // There is one entry
                         if (resourceUrl.contains(whiteListEntry[0])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " third-party white list: " + whiteListEntry[0] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.THIRD_PARTY_WHITELIST), whiteListEntry[0], whiteListEntry[1]};
 
                             // Not blocked.
                             return false;
                         }
                         break;
 
-                    case 2:  // There are two entries.
+                    case 3:  // There are two entries.
                         if (resourceUrl.contains(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " third-party white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.THIRD_PARTY_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1], whiteListEntry[2]};
 
                             // Not blocked.
                             return false;
                         }
                         break;
 
-                    case 3:  // There are three entries.
+                    case 4:  // There are three entries.
                         if (resourceUrl.contains(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1]) && resourceUrl.contains(whiteListEntry[2])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " third-party white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + " , " + whiteListEntry[2] +
-                                    "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.THIRD_PARTY_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1] + "\n" + whiteListEntry[2], whiteListEntry[3]};
 
                             // Not blocked.
                             return false;
                         }
                         break;
 
-                    case 4:  // There are four entries.
+                    case 5:  // There are four entries.
                         if (resourceUrl.contains(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1]) && resourceUrl.contains(whiteListEntry[2]) && resourceUrl.contains(whiteListEntry[3])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " third-party white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + " , " + whiteListEntry[2] +
-                                    " , " + whiteListEntry[3] + "  -  " + resourceUrl);
-
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.THIRD_PARTY_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1] + "\n" + whiteListEntry[2] + "\n" + whiteListEntry[3],
+                                    whiteListEntry[4]};
                             // Not blocked.
                             return false;
                         }
                         break;
 
-                    case 5:  // There are five entries.
+                    case 6:  // There are five entries.
                         if (resourceUrl.contains(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1]) && resourceUrl.contains(whiteListEntry[2]) && resourceUrl.contains(whiteListEntry[3]) &&
                                 resourceUrl.contains(whiteListEntry[4])) {
-                            Log.i("BlockLists", "Request allowed by " + blockListTitle + " third-party white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + " , " + whiteListEntry[2] +
-                                    " , " + whiteListEntry[3] + " , " + whiteListEntry[4] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.THIRD_PARTY_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1] + "\n" + whiteListEntry[2] + "\n" + whiteListEntry[3] + "\n" +
+                                    whiteListEntry[4], whiteListEntry[5]};
 
                             // Not blocked.
                             return false;
@@ -1807,18 +1845,21 @@ public class BlockListHelper {
             }
 
             // Third-party domain white list.
-            for (String[] whiteListEntry : blockList.get(7)) {
-                if (whiteListEntry.length == 2) {  // There is one entry.
+            for (String[] whiteListEntry : blockList.get(MainWebViewActivity.THIRD_PARTY_DOMAIN_WHITELIST)) {
+                if (whiteListEntry.length == 3) {  // There is one entry.
                     if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1])) {
-                        Log.i("BlockLists", "Request allowed by " + blockListTitle + " third-party domain white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + "  -  " + resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.THIRD_PARTY_DOMAIN_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1], whiteListEntry[2]};
 
                         // Not blocked.
                         return false;
                     }
                 } else {  // There are two entries.
                     if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.contains(whiteListEntry[1]) && resourceUrl.contains(whiteListEntry[2])) {
-                        Log.i("BlockLists", "Request allowed by " + blockListTitle + " third-party domain white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + " , " +
-                                whiteListEntry[2] + "  -  " + resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.THIRD_PARTY_DOMAIN_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1] + "\n" + whiteListEntry[2], whiteListEntry[3]};
 
                         // Not blocked.
                         return false;
@@ -1827,19 +1868,21 @@ public class BlockListHelper {
             }
 
             // Third-party domain initial white list.
-            for (String[] whiteListEntry : blockList.get(8)) {
-                if (whiteListEntry.length == 2) {  // There is one entry.
+            for (String[] whiteListEntry : blockList.get(MainWebViewActivity.THIRD_PARTY_DOMAIN_INITIAL_WHITELIST)) {
+                if (whiteListEntry.length == 3) {  // There is one entry.
                     if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.startsWith(whiteListEntry[1])) {
-                        Log.i("BlockLists", "Request allowed by " + blockListTitle + " third-party domain initial white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + "  -  " +
-                                resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.THIRD_PARTY_DOMAIN_INITIAL_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1], whiteListEntry[2]};
 
                         // Not blocked.
                         return false;
                     }
                 } else {  // There are two entries.
                     if (currentDomain.endsWith(whiteListEntry[0]) && resourceUrl.startsWith(whiteListEntry[1]) && resourceUrl.contains(whiteListEntry[2])) {
-                        Log.i("BlockLists", "Request allowed by " + blockListTitle + " third-party domain initial white list: " + whiteListEntry[0] + " , " + whiteListEntry[1] + " , " +
-                                whiteListEntry[2] + "  -  " + resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.whiteListResultStringArray = new String[] {String.valueOf(MainWebViewActivity.REQUEST_ALLOWED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.THIRD_PARTY_DOMAIN_WHITELIST), whiteListEntry[0] + "\n" + whiteListEntry[1] + "\n" + whiteListEntry[2], whiteListEntry[3]};
 
                         // Not blocked.
                         return false;
@@ -1850,51 +1893,59 @@ public class BlockListHelper {
 
         // Process the black lists.
         // Main black list.
-        for (String[] blackListEntry : blockList.get(9)) {
+        for (String[] blackListEntry : blockList.get(MainWebViewActivity.MAIN_BLACKLIST)) {
             switch (blackListEntry.length) {
-                case 1:  // There is one entry.
+                case 2:  // There is one entry.
                     if (resourceUrl.contains(blackListEntry[0])) {
-                        Log.i("BlockLists", "Request blocked by " + blockListTitle + " main black list: " + blackListEntry[0] + "  -  " + resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.MAIN_BLACKLIST), blackListEntry[0], blackListEntry[1]});
 
                         // Blocked.
                         return true;
                     }
                     break;
 
-                case 2:  // There are two entries.
+                case 3:  // There are two entries.
                     if (resourceUrl.contains(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1])) {
-                        Log.i("BlockLists", "Request blocked by " + blockListTitle + " main black list: " + blackListEntry[0] + " , " + blackListEntry[1] + "  -  " + resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.MAIN_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1], blackListEntry[2]});
 
                         // Blocked.
                         return true;
                     }
                     break;
 
-                case 3:  // There are three entries.
+                case 4:  // There are three entries.
                     if (resourceUrl.contains(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1]) && resourceUrl.contains(blackListEntry[2])) {
-                        Log.i("BlockLists", "Request blocked by " + blockListTitle + " main black list: " + blackListEntry[0] + " , " + blackListEntry[1] + " , " + blackListEntry[2] + "  -  " +
-                                resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.MAIN_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1] + "\n" + blackListEntry[2], blackListEntry[3]});
 
                         // Blocked.
                         return true;
                     }
                     break;
 
-                case 4:  // There are four entries.
+                case 5:  // There are four entries.
                     if (resourceUrl.contains(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1]) && resourceUrl.contains(blackListEntry[2]) && resourceUrl.contains(blackListEntry[3])) {
-                        Log.i("BlockLists", "Request blocked by " + blockListTitle + " main black list: " + blackListEntry[0] + " , " + blackListEntry[1] + " , " + blackListEntry[2] + " , " +
-                                blackListEntry[3] + "  -  " + resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.MAIN_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1] + "\n" + blackListEntry[2] + "\n" + blackListEntry[3], blackListEntry[4]});
 
                         // Blocked.
                         return true;
                     }
                     break;
 
-                case 5:  // There are five entries.
+                case 6:  // There are five entries.
                     if (resourceUrl.contains(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1]) && resourceUrl.contains(blackListEntry[2]) && resourceUrl.contains(blackListEntry[3]) &&
                             resourceUrl.contains(blackListEntry[4])) {
-                        Log.i("BlockLists", "Request blocked by " + blockListTitle + " main black list: " + blackListEntry[0] + " , " + blackListEntry[1] + " , " + blackListEntry[2] + " , " +
-                                blackListEntry[3] + ", " + blackListEntry[4] + "  -  " + resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.MAIN_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1] + "\n" + blackListEntry[2] + "\n" + blackListEntry[3] + "\n" +
+                                blackListEntry[4], blackListEntry[5]});
 
                         // Blocked.
                         return true;
@@ -1904,17 +1955,21 @@ public class BlockListHelper {
         }
 
         // Initial black list.
-        for (String[] blackListEntry : blockList.get(10)) {
-            if (blackListEntry.length == 1) {  // There is one entry.
+        for (String[] blackListEntry : blockList.get(MainWebViewActivity.INITIAL_BLACKLIST)) {
+            if (blackListEntry.length == 2) {  // There is one entry.
                 if (resourceUrl.startsWith(blackListEntry[0])) {
-                    Log.i("BlockLists", "Request blocked by " + blockListTitle + " initial black list: " + blackListEntry[0] + "  -  " + resourceUrl);
+                    // Store the entry in the resource request log.
+                    MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                            String.valueOf(MainWebViewActivity.INITIAL_BLACKLIST), blackListEntry[0], blackListEntry[1]});
 
                     // Blocked.
                     return true;
                 }
             } else {  // There are two entries
                 if (resourceUrl.startsWith(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1])) {
-                    Log.i("BlockLists", "Request blocked by " + blockListTitle + " initial black list: " + blackListEntry[0] + " , " + blackListEntry[1] + "  -  " + resourceUrl);
+                    // Store the entry in the resource request log.
+                    MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                            String.valueOf(MainWebViewActivity.INITIAL_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1], blackListEntry[2]});
 
                     // Blocked.
                     return true;
@@ -1923,30 +1978,35 @@ public class BlockListHelper {
         }
 
         // Final black list.
-        for (String[] blackListEntry : blockList.get(11)) {
+        for (String[] blackListEntry : blockList.get(MainWebViewActivity.FINAL_BLACKLIST)) {
             switch (blackListEntry.length) {
-                case 1:  // There is one entry.
+                case 2:  // There is one entry.
                     if (resourceUrl.endsWith(blackListEntry[0])) {
-                        Log.i("BlockLists", "Request blocked by " + blockListTitle + " final black list: " + blackListEntry[0] + "  -  " + resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.FINAL_BLACKLIST), blackListEntry[0], blackListEntry[1]});
 
                         // Blocked.
                         return true;
                     }
                     break;
 
-                case 2:  // There are two entries.
+                case 3:  // There are two entries.
                     if (resourceUrl.contains(blackListEntry[0]) && resourceUrl.endsWith(blackListEntry[1])) {
-                        Log.i("BlockLists", "Request blocked by " + blockListTitle + " final black list: " + blackListEntry[0] + " , " + blackListEntry[1] + "  -  " + resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.FINAL_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1], blackListEntry[2]});
 
                         // Blocked.
                         return true;
                     }
                     break;
 
-                case 3:  // There are three entries.
+                case 4:  // There are three entries.
                     if (resourceUrl.contains(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1]) && resourceUrl.endsWith(blackListEntry[2])) {
-                        Log.i("BlockLists", "Request blocked by " + blockListTitle + " final black list: " + blackListEntry[0] + " , " + blackListEntry[1] + " , " + blackListEntry[2] + "  -  " +
-                                resourceUrl);
+                        // Store the entry in the resource request log.
+                        MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                String.valueOf(MainWebViewActivity.FINAL_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1] + "\n" + blackListEntry[2], blackListEntry[3]});
 
                         // Blocked.
                         return true;
@@ -1958,31 +2018,36 @@ public class BlockListHelper {
         // Only check the domain lists if the current domain is not null (like `about:blank`).
         if (currentDomain != null) {
             // Domain black list.
-            for (String[] blackListEntry : blockList.get(12)) {
+            for (String[] blackListEntry : blockList.get(MainWebViewActivity.DOMAIN_BLACKLIST)) {
                 switch (blackListEntry.length) {
-                    case 2:  // There is one entry.
+                    case 3:  // There is one entry.
                         if (currentDomain.endsWith(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1])) {
-                            Log.i("BlockLists", "Request blocked by " + blockListTitle + " domain black list: " + blackListEntry[0] + " , " + blackListEntry[1] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1], blackListEntry[2]});
 
                             // Blocked.
                             return true;
                         }
                         break;
 
-                    case 3:  // There are two entries.
+                    case 4:  // There are two entries.
                         if (currentDomain.endsWith(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1]) && resourceUrl.contains(blackListEntry[2])) {
-                            Log.i("BlockLists", "Request blocked by " + blockListTitle + " domain black list: " + blackListEntry[0] + " , " + blackListEntry[1] + " , " + blackListEntry[2] +
-                                    "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1] + "\n" + blackListEntry[2], blackListEntry[3]});
 
                             // Blocked.
                             return true;
                         }
                         break;
 
-                    case 4:  // There are three entries.
+                    case 5:  // There are three entries.
                         if (currentDomain.endsWith(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1]) && resourceUrl.contains(blackListEntry[2]) && resourceUrl.contains(blackListEntry[3])) {
-                            Log.i("BlockLists", "Request blocked by " + blockListTitle + " domain black list: " + blackListEntry[0] + " , " + blackListEntry[1] + " , " + blackListEntry[2] +
-                                    " , " + blackListEntry[3] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1] + "\n" + blackListEntry[2] + "\n" + blackListEntry[3],
+                                    blackListEntry[4]});
 
                             // Blocked.
                             return true;
@@ -1992,9 +2057,12 @@ public class BlockListHelper {
             }
 
             // Domain initial black list.
-            for (String[] blackListEntry : blockList.get(13)) {
+            for (String[] blackListEntry : blockList.get(MainWebViewActivity.DOMAIN_INITIAL_BLACKLIST)) {
+                // Store the entry in the resource request log.
                 if (currentDomain.endsWith(blackListEntry[0]) && resourceUrl.startsWith(blackListEntry[1])) {
-                    Log.i("BlockLists", "Request blocked by " + blockListTitle + " domain initial black list: " + blackListEntry[0] + " , " + blackListEntry[1] + "  -  " + resourceUrl);
+                    MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                            String.valueOf(MainWebViewActivity.DOMAIN_INITIAL_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1],
+                            blackListEntry[2]});
 
                     // Blocked.
                     return true;
@@ -2002,21 +2070,24 @@ public class BlockListHelper {
             }
 
             // Domain final black list.
-            for (String[] blackListEntry : blockList.get(14)) {
+            for (String[] blackListEntry : blockList.get(MainWebViewActivity.DOMAIN_FINAL_BLACKLIST)) {
                 switch (blackListEntry.length) {
-                    case 2:  // There is one entry.
+                    case 3:  // There is one entry.
                         if (currentDomain.endsWith(blackListEntry[0]) && resourceUrl.endsWith(blackListEntry[1])) {
-                            Log.i("BlockLists", "Request blocked by " + blockListTitle + " domain final black list: " + blackListEntry[0] + " , " + blackListEntry[1] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_FINAL_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1], blackListEntry[2]});
 
                             // Blocked.
                             return true;
                         }
                         break;
 
-                    case 3:  // There are two entries.
+                    case 4:  // There are two entries.
                         if (currentDomain.endsWith(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1]) && resourceUrl.endsWith(blackListEntry[2])) {
-                            Log.i("BlockLists", "Request blocked by " + blockListTitle + " domain final black list: " + blackListEntry[0] + " , " + blackListEntry[1] + " , " + blackListEntry[2] +
-                                    "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.DOMAIN_FINAL_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1] + "\n" + blackListEntry[2], blackListEntry[3]});
 
                             // Blocked.
                             return true;
@@ -2026,9 +2097,11 @@ public class BlockListHelper {
             }
 
             // Domain regular expression black list.
-            for (String[] blackListEntry : blockList.get(15)) {
+            for (String[] blackListEntry : blockList.get(MainWebViewActivity.DOMAIN_REGULAR_EXPRESSION_BLACKLIST)) {
                 if (currentDomain.endsWith(blackListEntry[0]) && Pattern.matches(blackListEntry[1], resourceUrl)) {
-                    Log.i("BlockLists", "Request blocked by " + blockListTitle + " domain regular expression black list: " + blackListEntry[0] + " , " + blackListEntry[1] + "  -  " + resourceUrl);
+                    // Store the entry in the resource request log.
+                    MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                            String.valueOf(MainWebViewActivity.DOMAIN_REGULAR_EXPRESSION_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1], blackListEntry[2]});
 
                     // Blocked.
                     return true;
@@ -2039,40 +2112,47 @@ public class BlockListHelper {
         // Only check the third-party black lists if this is a third-party request.
         if (thirdPartyRequest) {
             // Third-party black list.
-            for (String[] blackListEntry : blockList.get(16)) {
+            for (String[] blackListEntry : blockList.get(MainWebViewActivity.THIRD_PARTY_BLACKLIST)) {
                 switch (blackListEntry.length) {
-                    case 1:  // There is one entry.
+                    case 2:  // There is one entry.
                         if (resourceUrl.contains(blackListEntry[0])) {
-                            Log.i("BlockLists", "Request blocked by " + blockListTitle + " third-party black list: " + blackListEntry[0] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.THIRD_PARTY_BLACKLIST), blackListEntry[0], blackListEntry[1]});
 
                             // Blocked.
                             return true;
                         }
                         break;
 
-                    case 2:  // There are two entries.
+                    case 3:  // There are two entries.
                         if (resourceUrl.contains(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1])) {
-                            Log.i("BlockLists", "Request blocked by " + blockListTitle + " third-party black list: " + blackListEntry[0] + " , " + blackListEntry[1] + "  -  " + resourceUrl);
+                            // Store the entry in the resource request log.
+                            MainWebViewActivity.resourceRequests.add(new String[] {String.valueOf(MainWebViewActivity.REQUEST_BLOCKED), resourceUrl, BLOCK_LIST_NAME_STRING,
+                                    String.valueOf(MainWebViewActivity.THIRD_PARTY_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1], blackListEntry[2]});
 
                             // Blocked.
                             return true;