]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/commitdiff
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 f9d18aa9115ad0f1487757f9c962a059b8f15404..9e2cc421b98e07be6f5b2400d53ba24fb1609867 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 8f6a8a50839ac19e5fb9a9d55fcbba8e79e41d85..de72063f41e00162ac2946f7119ce981b2fdc259 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 27c7a331a11d94bc3c41c51b8838123023c359da..0c7f32138a8af23869db72ac05a4336c94233b53 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 b65cead021e07b219a3d899acd800a6230e6b66a..256e94f5967000a8b5c1b494c469f23807e592b0 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 623cc26573321035befd28fdacbeac066d1a6fca..87d17efaef196b91e66cadaf332235a84acbcb65 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 6e6b396231b0dc32f0729cdcdc1d532d0789826b..1e7eb3a117b203b48129385ceee7b0ce14b210a8 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 0573cd994c676baeb0901a998ec59821334f4352..fad6583e9008c16df2b65658d4b754417b75fa2e 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 dbc135f47030bbb31843826b70edc5bac5f6372e..a110bc344abca6fe193f5f1f6a490c8c425df00b 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 5a327736c5599bdd05a6d8641c8a973a173110ac..40f34e6d93ffcaabcc096f768d1062818f8660e0 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 19026265bfefefaf368b9f66ac59b7a6a62eac34..e15db6add313a9994e4c544bde9009e30d3cb1e2 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 f59deec10bafee0336e1ad89d0a9fc617c53bfd5..d24d78c6e2af4d68cd61ad3af86688c59ec11959 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 8b1b0a7595c879bbb9862d79a11c88f3f299049b..21a12f2f3b4e6e86308c63fa21b220c24ac5faa9 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 9f02c1c8e85c7928bca14b74ae16ea0d7347cded..70079102c8b14e38f5a2c6497587481b260ecfdf 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 09b98a8107eec5c24772f5ff72e1974aa74d8966..345372beb3cdef62b693a1ab2b13cab8e2fc1597 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 7036bf8807a56e68ba9da74411fe6e6be495964f..52c4b80dde8b626b164c7c0ef272db918a26f473 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 db3856c16b4d7b3967f0fa32c8985ebb332a08d6..9b9cfec99e41c161ac05ac3c66f0a25bd80e9511 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 7b5e4a62e2653b2b90296ee34ed49bcb2386eb76..7f5cd124ec388adf11c309daf150ba3fb54bd478 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 4e5d96058e857d56a5d071655b7324541519cf0c..8bc38d6715544bf3cc0b112c126f3d98c0d4f782 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 3d781bc845c569dccf4e37134f68370b8e9daa99..1fb1b097b4d7a152622e434ab4b5ae3dac2c9a09 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 6b95654acd56ffa6eab09eb5731b5fd79bd0a254..d82bbe73564d37809a0277ce903a04dfdfc1fd17 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 acc25a811399c6d25c35e12527e0f78d93a415d8..57f7d294850142e9cb0a7a2a1bfe2ee4350bd8dd 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 a58851c9c15e627575d21f4df2ad04d8e4ba19cb..3edf86ff3762626b8cdcbf5411718343fc1e2d9a 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 c0020ed6b309e218739a489b7f1d708b5d513d6f..8a3b0e797ab9926f9cd8ca0d6b3cb21f32e3b435 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 4a249ea49bd265127958a6c4df4fe6575ce5d073..72f1767229196e6e23b22c607e33946fb42bfe11 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 f59deec10bafee0336e1ad89d0a9fc617c53bfd5..d24d78c6e2af4d68cd61ad3af86688c59ec11959 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 8b1b0a7595c879bbb9862d79a11c88f3f299049b..21a12f2f3b4e6e86308c63fa21b220c24ac5faa9 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 60697c10ae21d652a0ac656330da30e3fa97de44..021a40556a300620b08f91beb2e9e0f2a6ac0aa6 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 51b0e892684ce8007f10abdd6b53099500fb480b..3f6cc044584b7f4d96350a1b45f998865d20ec4f 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 a676db63173e308d7fcacb9921296e3f16946691..b8a8e9e7502448653c15896c65c0e0fe1c6a7dd8 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 bcfee5f0edf301413b8267732009797f4366a283..3a40c54f5e2c45d83a9ffd714e5dc273ac86151b 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 8ab2399aff8bfce05e0e2dce77d216e2b63441fc..6c29029b5eb6d8a65f4d6c59f40518d0a0ae34c0 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 8ad430b93089a3d10942e414241fb568f9e6f88e..5b96f8a6802c447b1b46f65c8c2a268e69ee608e 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 a8138b6f334536f6b09d7ac43583610ee82868a5..6321df28fef331b1f7369e32a6760aa571334e59 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 c0b462c9f03e7fe667b733510b3badba52200a23..a62c5fa7e65e7820569e13cce221da7380d8b279 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 6e6109b8932fda5a25787c6a18c8d09d1078fe55..248f1f4f5146da5a3b515df49b8fce9dc8fa1116 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 c15c2f8555bdaf6a855b02e1a593ddea9303cbf2..30620516c8fa1505ac37d3a85006334af020e4ba 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 a758ea7f87086d53fcd9386a623b22f766ed5b87..37f1dd831832f3618b04b0744d6bf249fae72e0d 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 b532b7da947994d7840f2af1d7616e4a7c8b21ce..e2ec49094ced24acb3158620bc280b3fa2404ebd 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 93b0192b8141640409b964a02d450cdb415b3d8c..0b21cc4db4c1f91e31ade4e5d664dc7239483936 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 5bdb367aceda21a515e0448a2a54df43ad53183d..49c422d342f72f5d0c692d5d1bf39cb1269eb2cd 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 a00544e877ee832839ae8cae1e99bbdf9a7e9476..20cca827db74c230fd6fded60f76a8c715ca0f86 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 0739b34f1205776f68fd3a04f42691c55da76762..376b9b6cc15c06a90efd7a9b9a8ab02f5324f1f4 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 6a0f55ddbfee46b2034934d12bae3fe19df7559f..b222a0e5bd49972f41aa1603c655e02d79fb5897 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 78e28da65ebf345fc66d019f48e05c42f47613ff..c41454059870c39c0da52341577a67c089b4257c 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 e3e7782df5e33d9d99be1052b19b0a12a03444e3..e9e451dd16151b0f2b0a8b946b4d6650ebe53a94 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 5d058c6562ae2d2d2d4f4ad794d54399eebd5790..8756e15afb4b8310c3ef9da5ff02e1342292b2d8 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 7ca33e80a3c496876b81ea87a73d3d833931dcf0..2b3514c14e1e84dca24e327fab75102bc4a6517b 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 514cfa9837d9741d5780a37396cc1ee68e6ac45d..0c30500d074496c744a9a6db71d7bf03056e56e9 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 92035dede303538486441295f8669b66e32dc9f3..151ec018df35be9ed3f0bae56f6da47fb098557a 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 ae3b8b12dce87a344cf6ded9508a2bc8f44286e8..eeb9e5c6d28f82956907fd99d1d6ae92a1a765a6 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 ce412f34c4fb5007ffd23228fd4a3c165574b242..3bd043d74b9996dba87baf9d2be632053f5d3b53 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 3508bf5e1adb82b0dd6e39034239009cccb87f3d..a3d3d6feccdbe35867794f4b502758d834e2b9f2 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 b7da2e7a258969d31b5c376dd5b4b7d4f7b7f5d7..2dd3d1297f6d5e8205e4148651e181a5215c5b5c 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 89385d55a349c99ae1a04b9f0b3f9709f854ebdf..15e9ff5734e200096e28c937f467cf196dfdf8a8 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 c885d43ffdb4ff91e01eb3cbddc3164371292e4e..9116af9bbc9dc9f42a26a81e6d619ccc1402057f 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 7f6fc9382b71060d8ae34d52de0e5b59734034a1..437339332f74d4b0861ded3dab7d80ce5c64d27b 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 e067d0595012df2b1ab26695918c823255cb3b21..871c4c1a1e59761a9e9a2cf61ef45aaf3ad6f98f 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 debb7c4b87296dd70a61b41d7118eae207032e4a..8c67ae1530ea64c0c06ebe338391cb19d537264c 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 ed8c2b0fcdd24d6e5551a7daa6a6a1b4c0a214b5..aeff868f39a607c539c4da0b67be9dc5dc457015 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 3b23acbfd1f692950a078d133faef5206d964c3f..595282f06818b1cd1acf5ee0f6a6594a0080bcc0 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 eba45f6db613aad959bb5c7af432f02959202218..376aeca8900ca9142ac92327d14482f232f1ee71 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 bda995914425a95f5f0e520dc4d06c413b668f28..8428944bf4677b5a9d838da49e7e34dc3a0d8e24 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 35a1eff6ce8e46a9a36c044a96f4abb80de61bc1..9f4231ab3f4ca810b42c85e00d66d23c4d927982 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 d66ae03c7cdfd91bbe3c2070281358943f782133..006af07a94c36b590ce86ee7b72d265774f3e5f0 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 97362dfe9cf5db1dda2d3d25ebecf4fac883d46b..f594c595893e2f2e8a290aff38379c66d991228a 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 0ebed74a14273b31b8c1fd85a5f6ea4f1edad9e8..be6d11a807e2ddfdbc0e6730c9d0f998d9c4578d 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 c67c3aedf8e766abaf27780bf48093e4b293fcf5..edffc63fb8b3d069ce2f08818ee1daac19c4af21 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 caadd02a34afd00e65184642f2d61d884afc5d1c..d034aac7504a404ee894645973dc5ecf65e1e319 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 98fb9dcbaf8690f223604dffdb1aa13ca19dfe60..670d237b5972a66f2cc3c1f82e115ad657e89043 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 f3321280af116a013d0c29d1f403b7e8c253bdda..ca8d72bd115efe43ad2605ecf6ab87aab74782a0 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 5ff4a851a145d4eed0ee57ff9ae44555b31d3b8b..cf9481249e12c804dc2b74b05fe13c83c48db4c1 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 2221bfe98c20b5ffebbad4019d1d7f1abb73a2f0..94f258685b3bab4c7d4a24b5f6b17832290115de 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 57b3889d1bfa0741f3337a8f4ef1a960833782e0..117f000bef2cfdf9f5d958594d3da4c3d3637cb1 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 028db1b79c7c538cd4bc3b16ce88cfc170fe2f7b..e24c893bd5c4877818f2109fe6aafcf3b384e72f 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 492c113ad710786239584b1ffc35b262be03d790..27be599c6ba783deaafef311183d0f1bad8b6720 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 af26e0b9170dcb162d79d73c9f34171b5a9242c5..0fb537b8eb2a05b9dd411e8c59a2ff5be32d238f 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 8f41bfc7cb4eb60db318fd395e918b1cf74e3b61..0ef29c749137c24c22e167499c96299a822c248c 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 6110ed541b8dadf73b3226f8cef7a7935b79a388..46af64e73bf361eee8ebf393f56568938cfd9016 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 2dfda3612f4fbaff245cd1888c1a8b267d9f6be2..2bbd4e6674cbe2f9397aa8e70fe0c2b5d9a8d52f 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 6796b50e6735b8a6eb3f625dfc6d8989e9e743ce..7404708b55fe04a7230b4ec39d1bc4d5d0d45415 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 8bde8de0f198e978bf58ca8b760e32ff12903b8c..0c9302599bc4b48b1cf53298a1196abf42f9ee95 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 0093810222990dbde1bd479f2bdd53874f1d8dc8..9b9d9f610ca82346a56e05b25b86c06369e6283a 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 ec449a505d7a7148175a031d4808c59a21371154..55ad050a4c56c37ad39e97aa0de5f8a9b12f128b 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;
                         }
                         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 + " third-party 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.THIRD_PARTY_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 + " third-party 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.THIRD_PARTY_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1] + "\n" + blackListEntry[2] + "\n" + blackListEntry[3],
