android:allowBackup="false"
android:fullBackupContent="false" >
- <!-- If `android:name="android.webkit.WebView.MetricsOptOut"` is not `true` then WebViews will upload metrics to Google.
+ <!-- If `android:name="android.webkit.WebView.MetricsOptOut"` is not `true` then `WebViews` will upload metrics to Google.
https://developer.android.com/reference/android/webkit/WebView.html -->
<meta-data
android:name="android.webkit.WebView.MetricsOptOut"
android:label="@string/privacy_browser"
android:configChanges="orientation|screenSize"
android:launchMode="singleTask"
+ android:screenOrientation="fullUser"
android:persistableMode="persistNever" >
<intent-filter>
android:theme="@style/PrivacyBrowser.SecondaryActivity"
android:parentActivityName=".MainWebViewActivity"
android:configChanges="orientation|screenSize"
+ android:screenOrientation="fullUser"
android:persistableMode="persistNever" />
<!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
android:theme="@style/PrivacyBrowser.SecondaryActivity"
android:parentActivityName=".BookmarksActivity"
android:configChanges="orientation|screenSize"
+ android:screenOrientation="fullUser"
android:persistableMode="persistNever" />
<!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
android:theme="@style/Settings"
android:parentActivityName=".MainWebViewActivity"
android:configChanges="orientation|screenSize"
+ android:screenOrientation="fullUser"
android:persistableMode="persistNever" />
<!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
android:theme="@style/PrivacyBrowser.SecondaryActivity"
android:parentActivityName=".MainWebViewActivity"
android:configChanges="orientation|screenSize"
+ android:screenOrientation="fullUser"
android:persistableMode="persistNever" />
<!-- `android:configChanges="orientation|screenSize"` makes the activity not reload when the orientation changes.
android:theme="@style/PrivacyBrowser.SecondaryActivity"
android:parentActivityName=".MainWebViewActivity"
android:configChanges="orientation|screenSize"
+ android:screenOrientation="fullUser"
android:persistableMode="persistNever" />
</application>
</manifest>
<body>
<h3>1.9.1 (version code 11)</h3>
-<p>27 August 2016 - minimum API 19, target API 23</p>
+<p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=6de831ce03c8b9114212870715c6c722e26f5b28">27 August 2016</a> - minimum API 19, target API 23</p>
<ul>
- <li>Changed asset image links to relative paths so Privacy Browser will build of F-Droid.</li>
+ <li>Changed asset image links to relative paths so Privacy Browser will build on F-Droid.</li>
</ul>
<h3>1.9 (version code 10)</h3>
import android.preference.PreferenceManager;
import android.support.design.widget.NavigationView;
import android.support.design.widget.Snackbar;
+import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.GravityCompat;
import android.support.v4.widget.DrawerLayout;
// It is also used in `onCreate()` and `onCreateHomeScreenShortcutCreate()`.
public static Bitmap favoriteIcon;
+ // `privacyBrowserActivity` is public static so it can be accessed from `SettingsFragment`.
+ // It is also used in `onCreate()`, `onCreateOptionsMenu()`, and `onOptionsItemSelected()`,
+ public static Activity privacyBrowserActivity;
+
// `mainWebView` is public static so it can be accessed from `SettingsFragment`.
// It is also used in `onCreate()`, `onOptionsItemSelected()`, `onNavigationItemSelected()`, and `loadUrlFromTextBox()`.
public static WebView mainWebView;
// It is also used in `onCreate()`, `onCreateOptionsMenu()`, `onPrepareOptionsMenu()`, and `onOptionsItemSelected()`.
public static boolean firstPartyCookiesEnabled;
- // `thirdPartyCookiesEnabled` is used in `onCreate()`, `onCreateOptionsMenu()`, `onPrepareOptionsMenu()`, and `onOptionsItemSelected()`.
+ // `thridPartyCookiesEnables` is public static so it can be accessed from `SettingsFragment`.
+ // It is also used in `onCreate()`, `onCreateOptionsMenu()`, `onPrepareOptionsMenu()`, and `onOptionsItemSelected()`.
public static boolean thirdPartyCookiesEnabled;
// `domStorageEnabled` is public static so it can be accessed from `SettingsFragment`. It is also used in `onCreate()`, `onCreateOptionsMenu()`, and `onOptionsItemSelected()`.
// `drawerLayout` is used in `onCreate()`, `onNewIntent()`, and `onBackPressed()`.
private DrawerLayout drawerLayout;
- // `privacyIcon` is used in `onCreateOptionsMenu()` and `updatePrivacyIcon()`.
- private MenuItem privacyIcon;
-
// `urlTextBox` is used in `onCreate()`, `onOptionsItemSelected()`, and `loadUrlFromTextBox()`.
private EditText urlTextBox;
super.onCreate(savedInstanceState);
setContentView(R.layout.main_coordinatorlayout);
+ // We need a handle for the activity, which is accessed from `SettingsFragment` and fed into `updatePrivacyIcons()`.
+ privacyBrowserActivity = this;
+
// We need to use the SupportActionBar from android.support.v7.app.ActionBar until the minimum API is >= 21.
Toolbar supportAppBar = (Toolbar) findViewById(R.id.appBar);
setSupportActionBar(supportAppBar);
// Set mainMenu so it can be used by onOptionsItemSelected.
mainMenu = menu;
- // Initialize privacyIcon
- privacyIcon = menu.findItem(R.id.toggleJavaScript);
-
// Set the initial status of the privacy icon.
- updatePrivacyIcon();
+ updatePrivacyIcons(privacyBrowserActivity);
// Get MenuItems for checkable menu items.
MenuItem toggleFirstPartyCookies = menu.findItem(R.id.toggleFirstPartyCookies);
mainWebView.getSettings().setJavaScriptEnabled(javaScriptEnabled);
// Update the privacy icon.
- updatePrivacyIcon();
+ updatePrivacyIcons(privacyBrowserActivity);
- // Display a Snackbar.
+ // Display a `Snackbar`.
if (javaScriptEnabled) {
Snackbar.make(findViewById(R.id.mainWebView), R.string.javascript_enabled, Snackbar.LENGTH_SHORT).show();
} else {
cookieManager.setAcceptCookie(firstPartyCookiesEnabled);
// Update the privacy icon.
- updatePrivacyIcon();
+ updatePrivacyIcons(privacyBrowserActivity);
+
+ // Display a `Snackbar`.
+ if (firstPartyCookiesEnabled) {
+ Snackbar.make(findViewById(R.id.mainWebView), R.string.first_party_cookies_enabled, Snackbar.LENGTH_SHORT).show();
+ } else {
+ if (javaScriptEnabled) {
+ Snackbar.make(findViewById(R.id.mainWebView), R.string.first_party_cookies_disabled, Snackbar.LENGTH_SHORT).show();
+ } else {
+ Snackbar.make(findViewById(R.id.mainWebView), R.string.privacy_mode, Snackbar.LENGTH_SHORT).show();
+ }
+ }
// Reload the WebView.
mainWebView.reload();
// Apply the new cookie status.
cookieManager.setAcceptThirdPartyCookies(mainWebView, thirdPartyCookiesEnabled);
+ // Display a `Snackbar`.
+ if (thirdPartyCookiesEnabled) {
+ Snackbar.make(findViewById(R.id.mainWebView), R.string.third_party_cookies_enabled, Snackbar.LENGTH_SHORT).show();
+ } else {
+ Snackbar.make(findViewById(R.id.mainWebView), R.string.third_party_cookies_disabled, Snackbar.LENGTH_SHORT).show();
+ }
+
// Reload the WebView.
mainWebView.reload();
} // Else do nothing because SDK < 21.
// Apply the new DOM Storage status.
mainWebView.getSettings().setDomStorageEnabled(domStorageEnabled);
+ // Display a `Snackbar`.
+ if (domStorageEnabled) {
+ Snackbar.make(findViewById(R.id.mainWebView), R.string.dom_storage_enabled, Snackbar.LENGTH_SHORT).show();
+ } else {
+ Snackbar.make(findViewById(R.id.mainWebView), R.string.dom_storage_disabled, Snackbar.LENGTH_SHORT).show();
+ }
+
// Reload the WebView.
mainWebView.reload();
return true;
// Apply the new form data status.
mainWebView.getSettings().setSaveFormData(saveFormDataEnabled);
+ // Display a `Snackbar`.
+ if (saveFormDataEnabled) {
+ Snackbar.make(findViewById(R.id.mainWebView), R.string.form_data_enabled, Snackbar.LENGTH_SHORT).show();
+ } else {
+ Snackbar.make(findViewById(R.id.mainWebView), R.string.form_data_disabled, Snackbar.LENGTH_SHORT).show();
+ }
+
// Reload the WebView.
mainWebView.reload();
return true;
// Reinitialize the adView variable, as the View will have been removed and re-added in the free flavor by BannerAd.reloadAfterRotate().
adView = findViewById(R.id.adView);
+
+ // `invalidateOptionsMenu` should recalculate the number of action buttons from the menu to display on the app bar, but it doesn't because of the this bug: https://code.google.com/p/android/issues/detail?id=20493#c8
+ invalidateOptionsMenu();
}
@Override
inputMethodManager.hideSoftInputFromWindow(mainWebView.getWindowToken(), 0);
}
- private void updatePrivacyIcon() {
+ public static void updatePrivacyIcons(Activity activity) {
+ // Get handles for the icons.
+ MenuItem privacyIcon = mainMenu.findItem(R.id.toggleJavaScript);
+ MenuItem firstPartyCookiesIcon = mainMenu.findItem(R.id.toggleFirstPartyCookies);
+ MenuItem thirdPartyCookiesIcon = mainMenu.findItem(R.id.toggleThirdPartyCookies);
+ MenuItem domStorageIcon = mainMenu.findItem(R.id.toggleDomStorage);
+ MenuItem formDataIcon = mainMenu.findItem(R.id.toggleSaveFormData);
+
+ // Update `privacyIcon`.
if (javaScriptEnabled) {
+ // `JavaScript` is enabled.
privacyIcon.setIcon(R.drawable.javascript_enabled);
} else {
if (firstPartyCookiesEnabled) {
+ // `JavaScript` is disabled but cookies are enabled.
privacyIcon.setIcon(R.drawable.warning);
} else {
+ // All the dangerous features are disabled.
privacyIcon.setIcon(R.drawable.privacy_mode);
}
}
+
+ // Update `firstPartyCookiesIcon`.
+ if (firstPartyCookiesEnabled) {
+ // First-party cookies are enabled.
+ firstPartyCookiesIcon.setIcon(R.drawable.cookies_warning);
+ } else {
+ // First-party cookies are disabled.
+ firstPartyCookiesIcon.setIcon(R.drawable.cookies_disabled);
+ }
+
+ // Update `thirdPartyCookiesIcon`.
+ if (firstPartyCookiesEnabled) {
+ if (thirdPartyCookiesEnabled) {
+ // Third-party cookies are enabled. Bad!
+ thirdPartyCookiesIcon.setIcon(R.drawable.cookies_critical);
+ } else {
+ // Third-party cookies are disabled.
+ thirdPartyCookiesIcon.setIcon(R.drawable.cookies_disabled);
+ }
+ } else {
+ // First-party cookies are disabled, so third-party cookies are ghosted.
+ thirdPartyCookiesIcon.setIcon(R.drawable.cookies_ghosted);
+ }
+
+ // Update `domStorageIcon`.
+ if (javaScriptEnabled) {
+ if (domStorageEnabled) {
+ domStorageIcon.setIcon(R.drawable.dom_storage_enabled);
+ } else {
+ domStorageIcon.setIcon(R.drawable.dom_storage_disabled);
+ }
+ } else {
+ domStorageIcon.setIcon(R.drawable.dom_storage_ghosted);
+ }
+
+ // Update `formDataIcon`.
+ if (saveFormDataEnabled) {
+ formDataIcon.setIcon(R.drawable.form_data_enabled);
+ } else {
+ formDataIcon.setIcon(R.drawable.form_data_disabled);
+ }
+
+ // `invalidateOptionsMenu` calls `onPrepareOptionsMenu()` and redraws the icons in the `AppBar`.
+ ActivityCompat.invalidateOptionsMenu(activity);
}
}
MainWebViewActivity.mainWebView.getSettings().setJavaScriptEnabled(MainWebViewActivity.javaScriptEnabled);
MainWebViewActivity.mainWebView.reload();
- // Update the privacy icon.
- updatePrivacyIcon();
+ // Update the privacy icons.
+ MainWebViewActivity.updatePrivacyIcons(MainWebViewActivity.privacyBrowserActivity);
break;
case "first_party_cookies_enabled":
MenuItem firstPartyCookiesMenuItem = MainWebViewActivity.mainMenu.findItem(R.id.toggleFirstPartyCookies);
firstPartyCookiesMenuItem.setChecked(MainWebViewActivity.firstPartyCookiesEnabled);
- // Update the privacy icon.
- updatePrivacyIcon();
+ // Update the privacy icons.
+ MainWebViewActivity.updatePrivacyIcons(MainWebViewActivity.privacyBrowserActivity);
break;
case "third_party_cookies_enabled":
MainWebViewActivity.cookieManager.setAcceptThirdPartyCookies(MainWebViewActivity.mainWebView, MainWebViewActivity.thirdPartyCookiesEnabled);
MainWebViewActivity.mainWebView.reload();
}
+
+ // Update the privacy icons.
+ MainWebViewActivity.updatePrivacyIcons(MainWebViewActivity.privacyBrowserActivity);
break;
case "dom_storage_enabled":
MainWebViewActivity.mainWebView.getSettings().setDomStorageEnabled(MainWebViewActivity.domStorageEnabled);
MainWebViewActivity.mainWebView.reload();
- // Update the privacy icon.
- updatePrivacyIcon();
+ // Update the privacy icons.
+ MainWebViewActivity.updatePrivacyIcons(MainWebViewActivity.privacyBrowserActivity);
break;
case "save_form_data_enabled":
// Update mainWebView and reload the website.
MainWebViewActivity.mainWebView.getSettings().setSaveFormData(MainWebViewActivity.saveFormDataEnabled);
MainWebViewActivity.mainWebView.reload();
+
+ // Update the privacy icons.
+ MainWebViewActivity.updatePrivacyIcons(MainWebViewActivity.privacyBrowserActivity);
break;
case "user_agent":
super.onResume();
savedPreferences.registerOnSharedPreferenceChangeListener(preferencesListener);
}
-
- private void updatePrivacyIcon() {
- // Define a reference to the toggleJavaScript icon.
- MenuItem toggleJavaScript = MainWebViewActivity.mainMenu.findItem(R.id.toggleJavaScript);
-
- if (MainWebViewActivity.javaScriptEnabled) {
- toggleJavaScript.setIcon(R.drawable.javascript_enabled);
- } else {
- if (MainWebViewActivity.firstPartyCookiesEnabled) {
- toggleJavaScript.setIcon(R.drawable.warning);
- } else {
- toggleJavaScript.setIcon(R.drawable.privacy_mode);
- }
- }
- }
}
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
-import android.graphics.drawable.BitmapDrawable;
-import android.graphics.drawable.Drawable;
import android.net.http.SslCertificate;
import android.net.http.SslError;
import android.os.Bundle;
-import android.support.v4.content.ContextCompat;
-import android.text.SpannableString;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.style.ForegroundColorSpan;
import android.view.LayoutInflater;
import android.widget.TextView;
-import org.w3c.dom.Text;
-
import java.util.Date;
public class SslCertificateError extends DialogFragment{
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="#FF000000"
android:pathData="M11,17h2v-6h-2v6zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM11,9h2L13,7h-2v2z" />
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="#FFFFFFFF"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
android:viewportWidth="24.0"
android:autoMirrored="true" >
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillColor="#FF000000"
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z" />
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="#FF000000"
android:pathData="M17,3L7,3c-1.1,0 -1.99,0.9 -1.99,2L5,21l7,-3 7,3L19,5c0,-1.1 -0.9,-2 -2,-2zM17,18l-5,-2.18L7,18L7,5h10v13z"/>
--- /dev/null
+<!-- cookies_critical.xml was created by Google and downloaded from https://materialdesignicons.com/icon/cookie. -->
+
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="26dp"
+ android:width="26dp"
+ 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="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
+<!-- cookies_disabled.xml was created by Google and downloaded from https://materialdesignicons.com/icon/cookie. -->
+
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="26dp"
+ android:width="26dp"
+ 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="#88000000"
+ 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
+<!-- cookies_ghosted.xml was created by Google and downloaded from https://materialdesignicons.com/icon/cookie. -->
+
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="26dp"
+ android:width="26dp"
+ 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="#22000000"
+ 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
+<!-- cookies_warning.xml was created by Google and downloaded from https://materialdesignicons.com/icon/cookie. -->
+
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="26dp"
+ android:width="26dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:autoMirrored="true" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
+ <path
+ android:fillColor="#FFF57F17"
+ 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
android:viewportWidth="24.0"
android:autoMirrored="true" >
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M20,6h-8l-2,-2L4,4c-1.11,0 -1.99,0.89 -1.99,2L2,18c0,1.11 0.89,2 2,2h16c1.11,0 2,-0.89 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2zM19,14h-3v3h-2v-3h-3v-2h3L14,9h2v3h3v2z"/>
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="#FFFFFFFF"
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2V7H6v12zM19,4h-3.5l-1,-1h-5l-1,1H5v2h14V4z"/>
--- /dev/null
+<!-- dom_storage_disabled.xml comes from the Android Material icon set, where it is called ic_web.
+ It is released under the CC-BY license <https://creativecommons.org/licenses/by/4.0/>. -->
+
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="26dp"
+ android:width="26dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:autoMirrored="true" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
+ <path
+ android:fillColor="#88000000"
+ 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_enabled.xml comes from the Android Material icon set, where it is called ic_web.
+ It is released under the CC-BY license <https://creativecommons.org/licenses/by/4.0/>. -->
+
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="26dp"
+ android:width="26dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:autoMirrored="true" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
+ <path
+ android:fillColor="#FFF57F17"
+ 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_ghosted.xml comes from the Android Material icon set, where it is called ic_web.
+ It is released under the CC-BY license <https://creativecommons.org/licenses/by/4.0/>. -->
+
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="26dp"
+ android:width="26dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:autoMirrored="true" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
+ <path
+ android:fillColor="#44000000"
+ 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>
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="#FF000000"
android:pathData="M19,9h-4V3H9v6H5l7,7 7,-7zM5,18v2h14v-2H5z" />
android:viewportWidth="24.0"
android:autoMirrored="true" >
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
android:viewportWidth="24.0"
android:autoMirrored="true" >
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillColor="#FF000000"
android:pathData="M10.09,15.59L11.5,17l5,-5 -5,-5 -1.41,1.41L12.67,11H3v2h9.67l-2.58,2.59zM19,3H5c-1.11,0 -2,0.9 -2,2v4h2V5h14v14H5v-4H3v4c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2z" />
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="#FF0D47A1"
android:pathData="M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z"/>
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="#FF9E9E9E"
android:pathData="M10,4H4c-1.1,0 -1.99,0.9 -1.99,2L2,18c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V8c0,-1.1 -0.9,-2 -2,-2h-8l-2,-2z"/>
--- /dev/null
+<!-- form_data_disabled.xml comes from the Android Material icon set, where it is called ic_subtitles.
+ It is released under the CC-BY license <https://creativecommons.org/licenses/by/4.0/>. -->
+
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="26dp"
+ android:width="26dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:autoMirrored="true" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
+ <path
+ android:fillColor="#88000000"
+ 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_enabled.xml comes from the Android Material icon set, where it is called ic_subtitles.
+ It is released under the CC-BY license <https://creativecommons.org/licenses/by/4.0/>. -->
+
+<vector
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:height="26dp"
+ android:width="26dp"
+ android:viewportHeight="24.0"
+ android:viewportWidth="24.0"
+ android:autoMirrored="true" >
+
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
+ <path
+ android:fillColor="#FFF57F17"
+ 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>
android:viewportWidth="24.0"
android:autoMirrored="true" >
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillColor="#FF000000"
android:pathData="M12,4l-1.41,1.41L16.17,11H4v2h12.17l-5.58,5.59L12,20l8,-8z" />
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="#FF000000"
android:pathData="M21,5c-1.11,-0.35 -2.33,-0.5 -3.5,-0.5 -1.95,0 -4.05,0.4 -5.5,1.5 -1.45,-1.1 -3.55,-1.5 -5.5,-1.5S2.45,4.9 1,6v14.65c0,0.25 0.25,0.5 0.5,0.5 0.1,0 0.15,-0.05 0.25,-0.05C3.1,20.45 5.05,20 6.5,20c1.95,0 4.05,0.4 5.5,1.5 1.35,-0.85 3.8,-1.5 5.5,-1.5 1.65,0 3.35,0.3 4.75,1.05 0.1,0.05 0.15,0.05 0.25,0.05 0.25,0 0.5,-0.25 0.5,-0.5L23,6c-0.6,-0.45 -1.25,-0.75 -2,-1zM21,18.5c-1.1,-0.35 -2.3,-0.5 -3.5,-0.5 -1.7,0 -4.15,0.65 -5.5,1.5L12,8c1.35,-0.85 3.8,-1.5 5.5,-1.5 1.2,0 2.4,0.15 3.5,0.5v11.5z" />
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="#FF000000"
android:pathData="M10,20v-6h4v6h5v-8h3L12,3 2,12h3v8z" />
android:viewportHeight="256.0"
android:viewportWidth="256.0" >
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillAlpha="1"
android:fillColor="#b71c1c"
android:pathData="m128,12.8 l-94.25,41.89 0,62.84c0,58.12 40.22,112.48 94.25,125.67 54.04,-13.2 94.25,-67.55 94.25,-125.67l0,-62.84z" android:strokeColor="#00000000" />
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillAlpha="1"
android:fillColor="#d32f2f"
android:pathData="m128,0 l-104.73,46.55 0,69.82C23.27,180.95 67.96,241.34 128,256 188.04,241.34 232.73,180.95 232.73,116.36l0,-69.82L128,0ZM128,127.88 L209.45,127.88C203.29,175.83 171.29,218.53 128,231.91l0,-103.91 -81.45,0 0,-66.33L128,25.48l0,102.4z" android:strokeColor="#00000000" />
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:viewportHeight="24.0"
android:viewportWidth="24.0" >
- <!-- We have to wait until API >=21 to reference `@color/light_blue` directly. -->
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillColor="#FFBBDEFB"
android:pathData="M16,13h-3V3h-2v10H8l4,4 4,-4zM4,19v2h16v-2H4z"/>
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="#FFFFFFFF"
android:pathData="M16,13h-3V3h-2v10H8l4,4 4,-4zM4,19v2h16v-2H4z"/>
android:viewportHeight="24.0"
android:viewportWidth="24.0" >
- <!-- We have to wait until API >=21 to reference `@color/light_blue` directly. -->
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillColor="#FFBBDEFB"
android:pathData="M8,11h3v10h2V11h3l-4,-4 -4,4zM4,3v2h16V3H4z"/>
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="#FFFFFFFF"
android:pathData="M8,11h3v10h2V11h3l-4,-4 -4,4zM4,3v2h16V3H4z"/>
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="#FFFFFFFF"
android:pathData="M20,6h-8l-2,-2L4,4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,8c0,-1.1 -0.9,-2 -2,-2zM17.94,17L15,15.28 12.06,17l0.78,-3.33 -2.59,-2.24 3.41,-0.29L15,8l1.34,3.14 3.41,0.29 -2.59,2.24 0.78,3.33z"/>
android:viewportHeight="256.0"
android:viewportWidth="256.0" >
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillAlpha="1"
android:fillColor="#0d4781"
android:pathData="m128,12.8 l-94.25,41.89 0,62.84c0,58.12 40.22,112.48 94.25,125.67 54.04,-13.2 94.25,-67.55 94.25,-125.67l0,-62.84z" android:strokeColor="#00000000" />
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillAlpha="1"
android:fillColor="#1976d2"
android:pathData="m128,0 l-104.73,46.55 0,69.82C23.27,180.95 67.96,241.34 128,256 188.04,241.34 232.73,180.95 232.73,116.36l0,-69.82L128,0ZM128,127.88 L209.45,127.88C203.29,175.83 171.29,218.53 128,231.91l0,-103.91 -81.45,0 0,-66.33L128,25.48l0,102.4z" android:strokeColor="#00000000" />
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
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="#FFFFFFFF"
android:pathData="M3,5h2L5,3c-1.1,0 -2,0.9 -2,2zM3,13h2v-2L3,11v2zM7,21h2v-2L7,19v2zM3,9h2L5,7L3,7v2zM13,3h-2v2h2L13,3zM19,3v2h2c0,-1.1 -0.9,-2 -2,-2zM5,21v-2L3,19c0,1.1 0.9,2 2,2zM3,17h2v-2L3,15v2zM9,3L7,3v2h2L9,3zM11,21h2v-2h-2v2zM19,13h2v-2h-2v2zM19,21c1.1,0 2,-0.9 2,-2h-2v2zM19,9h2L21,7h-2v2zM19,17h2v-2h-2v2zM15,21h2v-2h-2v2zM15,5h2L17,3h-2v2zM7,17h10L17,7L7,7v10zM9,9h6v6L9,15L9,9z"/>
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="#FF000000"
android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z" />
android:viewportHeight="256.0"
android:viewportWidth="256.0" >
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillAlpha="1"
android:fillColor="#f57f17"
android:pathData="m128,12.8 l-94.25,41.89 0,62.84c0,58.12 40.22,112.48 94.25,125.67 54.04,-13.2 94.25,-67.55 94.25,-125.67l0,-62.84z" android:strokeColor="#00000000" />
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillAlpha="1"
android:fillColor="#fbc02d"
android:pathData="m128,0 l-104.73,46.55 0,69.82C23.27,180.95 67.96,241.34 128,256 188.04,241.34 232.73,180.95 232.73,116.36l0,-69.82L128,0ZM128,127.88 L209.45,127.88C203.29,175.83 171.29,218.53 128,231.91l0,-103.91 -81.45,0 0,-66.33L128,25.48l0,102.4z" android:strokeColor="#00000000" />
+ <!-- We have to use a hard coded color code until API >= 21. Then we can use`@color`. -->
<path
android:fillAlpha="1"
android:fillColor="#ffffff"
android:title="@string/first_party_cookies"
android:orderInCategory="20"
android:checkable="true"
- app:showAsAction="never" />
+ app:showAsAction="ifRoom" />
<item
android:id="@+id/toggleThirdPartyCookies"
android:title="@string/third_party_cookies"
android:orderInCategory="30"
android:checkable="true"
- app:showAsAction="never" />
+ app:showAsAction="ifRoom" />
<item
android:id="@+id/toggleDomStorage"
android:title="@string/dom_storage"
android:orderInCategory="40"
android:checkable="true"
- app:showAsAction="never" />
+ app:showAsAction="ifRoom" />
<item
android:id="@+id/toggleSaveFormData"
android:title="@string/form_data"
android:orderInCategory="50"
android:checkable="true"
- app:showAsAction="never" />
+ app:showAsAction="ifRoom" />
<item
android:id="@+id/clearCookies"
<color name="green">#FF64DD17</color>
<color name="light_blue">#FFBBDEFB</color>
<color name="medium_light_blue">#FF42A5F5</color>
+ <color name="orange">#FFF57F17</color>
<color name="red">#FFD50000</color>
<color name="white">#FFFFFFFF</color>
<color name="yellow">#FFFFD600</color>
<string name="privacy_mode">Privacy Mode</string>
<string name="javascript_enabled">JavaScript enabled</string>
<string name="javascript_disabled">JavaScript disabled</string>
+ <string name="first_party_cookies_enabled">First-Party Cookies enabled</string>
+ <string name="first_party_cookies_disabled">First-Party Cookies disabled</string>
+ <string name="third_party_cookies_enabled">Third-Party Cookies enabled</string>
+ <string name="third_party_cookies_disabled">Third-Party Cookies disabled</string>
+ <string name="dom_storage_enabled">DOM Storage enabled</string>
+ <string name="dom_storage_disabled">DOM Storage disabled</string>
+ <string name="form_data_enabled">Form Data enabled</string>
+ <string name="form_data_disabled">Form Data disabled</string>
<string name="cookies_deleted">Cookies deleted</string>
<string name="dom_storage_deleted">DOM Storage deleted</string>
<string name="open_navigation">Open Navigation Drawer</string>