<p><img class="icon" src="../en/images/ic_create_new_folder.png"> ic_create_new_folder.</p>
<p><img class="icon" src="../en/images/ic_devices_other.png"> ic_devices_other.</p>
<p><img class="icon" src="../en/images/ic_delete.png"> ic_delete.</p>
+ <p><img class="icon" src="../en/images/ic_delete_forever.png"> ic_delete_forever.</p>
<p><img class="icon" src="../en/images/ic_dns.png"> ic_dns.</p>
+ <p><img class="icon" src="../en/images/ic_donut_small.png"> ic_donut_small.</p>
<p><img class="icon" src="../en/images/ic_edit.png"> ic_edit.</p>
<p><img class="icon" src="../en/images/ic_exit_to_app.png"> ic_exit_to_app.</p>
<p><img class="icon" src="../en/images/ic_expand_less.png"> ic_expand_less.</p>
<p><img class="icon" src="../en/images/ic_list.png"> ic_list.</p>
<p><img class="icon" src="../en/images/ic_local_activity.png"> ic_local_activity.</p>
<p><img class="icon" src="../en/images/ic_location_off.png"> ic_location_off.</p>
+ <p><img class="icon" src="../en/images/ic_map.png"> ic_map.</p>
<p><img class="icon" src="../en/images/ic_more.png"> ic_more.</p>
<p><img class="icon" src="../en/images/ic_question_answer.png"> ic_question_answer.</p>
<p><img class="icon" src="../en/images/ic_refresh.png"> ic_refresh.</p>
<p><img class="icon" src="images/ic_create_new_folder.png"> ic_create_new_folder.</p>
<p><img class="icon" src="images/ic_devices_other.png"> ic_devices_other.</p>
<p><img class="icon" src="images/ic_delete.png"> ic_delete.</p>
+ <p><img class="icon" src="images/ic_delete_forever.png"> ic_delete_forever.</p>
<p><img class="icon" src="images/ic_dns.png"> ic_dns.</p>
+ <p><img class="icon" src="images/ic_donut_small.png"> ic_donut_small.</p>
<p><img class="icon" src="images/ic_edit.png"> ic_edit.</p>
<p><img class="icon" src="images/ic_exit_to_app.png"> ic_exit_to_app.</p>
<p><img class="icon" src="images/ic_expand_less.png"> ic_expand_less.</p>
<p><img class="icon" src="images/ic_list.png"> ic_list.</p>
<p><img class="icon" src="images/ic_local_activity.png"> ic_local_activity.</p>
<p><img class="icon" src="images/ic_location_off.png"> ic_location_off.</p>
+ <p><img class="icon" src="images/ic_map.png"> ic_map.</p>
<p><img class="icon" src="images/ic_more.png"> ic_more.</p>
<p><img class="icon" src="images/ic_question_answer.png"> ic_question_answer.</p>
<p><img class="icon" src="images/ic_refresh.png"> ic_refresh.</p>
<p><img class="icon" src="../en/images/ic_create_new_folder.png"> ic_create_new_folder.</p>
<p><img class="icon" src="../en/images/ic_devices_other.png"> ic_devices_other.</p>
<p><img class="icon" src="../en/images/ic_delete.png"> ic_delete.</p>
+ <p><img class="icon" src="../en/images/ic_delete_forever.png"> ic_delete_forever.</p>
<p><img class="icon" src="../en/images/ic_dns.png"> ic_dns.</p>
+ <p><img class="icon" src="../en/images/ic_donut_small.png"> ic_donut_small.</p>
<p><img class="icon" src="../en/images/ic_edit.png"> ic_edit.</p>
<p><img class="icon" src="../en/images/ic_exit_to_app.png"> ic_exit_to_app.</p>
<p><img class="icon" src="../en/images/ic_expand_less.png"> ic_expand_less.</p>
<p><img class="icon" src="../en/images/ic_list.png"> ic_list.</p>
<p><img class="icon" src="../en/images/ic_local_activity.png"> ic_local_activity.</p>
<p><img class="icon" src="../en/images/ic_location_off.png"> ic_location_off.</p>
+ <p><img class="icon" src="../en/images/ic_map.png"> ic_map.</p>
<p><img class="icon" src="../en/images/ic_more.png"> ic_more.</p>
<p><img class="icon" src="../en/images/ic_question_answer.png"> ic_question_answer.</p>
<p><img class="icon" src="../en/images/ic_refresh.png"> ic_refresh.</p>
<p><a href="https://www.stoutner.com/category/privacy-browser/"><img class="icon" src="../en/images/ic_chrome_reader_mode_dark_blue.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="../en/images/ic_map_dark_blue.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="../en/images/ic_map_dark_blue.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="../en/images/ic_bug_report_dark_blue.png"></a> <a href="https://redmine.stoutner.com/projects/privacy-browser/issues">Seguimiento de errores y petición de funciones</a></p>
<p><img class="icon" src="../en/images/ic_create_new_folder.png"> ic_create_new_folder.</p>
<p><img class="icon" src="../en/images/ic_devices_other.png"> ic_devices_other.</p>
<p><img class="icon" src="../en/images/ic_delete.png"> ic_delete.</p>
+ <p><img class="icon" src="../en/images/ic_delete_forever.png"> ic_delete_forever.</p>
<p><img class="icon" src="../en/images/ic_dns.png"> ic_dns.</p>
+ <p><img class="icon" src="../en/images/ic_donut_small.png"> ic_donut_small.</p>
<p><img class="icon" src="../en/images/ic_edit.png"> ic_edit.</p>
<p><img class="icon" src="../en/images/ic_exit_to_app.png"> ic_exit_to_app.</p>
<p><img class="icon" src="../en/images/ic_expand_less.png"> ic_expand_less.</p>
<p><img class="icon" src="../en/images/ic_list.png"> ic_list.</p>
<p><img class="icon" src="../en/images/ic_local_activity.png"> ic_local_activity.</p>
<p><img class="icon" src="../en/images/ic_location_off.png"> ic_location_off.</p>
+ <p><img class="icon" src="../en/images/ic_map.png"> ic_map.</p>
<p><img class="icon" src="../en/images/ic_more.png"> ic_more.</p>
<p><img class="icon" src="../en/images/ic_question_answer.png"> ic_question_answer.</p>
<p><img class="icon" src="../en/images/ic_refresh.png"> ic_refresh.</p>
<p><img class="icon" src="../en/images/ic_create_new_folder.png"> ic_create_new_folder.</p>
<p><img class="icon" src="../en/images/ic_devices_other.png"> ic_devices_other.</p>
<p><img class="icon" src="../en/images/ic_delete.png"> ic_delete.</p>
+ <p><img class="icon" src="../en/images/ic_delete_forever.png"> ic_delete_forever.</p>
<p><img class="icon" src="../en/images/ic_dns.png"> ic_dns.</p>
+ <p><img class="icon" src="../en/images/ic_donut_small.png"> ic_donut_small.</p>
<p><img class="icon" src="../en/images/ic_edit.png"> ic_edit.</p>
<p><img class="icon" src="../en/images/ic_exit_to_app.png"> ic_exit_to_app.</p>
<p><img class="icon" src="../en/images/ic_expand_less.png"> ic_expand_less.</p>
<p><img class="icon" src="../en/images/ic_list.png"> ic_list.</p>
<p><img class="icon" src="../en/images/ic_local_activity.png"> ic_local_activity.</p>
<p><img class="icon" src="../en/images/ic_location_off.png"> ic_location_off.</p>
+ <p><img class="icon" src="../en/images/ic_map.png"> ic_map.</p>
<p><img class="icon" src="../en/images/ic_more.png"> ic_more.</p>
<p><img class="icon" src="../en/images/ic_question_answer.png"> ic_question_answer.</p>
<p><img class="icon" src="../en/images/ic_refresh.png"> ic_refresh.</p>
break;
case R.id.clearAndExit:
- // Clear cookies. The commands changed slightly in API 21.
- if (Build.VERSION.SDK_INT >= 21) {
- cookieManager.removeAllCookies(null);
- } else {
- cookieManager.removeAllCookie();
+ // Get a handle for `sharedPreferences`. `this` references the current context.
+ SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
+
+ boolean clearEverything = sharedPreferences.getBoolean("clear_everything", true);
+
+ // Clear cookies.
+ if (clearEverything || sharedPreferences.getBoolean("clear_cookies", true)) {
+ // The command to remove cookies changed slightly in API 21.
+ if (Build.VERSION.SDK_INT >= 21) {
+ cookieManager.removeAllCookies(null);
+ } else {
+ cookieManager.removeAllCookie();
+ }
+
+ // Manually delete the cookies database, as `CookieManager` sometimes will not flush its changes to disk before `System.exit(0)` is run.
+ try {
+ // We have to use two commands because `Runtime.exec()` does not like `*`.
+ privacyBrowserRuntime.exec("rm -f " + privateDataDirectoryString + "/app_webview/Cookies");
+ privacyBrowserRuntime.exec("rm -f " + privateDataDirectoryString + "/app_webview/Cookies-journal");
+ } catch (IOException e) {
+ // Do nothing if an error is thrown.
+ }
}
// Clear DOM storage.
- WebStorage domStorage = WebStorage.getInstance();
- domStorage.deleteAllData();
+ if (clearEverything || sharedPreferences.getBoolean("clear_dom_storage", true)) {
+ // Ask `WebStorage` to clear the DOM storage.
+ WebStorage webStorage = WebStorage.getInstance();
+ webStorage.deleteAllData();
+
+ // Manually delete the DOM storage directory, as `WebStorage` sometimes will not flush its changes to disk before `System.exit(0)` is run.
+ try {
+ // We have to use a `String[]` because the directory contains a space and `Runtime.exec` will not escape the string correctly otherwise.
+ privacyBrowserRuntime.exec(new String[] {"rm", "-rf", privateDataDirectoryString + "/app_webview/Local Storage/"});
+ } catch (IOException e) {
+ // Do nothing if an error is thrown.
+ }
+ }
// Clear form data.
- WebViewDatabase webViewDatabase = WebViewDatabase.getInstance(this);
- webViewDatabase.clearFormData();
+ if (clearEverything || sharedPreferences.getBoolean("clear_form_data", true)) {
+ WebViewDatabase webViewDatabase = WebViewDatabase.getInstance(this);
+ webViewDatabase.clearFormData();
- // Clear the cache. `true` includes disk files.
- mainWebView.clearCache(true);
+ // Manually delete the form data database, as `WebViewDatabase` sometimes will not flush its changes to disk before `System.exit(0)` is run.
+ try {
+ // We have to use a `String[]` because the database contains a space and `Runtime.exec` will not escape the string correctly otherwise.
+ privacyBrowserRuntime.exec(new String[] {"rm", "-f", privateDataDirectoryString + "/app_webview/Web Data"});
+ privacyBrowserRuntime.exec(new String[] {"rm", "-f", privateDataDirectoryString + "/app_webview/Web Data-journal"});
+ } catch (IOException e) {
+ // Do nothing if an error is thrown.
+ }
+ }
- // Clear the back/forward history.
- mainWebView.clearHistory();
+ // Clear the cache.
+ if (clearEverything || sharedPreferences.getBoolean("clear_cache", true)) {
+ // `true` includes disk files.
+ mainWebView.clearCache(true);
+
+ // Manually delete the cache directories.
+ try {
+ // Delete the main cache directory.
+ privacyBrowserRuntime.exec("rm -rf " + privateDataDirectoryString + "/cache");
+
+ // Delete the secondary `Service Worker` cache directory. We have to use a `String[]` because the directory contains a space and `Runtime.exec` will not escape the string correctly otherwise.
+ privacyBrowserRuntime.exec(new String[] {"rm", "-rf", privateDataDirectoryString + "/app_webview/Service Worker/"});
+ } catch (IOException e) {
+ // Do nothing if an error is thrown.
+ }
+ }
- // Clear any SSL certificate preferences.
+ // Clear SSL certificate preferences.
mainWebView.clearSslPreferences();
+ // Clear the back/forward history.
+ mainWebView.clearHistory();
+
// Clear `formattedUrlString`.
formattedUrlString = null;
// Destroy the internal state of `mainWebView`.
mainWebView.destroy();
- // Manually delete cache folders.
- try {
- // Delete the main `cache` folder.
- privacyBrowserRuntime.exec("rm -rf " + privateDataDirectoryString + "/cache");
-
- // Delete the `app_webview` folder, which contains an additional `WebView` cache. See `https://code.google.com/p/android/issues/detail?id=233826&thanks=233826&ts=1486670530`.
- privacyBrowserRuntime.exec("rm -rf " + privateDataDirectoryString + "/app_webview");
- } catch (IOException e) {
- // Do nothing if an error is thrown.
+ // Manually delete the `app_webview` folder, which contains the cookies, DOM storage, form data, and `Service Worker` cache.
+ // See `https://code.google.com/p/android/issues/detail?id=233826&thanks=233826&ts=1486670530`.
+ if (clearEverything) {
+ try {
+ privacyBrowserRuntime.exec("rm -rf " + privateDataDirectoryString + "/app_webview");
+ } catch (IOException e) {
+ // Do nothing if an error is thrown.
+ }
}
// Close Privacy Browser. `finishAndRemoveTask` also removes Privacy Browser from the recent app list.
// Remove the terminated program from RAM. The status code is `0`.
System.exit(0);
break;
-
- default:
- break;
}
// Close the navigation drawer.
}
private void applyAppSettings() {
- // Get the shared preference values. `this` references the current context.
+ // Get a handle for `sharedPreferences`. `this` references the current context.
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
// Store the values from `sharedPreferences` in variables.
final Preference fullScreenBrowsingModePreference = findPreference("full_screen_browsing_mode");
final Preference hideSystemBarsPreference = findPreference("hide_system_bars");
final Preference translucentNavigationBarPreference = findPreference("translucent_navigation_bar");
+ final Preference clearEverythingPreference = findPreference("clear_everything");
+ final Preference clearCookiesPreference = findPreference("clear_cookies");
+ final Preference clearDomStoragePreference = findPreference("clear_dom_storage");
+ final Preference clearFormDataPreference = findPreference("clear_form_data");
+ final Preference clearCachePreference = findPreference("clear_cache");
final Preference homepagePreference = findPreference("homepage");
final Preference defaultFontSizePreference = findPreference("default_font_size");
final Preference swipeToRefreshPreference = findPreference("swipe_to_refresh");
boolean proxyThroughOrbotBoolean = savedPreferences.getBoolean("proxy_through_orbot", false);
boolean fullScreenBrowsingModeBoolean = savedPreferences.getBoolean("full_screen_browsing_mode", false);
boolean hideSystemBarsBoolean = savedPreferences.getBoolean("hide_system_bars", false);
+ boolean clearEverythingBoolean = savedPreferences.getBoolean("clear_everything", true);
// Only enable `thirdPartyCookiesPreference` if `firstPartyCookiesEnabledBoolean` is `true` and API >= 21.
thirdPartyCookiesPreference.setEnabled(firstPartyCookiesEnabledBoolean && (Build.VERSION.SDK_INT >= 21));
// Enable `translucentNavigationBarPreference` only if full screen browsing mode is enabled and `hide_system_bars` is disabled.
translucentNavigationBarPreference.setEnabled(fullScreenBrowsingModeBoolean && !hideSystemBarsBoolean);
+ // Set the status of the `Clear and Exit` preferences.
+ clearCookiesPreference.setEnabled(!clearEverythingBoolean);
+ clearDomStoragePreference.setEnabled(!clearEverythingBoolean);
+ clearFormDataPreference.setEnabled(!clearEverythingBoolean);
+ clearCachePreference.setEnabled(!clearEverythingBoolean);
// Set the homepage URL as the summary text for the `Homepage` preference when the preference screen is loaded. The default is `https://duckduckgo.com`.
homepagePreference.setSummary(savedPreferences.getString("homepage", "https://duckduckgo.com"));
translucentNavigationBarPreference.setIcon(R.drawable.translucent_bar_ghosted);
}
+ // Set the `clearEverythingPreference` icon.
+ if (clearEverythingBoolean) {
+ clearEverythingPreference.setIcon(R.drawable.clear_everything_enabled);
+ } else {
+ clearEverythingPreference.setIcon(R.drawable.clear_everything_disabled);
+ }
+
+ // Set the `clearCookiesPreference` icon.
+ if (clearEverythingBoolean || savedPreferences.getBoolean("clear_cookies", true)) {
+ clearCookiesPreference.setIcon(R.drawable.cookies_cleared);
+ } else {
+ clearCookiesPreference.setIcon(R.drawable.cookies_warning);
+ }
+
+ // Set the `clearDomStoragePreference` icon.
+ if (clearEverythingBoolean || savedPreferences.getBoolean("clear_dom_storage", true)) {
+ clearDomStoragePreference.setIcon(R.drawable.dom_storage_cleared);
+ } else {
+ clearDomStoragePreference.setIcon(R.drawable.dom_storage_warning);
+ }
+
+ // Set the `clearFormDataPreference` icon.
+ if (clearEverythingBoolean || savedPreferences.getBoolean("clear_form_data", true)) {
+ clearFormDataPreference.setIcon(R.drawable.form_data_cleared);
+ } else {
+ clearFormDataPreference.setIcon(R.drawable.form_data_warning);
+ }
+
+ // Set the `clearCachePreference` icon.
+ if (clearEverythingBoolean || savedPreferences.getBoolean("clear_cache", true)) {
+ clearCachePreference.setIcon(R.drawable.cache_cleared);
+ } else {
+ clearCachePreference.setIcon(R.drawable.cache_warning);
+ }
+
// Set the `swipeToRefreshPreference` icon.
if (savedPreferences.getBoolean("swipe_to_refresh", false)) {
swipeToRefreshPreference.setIcon(R.drawable.refresh_enabled);
}
break;
+ case "clear_everything":
+ // Store the new `clear_everything` status
+ boolean newClearEverythingBoolean = sharedPreferences.getBoolean("clear_everything", true);
+
+ // Update the status of the `Clear and Exit` preferences.
+ clearCookiesPreference.setEnabled(!newClearEverythingBoolean);
+ clearDomStoragePreference.setEnabled(!newClearEverythingBoolean);
+ clearFormDataPreference.setEnabled(!newClearEverythingBoolean);
+ clearCachePreference.setEnabled(!newClearEverythingBoolean);
+
+ // Update the `clearEverythingPreference` icon.
+ if (newClearEverythingBoolean) {
+ clearEverythingPreference.setIcon(R.drawable.clear_everything_enabled);
+ } else {
+ clearEverythingPreference.setIcon(R.drawable.clear_everything_disabled);
+ }
+
+ // Update the `clearCookiesPreference` icon.
+ if (newClearEverythingBoolean || sharedPreferences.getBoolean("clear_cookies", true)) {
+ clearCookiesPreference.setIcon(R.drawable.cookies_cleared);
+ } else {
+ clearCookiesPreference.setIcon(R.drawable.cookies_warning);
+ }
+
+ // Update the `clearDomStoragePreference` icon.
+ if (newClearEverythingBoolean || sharedPreferences.getBoolean("clear_dom_storage", true)) {
+ clearDomStoragePreference.setIcon(R.drawable.dom_storage_cleared);
+ } else {
+ clearDomStoragePreference.setIcon(R.drawable.dom_storage_warning);
+ }
+
+ // Update the `clearFormDataPreference` icon.
+ if (newClearEverythingBoolean || sharedPreferences.getBoolean("clear_form_data", true)) {
+ clearFormDataPreference.setIcon(R.drawable.form_data_cleared);
+ } else {
+ clearFormDataPreference.setIcon(R.drawable.form_data_warning);
+ }
+
+ // Update the `clearCachePreference` icon.
+ if (newClearEverythingBoolean || sharedPreferences.getBoolean("clear_cache", true)) {
+ clearCachePreference.setIcon(R.drawable.cache_cleared);
+ } else {
+ clearCachePreference.setIcon(R.drawable.cache_warning);
+ }
+ break;
+
+ case "clear_cookies":
+ // Update the icon.
+ if (sharedPreferences.getBoolean("clear_cookies", true)) {
+ clearCookiesPreference.setIcon(R.drawable.cookies_cleared);
+ } else {
+ clearCookiesPreference.setIcon(R.drawable.cookies_warning);
+ }
+ break;
+
+ case "clear_dom_storage":
+ // Update the icon.
+ if (sharedPreferences.getBoolean("clear_dom_storage", true)) {
+ clearDomStoragePreference.setIcon(R.drawable.dom_storage_cleared);
+ } else {
+ clearDomStoragePreference.setIcon(R.drawable.dom_storage_warning);
+ }
+ break;
+
+ case "clear_form_data":
+ // Update the icon.
+ if (sharedPreferences.getBoolean("clear_form_data", true)) {
+ clearFormDataPreference.setIcon(R.drawable.form_data_cleared);
+ } else {
+ clearFormDataPreference.setIcon(R.drawable.form_data_warning);
+ }
+ break;
+
+ case "clear_cache":
+ // Update the icon.
+ if (sharedPreferences.getBoolean("clear_cache", true)) {
+ clearCachePreference.setIcon(R.drawable.cache_cleared);
+ } else {
+ clearCachePreference.setIcon(R.drawable.cache_warning);
+ }
+ break;
+
case "homepage":
// Set the new homepage URL as the summary text for the Homepage preference. The default is `https://www.duckduckgo.com`.
homepagePreference.setSummary(sharedPreferences.getString("homepage", "https://www.duckduckgo.com"));
--- /dev/null
+<!-- `cache_cleared.xml` comes from the Android Material icon set, where it is called `ic_donut_small`. It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:autoMirrored="true"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ tools:ignore="VectorRaster" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use `@color`. -->
+ <path
+ android:fillColor="#FF1565C0"
+ android:pathData="M11,9.16V2c-5,0.5 -9,4.79 -9,10s4,9.5 9,10v-7.16c-1,-0.41 -2,-1.52 -2,-2.84s1,-2.43 2,-2.84zM14.86,11H22c-0.48,-4.75 -4,-8.53 -9,-9v7.16c1,0.3 1.52,0.98 1.86,1.84zM13,14.84V22c5,-0.47 8.52,-4.25 9,-9h-7.14c-0.34,0.86 -0.86,1.54 -1.86,1.84z"/>
+</vector>
--- /dev/null
+<!-- `cache_cleared.xml` comes from the Android Material icon set, where it is called `ic_donut_small`. It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:autoMirrored="true"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ tools:ignore="VectorRaster" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use `@color`. -->
+ <path
+ android:fillColor="#FFD50000"
+ android:pathData="M11,9.16V2c-5,0.5 -9,4.79 -9,10s4,9.5 9,10v-7.16c-1,-0.41 -2,-1.52 -2,-2.84s1,-2.43 2,-2.84zM14.86,11H22c-0.48,-4.75 -4,-8.53 -9,-9v7.16c1,0.3 1.52,0.98 1.86,1.84zM13,14.84V22c5,-0.47 8.52,-4.25 9,-9h-7.14c-0.34,0.86 -0.86,1.54 -1.86,1.84z"/>
+</vector>
--- /dev/null
+<!-- `clear_everything_disabled.xml` comes from the Android Material icon set, where it is called `ic_delete_forever`. It is released under the Apache License 2.0. -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use `@color`. -->
+ <path
+ android:fillColor="#FFD50000"
+ android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"/>
+</vector>
--- /dev/null
+<!-- `clear_everything_enabled.xml` comes from the Android Material icon set, where it is called `ic_delete_forever`. It is released under the Apache License 2.0. -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="24dp"
+ android:width="24dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use `@color`. -->
+ <path
+ android:fillColor="#FF1565C0"
+ android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"/>
+</vector>
--- /dev/null
+<!-- `cookies_cleared.xml` was created by Google and downloaded from <https://materialdesignicons.com/icon/cookie>. It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:height="26dp"
+ android:width="26dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:autoMirrored="true"
+ tools:ignore="VectorRaster" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use `@color`. -->
+ <path
+ android:fillColor="#FF1565C0"
+ android:pathData="M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A9,9 0 0,0 21,12C21,11.5 20.96,11 20.87,10.5C20.6,10 20,10 20,10H18V9C18,8 17,8 17,8H15V7C15,6 14,6 14,6H13V4C13,3 12,3 12,3M9.5,6A1.5,1.5 0 0,1 11,7.5A1.5,1.5 0 0,1 9.5,9A1.5,1.5 0 0,1 8,7.5A1.5,1.5 0 0,1 9.5,6M6.5,10A1.5,1.5 0 0,1 8,11.5A1.5,1.5 0 0,1 6.5,13A1.5,1.5 0 0,1 5,11.5A1.5,1.5 0 0,1 6.5,10M11.5,11A1.5,1.5 0 0,1 13,12.5A1.5,1.5 0 0,1 11.5,14A1.5,1.5 0 0,1 10,12.5A1.5,1.5 0 0,1 11.5,11M16.5,13A1.5,1.5 0 0,1 18,14.5A1.5,1.5 0 0,1 16.5,16H16.5A1.5,1.5 0 0,1 15,14.5H15A1.5,1.5 0 0,1 16.5,13M11,16A1.5,1.5 0 0,1 12.5,17.5A1.5,1.5 0 0,1 11,19A1.5,1.5 0 0,1 9.5,17.5A1.5,1.5 0 0,1 11,16Z" />
+</vector>
\ No newline at end of file
--- /dev/null
+<!-- `dom_storage_cleared.xml` comes from the Android Material icon set, where it is called `ic_web`. It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:height="26dp"
+ android:width="26dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:autoMirrored="true"
+ tools:ignore="VectorRaster" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use `@color`. -->
+ <path
+ android:fillColor="#FF1565C0"
+ android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM15,18L4,18v-4h11v4zM15,13L4,13L4,9h11v4zM20,18h-4L16,9h4v9z"/>
+</vector>
--- /dev/null
+<!-- `dom_storage_cleared.xml` comes from the Android Material icon set, where it is called `ic_web`. It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:height="26dp"
+ android:width="26dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:autoMirrored="true"
+ tools:ignore="VectorRaster" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use `@color`. -->
+ <path
+ android:fillColor="#FFD50000"
+ android:pathData="M20,4L4,4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM15,18L4,18v-4h11v4zM15,13L4,13L4,9h11v4zM20,18h-4L16,9h4v9z"/>
+</vector>
--- /dev/null
+<!-- `form_data_cleared.xml` comes from the Android Material icon set, where it is called `ic_subtitles`. It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:height="26dp"
+ android:width="26dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:autoMirrored="true"
+ tools:ignore="VectorRaster">
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use `@color`. -->
+ <path
+ android:fillColor="#FF1565C0"
+ android:pathData="M20,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM4,12h4v2L4,14v-2zM14,18L4,18v-2h10v2zM20,18h-4v-2h4v2zM20,14L10,14v-2h10v2z"/>
+</vector>
--- /dev/null
+<!-- `form_data_warning.xml` comes from the Android Material icon set, where it is called `ic_subtitles`. It is released under the Apache License 2.0. -->
+
+<!-- `tools:ignore="VectorRaster"` removes the lint warning about `android:autoMirrored="true"` not applying to API < 21. -->
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools"
+ android:height="26dp"
+ android:width="26dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:autoMirrored="true"
+ tools:ignore="VectorRaster">
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use `@color`. -->
+ <path
+ android:fillColor="#FFD50000"
+ android:pathData="M20,4L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,6c0,-1.1 -0.9,-2 -2,-2zM4,12h4v2L4,14v-2zM14,18L4,18v-2h10v2zM20,18h-4v-2h4v2zM20,14L10,14v-2h10v2z"/>
+</vector>
<string name="hide_system_bars_summary">Hide the status and navigation bars in full screen browsing mode. This doesn’t work well if the keyboard is displayed during full screen browsing mode.</string>
<string name="translucent_navigation_bar">Translucent navigation bar</string>
<string name="translucent_navigation_bar_summary">Make the navigation bar translucent in full screen browsing mode.</string>
+ <string name="clear_everything">Clear everything</string>
+ <string name="clear_everything_summary">Clear cookies, DOM storage, form data, and the cache. Then manually delete the entire “app_webview” and “cache” directories.</string>
+ <string name="clear_cookies_preference">Clear cookies</string>
+ <string name="clear_cookies_summary">Clears first and third-party cookies.</string>
+ <string name="clear_dom_storage_preference">Clear DOM storage</string>
+ <string name="clear_dom_storage_summary">Clear DOM storage.</string>
+ <string name="clear_form_data_preference">Clear form data</string>
+ <string name="clear_form_data_summary">Clears form data.</string>
+ <string name="clear_cache">Clear cache</string>
+ <string name="clear_cache_summary">Clear WebView’s cache.</string>
<string name="general">General</string>
<string name="homepage">Homepage</string>
<string name="default_font_size">Default font size</string>
<PreferenceCategory
android:key="search_category"
- android:title="@string/search">
+ android:title="@string/search" >
<ListPreference
android:key="search"
<PreferenceCategory
android:key="full_screen"
- android:title="@string/full_screen">
+ android:title="@string/full_screen" >
<SwitchPreference
android:key="full_screen_browsing_mode"
android:defaultValue="true" />
</PreferenceCategory>
+ <PreferenceCategory
+ android:key="clean_and_exit"
+ android:title="@string/clear_and_exit" >
+
+ <SwitchPreference
+ android:key="clear_everything"
+ android:title="@string/clear_everything"
+ android:summary="@string/clear_everything_summary"
+ android:defaultValue="true" />
+
+ <SwitchPreference
+ android:key="clear_cookies"
+ android:title="@string/clear_cookies_preference"
+ android:summary="@string/clear_cookies_summary"
+ android:defaultValue="true" />
+
+ <SwitchPreference
+ android:key="clear_dom_storage"
+ android:title="@string/clear_dom_storage_preference"
+ android:summary="@string/clear_dom_storage_summary"
+ android:defaultValue="true" />
+
+ <SwitchPreference
+ android:key="clear_form_data"
+ android:title="@string/clear_form_data_preference"
+ android:summary="@string/clear_form_data_summary"
+ android:defaultValue="true" />
+
+ <SwitchPreference
+ android:key="clear_cache"
+ android:title="@string/clear_cache"
+ android:summary="@string/clear_cache_summary"
+ android:defaultValue="true" />
+ </PreferenceCategory>
+
<PreferenceCategory
android:key="general"
android:title="@string/general" >