// `webViewTitle` is public static so it can be accessed from `CreateBookmarkDialog` and `CreateHomeScreenShortcutDialog`. It is also used in `onCreate()`.
public static String webViewTitle;
- // `displayWebpageImagesBoolean` is public static so it can be accessed from `DomainSettingsFragment`. It is also used in `applyAppSettings` and `applyDomainSettings()`.
+ // `displayWebpageImagesBoolean` is public static so it can be accessed from `DomainSettingsFragment`. It is also used in `applyAppSettings()` and `applyDomainSettings()`.
public static boolean displayWebpageImagesBoolean;
+ // `reloadOnRestartBoolean` is public static so it can be accessed from `SettingsFragment`. It is also used in `onRestart()`
+ public static boolean reloadOnRestartBoolean;
+
// `navigatingHistory` is used in `onCreate()`, `onNavigationItemSelected()`, and `applyDomainSettings()`.
private boolean navigatingHistory;
// `onTheFlyDisplayImagesSet` is used in `applyDomainSettings()` and `setDisplayWebpageImages()`.
private boolean onTheFlyDisplayImagesSet;
- // `loadingNewIntentBoolean` is used in `onNewIntent()` and `onRestart()`.
- private boolean loadingNewIntentBoolean;
-
// `waitingForOrbotData` is used in `onCreate()` and `applyAppSettings()`.
private String waitingForOrbotHTMLString;
@Override
protected void onNewIntent(Intent intent) {
- // Set `loadingNewIntentBoolean`.
- loadingNewIntentBoolean = true;
-
// Sets the new intent as the activity intent, so that any future `getIntent()`s pick up this one instead of creating a new activity.
setIntent(intent);
// Set the display webpage images mode.
setDisplayWebpageImages();
- // Only reload `mainWebView` if not loading a new intent and not waiting for Orbot.
- if (!loadingNewIntentBoolean && !waitingForOrbot) {
- // Reload the webpage to remove images if `setDisplayWebpageImages` has turned them off.
+ // Reload the webpage if displaying of images has been disabled in `SettingsFragment`.
+ if (reloadOnRestartBoolean) {
+ // Reload `mainWebView`.
mainWebView.reload();
- } else if (loadingNewIntentBoolean) { // Reset `loadingNewIntentBoolean` if this run comes from a new intent.
- loadingNewIntentBoolean = false;
+
+ // Reset `reloadOnRestartBoolean`.
+ reloadOnRestartBoolean = false;
}
}
import android.webkit.WebView;
import com.stoutner.privacybrowser.R;
+import com.stoutner.privacybrowser.activities.MainWebViewActivity;
public class SettingsFragment extends PreferenceFragment {
private SharedPreferences.OnSharedPreferenceChangeListener preferencesListener;
break;
case "display_webpage_images":
- // Update the icon.
if (sharedPreferences.getBoolean("display_webpage_images", true)) {
+ // Update the icon.
displayWebpageImagesPreference.setIcon(R.drawable.images_enabled);
+
+ // `mainWebView` does not need to be reloaded because unloaded images will load automatically.
+ MainWebViewActivity.reloadOnRestartBoolean = false;
} else {
+ // Update the icon.
displayWebpageImagesPreference.setIcon(R.drawable.images_disabled);
+
+ // Set `mainWebView` to reload on restart to remove the current images.
+ MainWebViewActivity.reloadOnRestartBoolean = true;
}
break;
<string name="dom_storage_disabled">Almacenamiento DOM deshabilitado</string>
<string name="form_data_enabled">Datos de formulario habilitados</string>
<string name="form_data_disabled">Datos de fromulario deshabilitados</string>
- <string name="cookies_deleted">Cookies eliminadas</string>
- <string name="dom_storage_deleted">Almacenamiento DOM eliminado</string>
- <string name="form_data_deleted">Datos de formulario eliminados</string>
+ <string name="cookies_deleted">Cookies borradas</string>
+ <string name="dom_storage_deleted">Almacenamiento DOM borrado</string>
+ <string name="form_data_deleted">Datos de formulario borrado</string>
<string name="open_navigation_drawer">Abrir la caja de navegación</string>
<string name="close_navigation_drawer">Cerrar la caja de navegación</string>
<string name="no_title">Sin título</string>
<string name="back">Atrás</string>
<string name="forward">Adelante</string>
<string name="history">Historial</string>
- <string name="clear_history">Eliminar historial</string>
+ <string name="clear_history">Borrar historial</string>
<string name="bookmarks">Marcadores</string>
<string name="downloads">Descargas</string>
<string name="settings">Configuración</string>
<string name="guide">Guía</string>
<string name="about">Acerca de</string>
- <string name="clear_and_exit">Eliminar y salir</string>
+ <string name="clear_and_exit">Borrar y salir</string>
<!-- MainWebViewActivity Options Menu. -->
<string name="javascript">Javascript</string>
<string name="third_party_cookies">Cookies de terceras partes</string>
<string name="dom_storage">Almacenamiento DOM</string>
<string name="form_data">Datos de formulario</string>
- <string name="clear_cookies">Eliminar cookies</string>
- <string name="clear_dom_storage">Eliminar almacenamiento DOM</string>
+ <string name="clear_cookies">Borrar cookies</string>
+ <string name="clear_dom_storage">Borrar almacenamiento DOM</string>
<string name="clear_form_data">Borrar datos de formulario</string>
<string name="font_size">Tamaño de fuente</string>
<string name="twenty_five_percent">25%</string>
<string name="move_up">Subir</string>
<string name="move_down">Bajar</string>
<string name="edit">Editar</string>
- <string name="delete">Eliminar</string>
+ <string name="delete">Borrar</string>
<string name="select_all">Selectionar todo</string>
- <string name="one_bookmark_deleted">1 marcador eliminado</string>
- <string name="bookmarks_deleted">Marcadores eliminados</string>
+ <string name="one_bookmark_deleted">1 marcador borrado</string>
+ <string name="bookmarks_deleted">Marcadores borrados</string>
<string name="undo">Deshacer</string>
<!-- Bookmarks Database View. -->
<string name="add">Añadir</string>
<string name="domain_name">Nombre de dominio</string>
<string name="domain_settings_saved">Configuración de dominio guardada</string>
- <string name="domain_deleted">Dominio eliminado</string>
+ <string name="domain_deleted">Dominio borrado</string>
<string name="domain_name_instructions">*. puede ser añadido a un dominio para incluir todos los subdominios (p.ej. *.stoutner.com)</string>
<string-array name="display_website_images_array">
<item>Por defecto del sistema</item>
<string name="hide_system_bars_summary">Esconder las barras de estado y de navegación en el modo de navegación a pantalla completa. Esto no funciona bien si el teclado es mostrado durante el modo de navegación a pantalla completa.</string>
<string name="translucent_navigation_bar">Barra de navegación translúcida</string>
<string name="translucent_navigation_bar_summary">Hacer la barra de navegación translúcida en el modo de navegación a pantalla completa.</string>
+ <string name="clear_everything">Borrar todo</string>
+ <string name="clear_everything_summary">Borra cookies, almacenamiento DOM, datos de formulario y la caché de WebView. A continuación borra manualmente los directorios “app_webview” y “cache”.</string>
+ <string name="clear_cookies_preference">Borrar cookies</string>
+ <string name="clear_cookies_summary">Borra las cookies de primera y terceras partes.</string>
+ <string name="clear_dom_storage_preference">Borrar almacenamiento DOM</string>
+ <string name="clear_dom_storage_summary">Borra el almacenamiento DOM.</string>
+ <string name="clear_form_data_preference">Borrar datos de formulario</string>
+ <string name="clear_form_data_summary">Borra los datos de formulario.</string>
+ <string name="clear_cache">Borrar caché</string>
+ <string name="clear_cache_summary">Borra la caché de WebView’.</string>
<string name="general">General</string>
<string name="homepage">Página de inicio</string>
<string name="default_font_size">Tamaño de fuente por defecto</string>
<string name="hide_system_bars_summary">Nasconde la barra di stato e la barra di navigazione durante la navigazione a schermo intero. Questa opzione non funziona perfettamente se si visualizza la tastiera durante la navigazione a schermo intero.</string>
<string name="translucent_navigation_bar">Barra di navigazione trasparente</string>
<string name="translucent_navigation_bar_summary">Rende la barra di navigazione trasparente durante la navigazione a schermo intero.</string>
+ <string name="clear_everything">Elimina tutto</string>
+ <string name="clear_everything_summary">Cancella i cookies, il DOM storage, i dati dei moduli e la cache di WebView. Cancella completamente le cartelle “app_webview” e “cache”.</string>
+ <string name="clear_cookies_preference">Elimina i cookie</string>
+ <string name="clear_cookies_summary">Cancella solo i cookie proprietari e di terze parti.</string>
+ <string name="clear_dom_storage_preference">Elimina il DOM storage</string>
+ <string name="clear_dom_storage_summary">Cancella solo il DOM storage.</string>
+ <string name="clear_form_data_preference">Elimina i dati dei moduli</string>
+ <string name="clear_form_data_summary">Cancella solo i dati dei moduli.</string>
+ <string name="clear_cache">Elimina la cache</string>
+ <string name="clear_cache_summary">Cancella solo la cache di WebView.</string>
<string name="general">Generale</string>
<string name="homepage">Homepage</string>
<string name="default_font_size">Dimensione standard carattere</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_everything_summary">Clears cookies, DOM storage, form data, and WebView’s cache. Then manually deletes 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_dom_storage_summary">Clears 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="clear_cache_summary">Clears WebView’s cache.</string>
<string name="general">General</string>
<string name="homepage">Homepage</string>
<string name="default_font_size">Default font size</string>