+
+ // Update the toggleJavaScript icon and display a toast message.
+ if (domStorageEnabled || cookiesEnabled) {
+ menuItem.setIcon(R.drawable.warning_on);
+ if (domStorageEnabled && cookiesEnabled) {
+ Toast.makeText(getApplicationContext(), "JavaScript disabled, DOM Storage and Cookies still enabled", Toast.LENGTH_SHORT).show();
+ } else {
+ if (domStorageEnabled) {
+ Toast.makeText(getApplicationContext(), "JavaScript disabled, DOM Storage still enabled", Toast.LENGTH_SHORT).show();
+ } else {
+ Toast.makeText(getApplicationContext(), "JavaScript disabled, Cookies still enabled", Toast.LENGTH_SHORT).show();
+ }
+ }
+ } else {
+ menuItem.setIcon(R.drawable.privacy_mode);
+ Toast.makeText(getApplicationContext(), "Privacy Mode", Toast.LENGTH_SHORT).show();
+ }