+                                    blackListEntry[4]});
 
                             // Blocked.
                             return true;
@@ -2082,17 +2162,21 @@ public class BlockListHelper {
             }
 
             // Third-party initial black list.
-            for (String[] blackListEntry : blockList.get(17)) {
-                if (blackListEntry.length == 1) {  // There is one entry.
+            for (String[] blackListEntry : blockList.get(MainWebViewActivity.THIRD_PARTY_INITIAL_BLACKLIST)) {
+                if (blackListEntry.length == 2) {  // There is one entry.
                     if (resourceUrl.startsWith(blackListEntry[0])) {
-                        Log.i("BlockLists", "Request blocked by " + blockListTitle + " third-party 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.THIRD_PARTY_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 + " third-party 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.THIRD_PARTY_INITIAL_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1], blackListEntry[2]});
 
                         // Blocked.
                         return true;
@@ -2101,18 +2185,21 @@ public class BlockListHelper {
             }
 
             // Third-party domain black list.
-            for (String[] blackListEntry : blockList.get(18)) {
-                if (blackListEntry.length == 2) {  // There is one entry.
+            for (String[] blackListEntry : blockList.get(MainWebViewActivity.THIRD_PARTY_DOMAIN_BLACKLIST)) {
+                if (blackListEntry.length == 3) {  // There is one entry.
                     if (currentDomain.endsWith(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1])) {
-                        Log.i("BlockLists", "Request blocked by " + blockListTitle + " third-party 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.THIRD_PARTY_DOMAIN_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1], blackListEntry[2]});
 
                         // Blocked.
                         return true;
                     }
                 } else { // There are two entries.
                     if (currentDomain.endsWith(blackListEntry[0]) && resourceUrl.contains(blackListEntry[1]) && resourceUrl.contains(blackListEntry[2])) {
-                        Log.i("BlockLists", "Request blocked by " + blockListTitle + " third-party 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.THIRD_PARTY_DOMAIN_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1] + "\n" + blackListEntry[2], blackListEntry[3]});
 
                         // Blocked.
                         return true;
@@ -2121,32 +2208,35 @@ public class BlockListHelper {
             }
 
             // Third-party domain initial black list.
-            for (String[] blackListEntry : blockList.get(19)) {
+            for (String[] blackListEntry : blockList.get(MainWebViewActivity.THIRD_PARTY_DOMAIN_INITIAL_BLACKLIST)) {
                 switch (blackListEntry.length) {
-                    case 2:  // There is one entry.
+                    case 3:  // There is one entry.
                         if (currentDomain.endsWith(blackListEntry[0]) && resourceUrl.startsWith(blackListEntry[1])) {
-                            Log.i("BlockLists", "Request blocked by " + blockListTitle + " third-party domain 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.THIRD_PARTY_DOMAIN_INITIAL_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.startsWith(blackListEntry[1]) && resourceUrl.contains(blackListEntry[2])) {
-                            Log.i("BlockLists", "Request blocked by " + blockListTitle + " third-party domain initial 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.THIRD_PARTY_DOMAIN_INITIAL_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.startsWith(blackListEntry[1]) && resourceUrl.contains(blackListEntry[2]) && resourceUrl.contains(blackListEntry[3])) {
-                            Log.i("BlockLists", "Request blocked by " + blockListTitle + " third-party domain initial 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.THIRD_PARTY_DOMAIN_INITIAL_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1] + "\n" + blackListEntry[2] + "\n" + blackListEntry[3],
+                                    blackListEntry[4]});
 
                             // Blocked.
                             return true;
@@ -2156,9 +2246,11 @@ public class BlockListHelper {
             }
 
             // Third-party regular expression black list.
-            for (String[] blackListEntry : blockList.get(20)) {
+            for (String[] blackListEntry : blockList.get(MainWebViewActivity.THIRD_PARTY_REGULAR_EXPRESSION_BLACKLIST)) {
                 if (Pattern.matches(blackListEntry[0], resourceUrl)) {
-                    Log.i("BlockLists", "Request blocked by " + blockListTitle + " third-party regular expression 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_REGULAR_EXPRESSION_BLACKLIST), blackListEntry[0], blackListEntry[1]});
 
                     // Blocked.
                     return true;
@@ -2166,10 +2258,11 @@ public class BlockListHelper {
             }
 
             // Third-party domain regular expression black list.
-            for (String[] blackListEntry : blockList.get(21)) {
+            for (String[] blackListEntry : blockList.get(MainWebViewActivity.THIRD_PARTY_DOMAIN_REGULAR_EXPRESSION_BLACKLIST)) {
                 if (currentDomain.endsWith(blackListEntry[0]) && Pattern.matches(blackListEntry[1], resourceUrl)) {
-                    Log.i("BlockLists", "Request blocked by " + blockListTitle + " third-party 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.THIRD_PARTY_DOMAIN_REGULAR_EXPRESSION_BLACKLIST), blackListEntry[0] + "\n" + blackListEntry[1], blackListEntry[2]});
 
                     // Blocked.
                     return true;
@@ -2178,9 +2271,11 @@ public class BlockListHelper {
         }
 
         // Regular expression black list.
-        for (String[] blackListEntry : blockList.get(22)) {
+        for (String[] blackListEntry : blockList.get(MainWebViewActivity.REGULAR_EXPRESSION_BLACKLIST)) {
             if (Pattern.matches(blackListEntry[0], resourceUrl)) {
-                Log.i("BlockLists", "Request blocked by " + blockListTitle + " regular expression 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.REGULAR_EXPRESSION_BLACKLIST), blackListEntry[0], blackListEntry[1]});
 
                 // blocked.
                 return true;
index b56269b15079289cc9e50385d326d52a9ef07d4d..f02c00f698d9b9290773a9257bb5ecbe9996c459 100644 (file)
@@ -57,7 +57,7 @@ public class OrbotProxyHelper {
             mLoadedApkField.setAccessible(true);
             Object mLoadedApkObject = mLoadedApkField.get(privacyBrowserContext);
 
-            // Suppress the lint warning that reflection may not alwasy work in the future and on all devices.
+            // Suppress the lint warning that reflection may not always work in the future and on all devices.
             @SuppressLint("PrivateApi") Class loadedApkClass = Class.forName("android.app.LoadedApk");
             Field mReceiversField = loadedApkClass.getDeclaredField("mReceivers");
 
diff --git a/app/src/main/res/color/requests_spinner_color_selector_dark.xml b/app/src/main/res/color/requests_spinner_color_selector_dark.xml
new file mode 100644 (file)
index 0000000..06e0fa4
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  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/>. -->
+
+<!-- Highlight the selected item when the spinner is open. -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item android:state_checked="true" android:color="@color/gray_300" />
+    <item android:color="@color/blue_300" />
+</selector>
\ No newline at end of file
diff --git a/app/src/main/res/color/requests_spinner_color_selector_light.xml b/app/src/main/res/color/requests_spinner_color_selector_light.xml
new file mode 100644 (file)
index 0000000..3e8f830
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  Copyright © 2017 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/>. -->
+
+<!-- Highlight the selected item when the spinner is open. -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item android:state_checked="true" android:color="@color/white" />
+    <item android:color="@color/blue_100" />
+</selector>
\ No newline at end of file
index 221781dd5fac54a9bf9f040ce7630b87ad5c8d4f..bfaa7f4d9bcc44e7159ab8b19f980642547167ff 100644 (file)
             <TextView
                 android:layout_height="wrap_content"
                 android:layout_width="wrap_content"
-                android:text="@string/block_lists"
+                android:text="@string/blocklists"
                 android:textStyle="bold"
                 android:textSize="18sp"
                 android:textColor="?attr/aboutTitle"
index a31ec0e1d6f35c119292f9463325e8c7ffe738d1..e97449120e8bf7a6aaf4729c700a0f7fab668256 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  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>.
 
@@ -18,7 +18,8 @@
   You should have received a copy of the GNU General Public License
   along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
 
-<!-- `android:fitsSystemWindows="true"` moves the AppBar below the status bar.  When it is specified the theme should include `<item name="android:windowTranslucentStatus">true</item>` to make the status bar a transparent, darkened overlay. -->
+<!-- `android:fitsSystemWindows="true"` moves the AppBar below the status bar.
+    When it is specified the theme should include `<item name="android:windowTranslucentStatus">true</item>` to make the status bar a transparent, darkened overlay. -->
 <android.support.design.widget.CoordinatorLayout
     android:id="@+id/bookmarks_coordinatorlayout"
     xmlns:android="http://schemas.android.com/apk/res/android"
@@ -38,7 +39,6 @@
             android:layout_height="wrap_content"
             android:layout_width="match_parent" >
 
-            <!-- android:theme="@style/PrivacyBrowser.DarkAppBar" makes the text and icons in the AppBar white. -->
             <android.support.v7.widget.Toolbar
                 android:id="@+id/bookmarks_toolbar"
                 android:layout_height="wrap_content"
index e5b6de8a7a4f0a958c6c2015497b7fa3bfcff466..903537aabf978e1fc7587ec6ee2f4980653a9286 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  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>.
 
@@ -28,7 +28,7 @@
     android:layout_width="match_parent"
     android:fitsSystemWindows="true" >
 
-    <!-- The `LinearLayout` with `orientation="vertical"` moves the `ListView` below the `AppBarLayout`. -->
+    <!-- The `LinearLayout` with `orientation="vertical"` moves the list view below the app bar layout. -->
     <LinearLayout
         android:layout_height="match_parent"
         android:layout_width="match_parent"
index 8df232bcf77f2915a423c0b941b45f3a0993af83..57860eea3978a470f0b711b318ca3ce5b74e8653 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  Copyright © 2017 Soren Stoutner <soren@stoutner.com>.
+  Copyright © 2017-2018 Soren Stoutner <soren@stoutner.com>.
 
   This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
 
@@ -18,7 +18,7 @@
   You should have received a copy of the GNU General Public License
   along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
 
-<!-- A `CheckedTextView` allows the color of the text to be changed when it is selected (checked). -->
+<!-- A checked text view allows the color of the text to be changed when it is selected (checked). -->
 <CheckedTextView
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:id="@+id/spinner_item_textview"
diff --git a/app/src/main/res/layout/requests_coordinatorlayout.xml b/app/src/main/res/layout/requests_coordinatorlayout.xml
new file mode 100644 (file)
index 0000000..7f11c6c
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  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/>. -->
+
+<!-- `android:fitsSystemWindows="true"` moves the AppBar below the status bar.
+    When it is specified the theme should include `<item name="android:windowTranslucentStatus">true</item>` to make the status bar a transparent, darkened overlay. -->
+<android.support.design.widget.CoordinatorLayout
+    android:id="@+id/blocklists_coordinatorlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:layout_height="match_parent"
+    android:layout_width="match_parent"
+    android:fitsSystemWindows="true">
+
+    <!-- the `LinearLayout` with `orientation="vertical"` moves the content below the `AppBarLayout`. -->
+    <LinearLayout
+        android:layout_height="match_parent"
+        android:layout_width="match_parent"
+        android:orientation="vertical" >
+
+        <android.support.design.widget.AppBarLayout
+            android:id="@+id/blocklists_appbarlayout"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent" >
+
+            <android.support.v7.widget.Toolbar
+                android:id="@+id/blocklists_toolbar"
+                android:layout_height="wrap_content"
+                android:layout_width="match_parent"
+                android:background="?attr/colorPrimaryDark"
+                android:theme="?attr/appBarTextTheme"
+                app:popupTheme="?attr/popupsTheme" />
+        </android.support.design.widget.AppBarLayout>
+
+        <!-- `android:dividerHeight` must be at least `1dp` or the `ListView` is inconsistent in calculating how many bookmarks are displayed. -->
+        <ListView
+            android:id="@+id/resource_requests_listview"
+            android:layout_height="match_parent"
+            android:layout_width="match_parent"
+            android:divider="@color/transparent"
+            android:dividerHeight="1dp" />
+    </LinearLayout>
+</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/requests_item_linearlayout.xml b/app/src/main/res/layout/requests_item_linearlayout.xml
new file mode 100644 (file)
index 0000000..33d48cb
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  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/>. -->
+
+<LinearLayout
+    android:id="@+id/request_item_linearlayout"
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="wrap_content"
+    android:layout_width="match_parent"
+    android:orientation="horizontal">
+
+    <TextView
+        android:id="@+id/request_item_action"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_margin="10dp"
+        android:textSize="16sp" />
+
+    <TextView
+        android:id="@+id/request_item_url"
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:layout_margin="10dp"
+        android:textSize="16sp"
+        android:maxLines="1"
+        android:ellipsize="end" />
+</LinearLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/requests_spinner.xml b/app/src/main/res/layout/requests_spinner.xml
new file mode 100644 (file)
index 0000000..517f854
--- /dev/null
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  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/>. -->
+
+<Spinner
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/requests_spinner"
+    android:layout_height="wrap_content"
+    android:layout_width="wrap_content" />
diff --git a/app/src/main/res/layout/requests_spinner_dropdown_item.xml b/app/src/main/res/layout/requests_spinner_dropdown_item.xml
new file mode 100644 (file)
index 0000000..eb6771b
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  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/>. -->
+
+<!-- A checked text view allows the color of the text to be changed when it is selected (checked). -->
+<CheckedTextView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/spinner_item_textview"
+    android:layout_height="wrap_content"
+    android:layout_width="match_parent"
+    android:maxLines="1"
+    android:paddingStart="20dp"
+    android:paddingEnd="20dp"
+    android:paddingTop="8dp"
+    android:paddingBottom="8dp"
+    android:textSize="18sp"
+    android:textColor="?attr/requestsSpinnerTextColorSelector"
+    android:background="?attr/requestsSpinnerBackground" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/requests_spinner_item.xml b/app/src/main/res/layout/requests_spinner_item.xml
new file mode 100644 (file)
index 0000000..085c2a2
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  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/>. -->
+
+<TextView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/spinner_item_textview"
+    android:layout_height="wrap_content"
+    android:layout_width="match_parent"
+    android:maxLines="1"
+    android:paddingStart="10dp"
+    android:paddingEnd="10dp"
+    android:textSize="18sp"
+    android:textColor="?attr/requestsSpinnerHeaderTextColor" />
\ No newline at end of file
index df4a1363536bbd34b74160d501ee4f417c2690a2..b6e7338d1aec18b67508ebf12f38744c2912953e 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 
 <!--
-  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>.
 
@@ -19,7 +19,6 @@
   along with Privacy Browser.  If not, see <http://www.gnu.org/licenses/>. -->
 
 <LinearLayout
-    android:id="@+id/history_item_linearlayout"
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_height="wrap_content"
diff --git a/app/src/main/res/layout/view_request_dialog.xml b/app/src/main/res/layout/view_request_dialog.xml
new file mode 100644 (file)
index 0000000..c42b883
--- /dev/null
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+  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/>. -->
+
+<ScrollView
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_height="wrap_content"
+    android:layout_width="match_parent" >
+
+    <LinearLayout
+        android:orientation="vertical"
+        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:layout_marginStart="10dp"
+        android:layout_marginEnd="10dp" >
+
+        <!-- Disposition. -->
+        <TextView
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:text="@string/disposition"
+            android:textSize="12sp"
+            android:textColor="@color/blue_700"
+            android:layout_marginTop="5dp" />
+
+        <TextView
+            android:id="@+id/request_action"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:textSize="16sp"
+            android:textColor="?android:textColorPrimary"
+            android:textIsSelectable="true" />
+
+        <!-- URL -->
+        <TextView
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:text="@string/url"
+            android:textSize="12sp"
+            android:textColor="@color/blue_700"
+            android:layout_marginTop="10dp" />
+
+        <TextView
+            android:id="@+id/request_url"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:textSize="16sp"
+            android:textColor="?android:textColorPrimary"
+            android:textIsSelectable="true" />
+
+        <!-- Blocklist -->
+        <TextView
+            android:id="@+id/request_blocklist_label"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:text="@string/blocklist"
+            android:textSize="12sp"
+            android:textColor="@color/blue_700"
+            android:layout_marginTop="10dp" />
+
+        <TextView
+            android:id="@+id/request_blocklist"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:textSize="16sp"
+            android:textColor="?android:textColorPrimary"
+            android:textIsSelectable="true" />
+
+        <!-- Sublist -->
+        <TextView
+            android:id="@+id/request_sublist_label"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:text="@string/sublist"
+            android:textSize="12sp"
+            android:textColor="@color/blue_700"
+            android:layout_marginTop="10dp" />
+
+        <TextView
+            android:id="@+id/request_sublist"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:textSize="16sp"
+            android:textColor="?android:textColorPrimary"
+            android:textIsSelectable="true" />
+
+        <!-- Blocklist Entries. -->
+        <TextView
+            android:id="@+id/request_blocklist_entries_label"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:text="@string/blocklist_entries"
+            android:textSize="12sp"
+            android:textColor="@color/blue_700"
+            android:layout_marginTop="10dp" />
+
+        <TextView
+            android:id="@+id/request_blocklist_entries"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:textSize="16sp"
+            android:textColor="?android:textColorPrimary"
+            android:textIsSelectable="true" />
+
+        <!-- Blocklist Entries. -->
+        <TextView
+            android:id="@+id/request_blocklist_original_entry_label"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:text="@string/blocklist_original_entry"
+            android:textSize="12sp"
+            android:textColor="@color/blue_700"
+            android:layout_marginTop="10dp" />
+
+        <TextView
+            android:id="@+id/request_blocklist_original_entry"
+            android:layout_height="wrap_content"
+            android:layout_width="match_parent"
+            android:textSize="16sp"
+            android:textColor="?android:textColorPrimary"
+            android:textIsSelectable="true" />
+    </LinearLayout>
+</ScrollView>
\ No newline at end of file
index fbab73912431d3bfac4f1cfc741e70a785ee8c6a..9032af7eed798bf921e201b907701f4649057424 100644 (file)
     <group
         android:id="@+id/navigationGroup1" >
 
+        <item
+            android:id="@+id/requests"
+            android:title="@string/requests"
+            android:icon="@drawable/block_ads_enabled_light"
+            android:orderInCategory="50" />
+
         <item
             android:id="@+id/downloads"
             android:title="@string/downloads"
             android:icon="@drawable/downloads_light"
-            android:orderInCategory="50" />
+            android:orderInCategory="60" />
 
         <item
             android:id="@+id/domains"
             android:title="@string/domains"
             android:icon="@drawable/domains"
-            android:orderInCategory="60" />
+            android:orderInCategory="70" />
 
         <item
             android:id="@+id/settings"
             android:title="@string/settings"
             android:icon="@drawable/settings"
-            android:orderInCategory="70" />
+            android:orderInCategory="80" />
     </group>
 
     <!-- If a group has an id, a line is drawn above it in the navigation view. -->
             android:id="@+id/guide"
             android:title="@string/guide"
             android:icon="@drawable/guide"
-            android:orderInCategory="80" />
+            android:orderInCategory="90" />
 
         <item
             android:id="@+id/about"
             android:title="@string/about"
             android:icon="@drawable/about_light"
-            android:orderInCategory="90" />
+            android:orderInCategory="100" />
     </group>
 
     <!-- If a group has an id, a line is drawn above it in the navigation view. -->
@@ -90,6 +96,6 @@
             android:id="@+id/clearAndExit"
             android:title="@string/clear_and_exit"
             android:icon="@drawable/clear_and_exit"
-            android:orderInCategory="100" />
+            android:orderInCategory="110" />
     </group>
 </menu>
\ No newline at end of file
index 93c0fc0b2579f7f66d72f0907ee0b8566e4b84f8..3712878e0df24cd0a0438a3077d151f8ff0c906a 100644 (file)
         <string name="do_not_track_summary">Enviar la cabecera de no rastrear (DNT) que educadamente sugiere que los servidores web no rastreen este navegador.</string>
         <string name="allow_screenshots">Permitir capturas de pantalla</string>
         <string name="allow_screenshots_summary">Permitir capturas de pantalla, grabación de vídeo y visualización en pantallas inseguras. Cambiar esta configuración reiniciará Navegador Privado.</string>
-    <string name="block_lists">Listas de bloqueo</string>
+    <string name="blocklists">Listas de bloqueo</string>
         <string name="easylist">EasyList</string>
         <string name="easylist_summary">Lista principal de bloqueo de anuncios.</string>
         <string name="easyprivacy">EasyPrivacy</string>
index 5142d9397414b72f7f2fa92423d8eab3cf92c711..8f309ed00380593341c44e950b1c4f7030a2a9e8 100644 (file)
         <string name="allow_screenshots">Permetti gli screenshot</string>
         <string name="allow_screenshots_summary">Permette gli screenshot, la registrazione di video, e la possibilità di visualizzare su schermi non sicuri.
             La modifica di questa impostazione provoca il riavvio di Privacy Browser.</string>
-    <string name="block_lists">Block List</string>
+    <string name="blocklists">Blocklist</string>
         <string name="easylist">EasyList</string>
         <string name="easylist_summary">Blocking list principale.</string>
         <string name="easyprivacy">EasyPrivacy</string>
index 0f76be5ab9c5e6ed51ab0389cd5662dc0676abb1..32f408f431ee86c7374f5f1798372a18f5fea84c 100644 (file)
         <string name="do_not_track_summary">Отправлять заголовок \'Не отслеживать\', предлагающий веб-серверу не отслеживать этот браузер.</string>
         <string name="allow_screenshots">Разрешить скриншоты</string>
         <string name="allow_screenshots_summary">Разрешить скриншоты, запись видео и просмотр на незащищенных дисплеях. При изменении этого параметра Privacy Browser будет перезапущен.</string>
-    <string name="block_lists">Списки блокировки</string>
+    <string name="blocklists">Списки блокировки</string>
         <string name="easylist">EasyList</string>
         <string name="easylist_summary">Основной список блокировки рекламы.</string>
         <string name="easyprivacy">EasyPrivacy</string>
index dd6710b41c78b2d8bf568b9304f6e08e356c2b31..06f63c005eb1b5b6a14c32d55dbb85e39d891ab6 100644 (file)
@@ -34,6 +34,9 @@
     <attr name="bookmarksSpinnerHeaderTextColor" format="reference" />
     <attr name="bookmarksSpinnerTextColorSelector" format="reference" />
     <attr name="bookmarksSpinnerBackground" format="reference" />
+    <attr name="requestsSpinnerHeaderTextColor" format="reference" />
+    <attr name="requestsSpinnerTextColorSelector" format="reference" />
+    <attr name="requestsSpinnerBackground" format="reference" />
     <attr name="editBookmarkSpinnerTextColorSelector" format="reference" />
     <attr name="redText" format="reference" />
 
index 94c863b84fc2136a623353ba6d1c627e2a195a97..8c17b8378d0aa0d5259e85f521e8018e530e5f6c 100644 (file)
     <color name="light_green_100">#FFDCEDC8</color>
     <color name="light_green_a700">#FF64DD17</color>
 
+    <color name="red_100">#FFFFCDD2</color>
+    <color name="red_200">#FFEF9A9A</color>
+    <color name="red_600">#FFE53935</color>
+    <color name="red_700">#FFD32F2F</color>
+    <color name="red_700_50">#55D32F2F</color>
+    <color name="red_800">#FFC62828</color>
     <color name="red_900">#FFB71C1C</color>
     <color name="red_a700">#FFD50000</color>
 
index 84a284197e254784de8d90a1629e9de7cf0c2a71..f7263b1ed0f7d77a0112e237103a29274b3be726 100644 (file)
     <string name="parent_folder">Parent folder:</string>
     <string name="display_order">Display order:</string>
 
+    <!-- Block Lists. -->
+    <string name="requests">Requests</string>
+    <string name="request_details">Request details</string>
+    <string name="disposition">Disposition</string>
+        <string name="all">All</string>
+        <string name="default_label">Default</string>
+        <string name="default_allowed">Default - Allowed</string>
+        <string name="allowed">Allowed</string>
+        <string name="blocked">Blocked</string>
+    <string name="blocklist">Blocklist</string>
+    <string name="sublist">Sublist</string>
+        <string name="main_whitelist">Main whitelist</string>
+        <string name="final_whitelist">Final whitelist</string>
+        <string name="domain_whitelist">Domain whitelist</string>
+        <string name="domain_initial_whitelist">Domain initial whitelist</string>
+        <string name="domain_final_whitelist">Domain final whitelist</string>
+        <string name="third_party_whiteist">Third-party whitelist</string>
+        <string name="third_party_domain_whitelist">Third-party domain whitelist</string>
+        <string name="third_party_domain_initial_whitelist">Third-party domain initial whitelist</string>
+        <string name="main_blacklist">Main blacklist</string>
+        <string name="initial_blacklist">Initial blacklist</string>
+        <string name="final_blacklist">Final blacklist</string>
+        <string name="domain_blacklist">Domain blacklist</string>
+        <string name="domain_initial_blacklist">Domain initial blacklist</string>
+        <string name="domain_final_blacklist">Domain final blacklist</string>
+        <string name="domain_regular_expression_blacklist">Domain regular expression blacklist</string>
+        <string name="third_party_blacklist">Third-party blacklist</string>
+        <string name="third_party_initial_blacklist">Third-party blacklist</string>
+        <string name="third_party_domain_blacklist">Third-party domain blacklist</string>
+        <string name="third_party_domain_initial_blacklist">Third-party domain initial blacklist</string>
+        <string name="third_party_regular_expression_blacklist">Third-party regular expression blacklist</string>
+        <string name="third_party_domain_regular_expression_blacklist">Third-party domain regular expression blacklist</string>
+        <string name="regular_expression_blacklist">Regular expression blacklist</string>
+    <string name="blocklist_entries">Blocklist entries</string>
+    <string name="blocklist_original_entry">Blocklist original entry</string>
+
     <!-- Domains. -->
     <string name="domains">Domains</string>
     <string name="domain_settings">Domain Settings</string>
         <string name="do_not_track_summary">Send the Do Not Track header, which politely suggests that web servers not track this browser.</string>
         <string name="allow_screenshots">Allow screenshots</string>
         <string name="allow_screenshots_summary">Allow screenshots, video recording, and viewing on non-secure displays. Changing this setting will restart Privacy Browser.</string>
-    <string name="block_lists">Block Lists</string>
+    <string name="blocklists">Blocklists</string>
         <string name="easylist">EasyList</string>
         <string name="easylist_summary">Main ad blocking list.</string>
         <string name="easyprivacy">EasyPrivacy</string>
index 45f624971f2fbcca267d9ef0728c89ee0793f4b9..b785fde08ae8be2f3127c50650dc84501aa65663 100644 (file)
@@ -52,6 +52,9 @@
         <item name="bookmarksSpinnerTextColorSelector">@color/bookmarks_spinner_color_selector_light</item>
         <item name="bookmarksSpinnerBackground">@color/blue_750</item>
         <item name="editBookmarkSpinnerTextColorSelector">@color/edit_bookmark_spinner_color_selector_light</item>
+        <item name="requestsSpinnerHeaderTextColor">@color/white</item>
+        <item name="requestsSpinnerTextColorSelector">@color/requests_spinner_color_selector_light</item>
+        <item name="requestsSpinnerBackground">@color/blue_750</item>
         <item name="listSelectorDrawable">@drawable/list_selector_light</item>
         <item name="aboutTitle">@color/blue_900</item>
         <item name="aboutText">@color/blue_700</item>
         <item name="bookmarksSpinnerTextColorSelector">@color/bookmarks_spinner_color_selector_dark</item>
         <item name="bookmarksSpinnerBackground">@color/blue_830</item>
         <item name="editBookmarkSpinnerTextColorSelector">@color/edit_bookmark_spinner_color_selector_dark</item>
+        <item name="requestsSpinnerHeaderTextColor">@color/gray_300</item>
+        <item name="requestsSpinnerTextColorSelector">@color/requests_spinner_color_selector_dark</item>
+        <item name="requestsSpinnerBackground">@color/blue_830</item>
         <item name="aboutTitle">@color/blue_600</item>
         <item name="aboutText">@color/blue_400</item>
         <item name="aboutBackground">@color/gray_850</item>
index e38eed8888d1c682f522304727a1a3fba4f74f2d..55547577ef374f85aca51f97fd9779bf88e9d6f5 100644 (file)
@@ -89,8 +89,8 @@
     </PreferenceCategory>
 
     <PreferenceCategory
-        android:key="block_lists"
-        android:title="@string/block_lists" >
+        android:key="blocklists"
+        android:title="@string/blocklists" >
 
         <SwitchPreference
             android:key="easylist"