private boolean adBlockerEnabled;
// `privacyBrowserRuntime` is used in `onCreate()` and `applyAppSettings()`.
- Runtime privacyBrowserRuntime;
+ private Runtime privacyBrowserRuntime;
// `incognitoModeEnabled` is used in `onCreate()` and `applyAppSettings()`.
private boolean incognitoModeEnabled;
// `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);
+
+ if (intent.getData() != null) {
+ // Get the intent data and convert it to a string.
+ final Uri intentUriData = intent.getData();
+ formattedUrlString = intentUriData.toString();
+ }
+
+ // Close the navigation drawer if it is open.
+ if (drawerLayout.isDrawerVisible(GravityCompat.START)) {
+ drawerLayout.closeDrawer(GravityCompat.START);
+ }
+
+ // Load the website.
+ loadUrl(formattedUrlString);
+
+ // Clear the keyboard if displayed and remove the focus on the urlTextBar if it has it.
+ mainWebView.requestFocus();
+ }
+
@Override
public void onRestart() {
super.onRestart();
// Set the display webpage images mode.
setDisplayWebpageImages();
- // Reload the webpage to remove images if `setDisplayWebpageImages` has turned them off.
- mainWebView.reload();
+ // Only reload `mainWebView` if not loading a new intent.
+ if (!loadingNewIntentBoolean) {
+ // Reload the webpage to remove images if `setDisplayWebpageImages` has turned them off.
+ mainWebView.reload();
+ } else {
+ // Reset `loadingNewIntentBoolean`.
+ loadingNewIntentBoolean = false;
+ }
}
// `onResume()` runs after `onStart()`, which runs after `onCreate()` and `onRestart()`.
super.onPause();
}
- @Override
- protected void onNewIntent(Intent intent) {
- // 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);
-
- if (intent.getData() != null) {
- // Get the intent data and convert it to a string.
- final Uri intentUriData = intent.getData();
- formattedUrlString = intentUriData.toString();
- }
-
- // Close the navigation drawer if it is open.
- if (drawerLayout.isDrawerVisible(GravityCompat.START)) {
- drawerLayout.closeDrawer(GravityCompat.START);
- }
-
- // Load the website.
- loadUrl(formattedUrlString);
-
- // Clear the keyboard if displayed and remove the focus on the urlTextBar if it has it.
- mainWebView.requestFocus();
- }
-
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
<string name="url">URL</string>
<string name="url_label">URL:</string>
- <!-- MainWebView Navigation Drawer. -->
+ <!-- MainWebViewActivity Navigation Drawer. -->
<string name="navigation_drawer">Navigationspanel</string>
<string name="navigation">Navigation</string>
<string name="home">Startseite</string>
<string name="about">Infos</string>
<string name="clear_and_exit">Leeren und verlassen</string>
- <!-- MainWebView Options Menu. -->
+ <!-- MainWebViewActivity Options Menu. -->
<string name="javascript">JavaScript</string>
<string name="first_party_cookies">Erstanbieter-Cookies</string>
<string name="third_party_cookies">Drittanbieter-Cookies</string>
<string name="one_hundred_fifty_percent">150%</string>
<string name="one_hundred_seventy_five_percent">175%</string>
<string name="two_hundred_percent">200%</string>
+ <string name="display_images">Mostrar imágenes</string>
<string name="find_on_page">Buscar en página</string>
<string name="share">Compartir</string>
<string name="add_to_home_screen">Añadir a la ventana de inicio</string>
<string name="domain_settings_saved">Configuración de dominio guardada</string>
<string name="domain_deleted">Dominio eliminado</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>
+ <item>Imágenes habilitadas</item>
+ <item>Imágenes deshabilitadas</item>
+ </string-array>
<!-- Guide. -->
<string name="privacy_browser_guide">Guía de Navegador Privado</string>
<string name="swipe_to_refresh_enabled_summary">Algunas webs no funcionan bien si la opción deslizar para actualizar está habilitada.</string>
<string name="display_additional_app_bar_icons">Mostrar iconos adicionales en la barra de aplicación</string>
<string name="display_additional_app_bar_icons_summary">Mostrar iconos para alternar entre cookies, almacenamiento DOM, y datos de formulario en la barra de aplicación, si hay espacio.</string>
+ <string name="display_webpage_images">Mostrar imágenes de la página web</string>
+ <string name="display_webpage_images_summary">Deshabilitar para conservar ancho de banda.</string>
<!-- Orbot. -->
<string name="orbot_proxy_not_installed">Enviar a través de Orbot no funcionará a menos que se instale Orbot.</string>
<string name="url">URL</string>
<string name="url_label">URL:</string>
- <!-- MainWebView Navigation Drawer. -->
+ <!-- MainWebViewActivity Navigation Drawer. -->
<string name="navigation_drawer">Menù di navigazione</string>
<string name="navigation">Navigazione</string>
<string name="home">Home</string>
<string name="about">Informazioni</string>
<string name="clear_and_exit">Elimina dati ed esci</string>
- <!-- MainWebView Options Menu. -->
+ <!-- MainWebViewActivity Options Menu. -->
<string name="javascript">JavaScript</string>
<string name="first_party_cookies">Cookies proprietari</string>
<string name="third_party_cookies">Cookies di terze parti</string>
- <string name="dom_storage">DOM Storage</string>
+ <string name="dom_storage">DOM storage</string>
<string name="form_data">Dati dei moduli</string>
- <string name="clear_cookies">Elimina Cookies</string>
- <string name="clear_dom_storage">Elimina DOM Storage</string>
+ <string name="clear_cookies">Elimina cookies</string>
+ <string name="clear_dom_storage">Elimina DOM storage</string>
<string name="clear_form_data">Elimina dati dei moduli</string>
- <string name="font_size">Dimensione Font</string>
+ <string name="font_size">Dimensione font</string>
<string name="twenty_five_percent">25%</string>
<string name="fifty_percent">50%</string>
<string name="seventy_five_percent">75%</string>
<string name="one_hundred_fifty_percent">150%</string>
<string name="one_hundred_seventy_five_percent">175%</string>
<string name="two_hundred_percent">200%</string>
+ <string name="display_images">Mostra immagini</string>
<string name="find_on_page">Cerca nella pagina</string>
<string name="share">Condividi</string>
<string name="add_to_home_screen">Aggiungi collegamento</string>
<string name="print">Stampa</string>
- <string name="privacy_browser_web_page">Pagina Web di Privacy Browser</string>
+ <string name="privacy_browser_web_page">Pagina web di Privacy Browser</string>
<string name="refresh">Aggiorna</string>
<!-- Context Menus. -->
<string name="domain_settings_saved">Impostazioni Domini Salvate</string>
<string name="domain_deleted">Dominio Eliminato</string>
<string name="domain_name_instructions">è possibile anteporre *. a un dominio per includere tutti i sottodomini (es. *.stoutner.com)</string>
+ <string-array name="display_website_images_array">
+ <item>Impostazioni di default</item>
+ <item>Abilita Immagini</item>
+ <item>Disabilita Immagini</item>
+ </string-array>
<!-- Guide. -->
<string name="privacy_browser_guide">Guida di Privacy Browser</string>
<string name="swipe_to_refresh_enabled_summary">Alcuni siti non funzionano correttamente se questa opzione è abilitata.</string>
<string name="display_additional_app_bar_icons">Mostra icone addizionali nella barra dell\'applicazione</string>
<string name="display_additional_app_bar_icons_summary">Mostra le icone per l\'abilitazione dei cookies, del DOM storage, e dei dati dei moduli nella barra dell\'applicazione se c\'è spazio disponibile.</string>
+ <string name="display_webpage_images">Mostra immagini delle pagine web</string>
+ <string name="display_webpage_images_summary">Disabilita per ridurre il consumo di dati.</string>
<!-- Orbot. -->
<string name="orbot_proxy_not_installed">Il Proxy con Orbot funziona solo se è installato Orbot.</string>
<string name="url">URL</string>
<string name="url_label">URL:</string>
- <!-- MainWebView Navigation Drawer. -->
+ <!-- MainWebViewActivity Navigation Drawer. -->
<string name="navigation_drawer">Navigation Drawer</string>
<string name="navigation">Navigation</string>
<string name="home">Home</string>
<string name="about">About</string>
<string name="clear_and_exit">Clear and Exit</string>
- <!-- MainWebView Options Menu. -->
+ <!-- MainWebViewActivity Options Menu. -->
<string name="javascript">JavaScript</string>
<string name="first_party_cookies">First-Party Cookies</string>
<string name="third_party_cookies">Third-Party Cookies</string>
<string name="one_hundred_fifty_percent">150%</string>
<string name="one_hundred_seventy_five_percent">175%</string>
<string name="two_hundred_percent">200%</string>
+ <string name="display_images">Display Images</string>
<string name="find_on_page">Find on Page</string>
<string name="share">Share</string>
<string name="add_to_home_screen">Add to Home Screen</string>
<string name="domain_settings_saved">Domain settings saved</string>
<string name="domain_deleted">Domain deleted</string>
<string name="domain_name_instructions">*. may be prepended to a domain to include all subdomains (eg. *.stoutner.com)</string>
+ <string-array name="display_website_images_array">
+ <item>System default</item>
+ <item>Images enabled</item>
+ <item>Images disabled</item>
+ </string-array>
<!-- Guide. -->
<string name="privacy_browser_guide">Privacy Browser Guide</string>
<string name="swipe_to_refresh_enabled_summary">Some websites don\'t work well if swipe to refresh is enabled.</string>
<string name="display_additional_app_bar_icons">Display additional app bar icons</string>
<string name="display_additional_app_bar_icons_summary">Display icons for toggling cookies, DOM storage, and form data in the app bar if there is room.</string>
+ <string name="display_webpage_images">Display webpage images</string>
+ <string name="display_webpage_images_summary">Disable to conserve bandwidth.</string>
<!-- Orbot. -->
<string name="orbot_proxy_not_installed">Orbot proxy will not work unless Orbot is installed.</string>
<string name="url">URL</string>
<string name="url_label">URL:</string>
- <!-- MainWebView Navigation Drawer. -->
+ <!-- MainWebViewActivity Navigation Drawer. -->
<string name="navigation_drawer">Navigation Drawer</string>
<string name="navigation">Navigation</string>
<string name="home">Home</string>
<string name="about">About</string>
<string name="clear_and_exit">Clear and Exit</string>
- <!-- MainWebView Options Menu. -->
+ <!-- MainWebViewActivity Options Menu. -->
<string name="javascript">JavaScript</string>
<string name="first_party_cookies">First-Party Cookies</string>
<string name="third_party_cookies">Third-Party Cookies</string>