Bug 1107133 - Expose tracking protection in Fennec privacy preferences. r=liuche
This commit is contained in:
@@ -235,6 +235,13 @@ public class AppConstants {
|
|||||||
false;
|
false;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
public static final boolean NIGHTLY_BUILD =
|
||||||
|
//#ifdef NIGHTLY_BUILD
|
||||||
|
true;
|
||||||
|
//#else
|
||||||
|
false;
|
||||||
|
//#endif
|
||||||
|
|
||||||
public static final boolean DEBUG_BUILD =
|
public static final boolean DEBUG_BUILD =
|
||||||
//#ifdef MOZ_DEBUG
|
//#ifdef MOZ_DEBUG
|
||||||
true;
|
true;
|
||||||
|
|||||||
@@ -172,6 +172,8 @@
|
|||||||
<!ENTITY pref_cookies_not_accept_foreign "Enabled, excluding 3rd party">
|
<!ENTITY pref_cookies_not_accept_foreign "Enabled, excluding 3rd party">
|
||||||
<!ENTITY pref_cookies_disabled "Disabled">
|
<!ENTITY pref_cookies_disabled "Disabled">
|
||||||
|
|
||||||
|
<!ENTITY pref_tracking_protection_title "Tracking protection">
|
||||||
|
<!ENTITY pref_tracking_protection_summary "&brandShortName; will prevent sites from tracking you">
|
||||||
<!ENTITY pref_donottrack_title "Do not track">
|
<!ENTITY pref_donottrack_title "Do not track">
|
||||||
<!ENTITY pref_donottrack_summary "&brandShortName; will tell sites that you do not want to be tracked">
|
<!ENTITY pref_donottrack_summary "&brandShortName; will tell sites that you do not want to be tracked">
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,8 @@ OnSharedPreferenceChangeListener
|
|||||||
private static final String PREFS_DISPLAY_REFLOW_ON_ZOOM = "browser.zoom.reflowOnZoom";
|
private static final String PREFS_DISPLAY_REFLOW_ON_ZOOM = "browser.zoom.reflowOnZoom";
|
||||||
private static final String PREFS_DISPLAY_TITLEBAR_MODE = "browser.chrome.titlebarMode";
|
private static final String PREFS_DISPLAY_TITLEBAR_MODE = "browser.chrome.titlebarMode";
|
||||||
private static final String PREFS_SYNC = NON_PREF_PREFIX + "sync";
|
private static final String PREFS_SYNC = NON_PREF_PREFIX + "sync";
|
||||||
|
private static final String PREFS_TRACKING_PROTECTION = "privacy.trackingprotection.enabled";
|
||||||
|
private static final String PREFS_TRACKING_PROTECTION_LEARN_MORE = NON_PREF_PREFIX + "trackingprotection.learn_more";
|
||||||
|
|
||||||
private static final String ACTION_STUMBLER_UPLOAD_PREF = AppConstants.ANDROID_PACKAGE_NAME + ".STUMBLER_PREF";
|
private static final String ACTION_STUMBLER_UPLOAD_PREF = AppConstants.ANDROID_PACKAGE_NAME + ".STUMBLER_PREF";
|
||||||
|
|
||||||
@@ -682,6 +684,13 @@ OnSharedPreferenceChangeListener
|
|||||||
preferences.removePreference(pref);
|
preferences.removePreference(pref);
|
||||||
i--;
|
i--;
|
||||||
continue;
|
continue;
|
||||||
|
} else if (!AppConstants.NIGHTLY_BUILD &&
|
||||||
|
(PREFS_TRACKING_PROTECTION.equals(key) ||
|
||||||
|
PREFS_TRACKING_PROTECTION_LEARN_MORE.equals(key))) {
|
||||||
|
// Remove UI for tracking protection preference on non-Nightly builds.
|
||||||
|
preferences.removePreference(pref);
|
||||||
|
i--;
|
||||||
|
continue;
|
||||||
} else if (!AppConstants.MOZ_TELEMETRY_REPORTING &&
|
} else if (!AppConstants.MOZ_TELEMETRY_REPORTING &&
|
||||||
PREFS_TELEMETRY_ENABLED.equals(key)) {
|
PREFS_TELEMETRY_ENABLED.equals(key)) {
|
||||||
preferences.removePreference(pref);
|
preferences.removePreference(pref);
|
||||||
|
|||||||
@@ -8,12 +8,28 @@
|
|||||||
android:title="@string/pref_category_privacy_short"
|
android:title="@string/pref_category_privacy_short"
|
||||||
android:enabled="false">
|
android:enabled="false">
|
||||||
|
|
||||||
|
<CheckBoxPreference android:key="privacy.trackingprotection.enabled"
|
||||||
|
android:title="@string/pref_tracking_protection_title"
|
||||||
|
android:summary="@string/pref_tracking_protection_summary"
|
||||||
|
android:persistent="false" />
|
||||||
|
|
||||||
|
<org.mozilla.gecko.preferences.AlignRightLinkPreference
|
||||||
|
android:key="android.not_a_preference.trackingprotection.learn_more"
|
||||||
|
android:title="@string/pref_learn_more"
|
||||||
|
android:persistent="false"
|
||||||
|
url="https://support.mozilla.org/kb/firefox-android-tracking-protection" />
|
||||||
|
|
||||||
<CheckBoxPreference android:key="privacy.donottrackheader.enabled"
|
<CheckBoxPreference android:key="privacy.donottrackheader.enabled"
|
||||||
android:title="@string/pref_donottrack_title"
|
android:title="@string/pref_donottrack_title"
|
||||||
android:summary="@string/pref_donottrack_summary"
|
android:summary="@string/pref_donottrack_summary"
|
||||||
android:defaultValue="false"
|
|
||||||
android:persistent="false" />
|
android:persistent="false" />
|
||||||
|
|
||||||
|
<org.mozilla.gecko.preferences.AlignRightLinkPreference
|
||||||
|
android:key="android.not_a_preference.donottrackheader.learn_more"
|
||||||
|
android:title="@string/pref_learn_more"
|
||||||
|
android:persistent="false"
|
||||||
|
url="https://www.mozilla.org/firefox/dnt/" />
|
||||||
|
|
||||||
<ListPreference android:key="network.cookie.cookieBehavior"
|
<ListPreference android:key="network.cookie.cookieBehavior"
|
||||||
android:title="@string/pref_cookies_menu"
|
android:title="@string/pref_cookies_menu"
|
||||||
android:entries="@array/pref_cookies_entries"
|
android:entries="@array/pref_cookies_entries"
|
||||||
@@ -22,12 +38,10 @@
|
|||||||
|
|
||||||
<CheckBoxPreference android:key="signon.rememberSignons"
|
<CheckBoxPreference android:key="signon.rememberSignons"
|
||||||
android:title="@string/pref_remember_signons"
|
android:title="@string/pref_remember_signons"
|
||||||
android:defaultValue="true"
|
|
||||||
android:persistent="false" />
|
android:persistent="false" />
|
||||||
|
|
||||||
<CheckBoxPreference android:key="privacy.masterpassword.enabled"
|
<CheckBoxPreference android:key="privacy.masterpassword.enabled"
|
||||||
android:title="@string/pref_use_master_password"
|
android:title="@string/pref_use_master_password"
|
||||||
android:defaultValue="false"
|
|
||||||
android:persistent="false" />
|
android:persistent="false" />
|
||||||
|
|
||||||
<!-- keys prefixed with "android.not_a_preference." are not synced with Gecko -->
|
<!-- keys prefixed with "android.not_a_preference." are not synced with Gecko -->
|
||||||
|
|||||||
@@ -182,6 +182,8 @@
|
|||||||
<string name="pref_cookies_not_accept_foreign">&pref_cookies_not_accept_foreign;</string>
|
<string name="pref_cookies_not_accept_foreign">&pref_cookies_not_accept_foreign;</string>
|
||||||
<string name="pref_cookies_disabled">&pref_cookies_disabled;</string>
|
<string name="pref_cookies_disabled">&pref_cookies_disabled;</string>
|
||||||
|
|
||||||
|
<string name="pref_tracking_protection_title">&pref_tracking_protection_title;</string>
|
||||||
|
<string name="pref_tracking_protection_summary">&pref_tracking_protection_summary;</string>
|
||||||
<string name="pref_donottrack_title">&pref_donottrack_title;</string>
|
<string name="pref_donottrack_title">&pref_donottrack_title;</string>
|
||||||
<string name="pref_donottrack_summary">&pref_donottrack_summary;</string>
|
<string name="pref_donottrack_summary">&pref_donottrack_summary;</string>
|
||||||
|
|
||||||
|
|||||||
@@ -177,7 +177,8 @@ public class StringHelper {
|
|||||||
public static final String SHOW_PAGE_ADDRESS_LABEL = "Show page address";
|
public static final String SHOW_PAGE_ADDRESS_LABEL = "Show page address";
|
||||||
|
|
||||||
// Privacy
|
// Privacy
|
||||||
public static final String TRACKING_LABEL = "Do not track";
|
public static final String TRACKING_PROTECTION_LABEL = "Tracking protection";
|
||||||
|
public static final String DNT_LABEL = "Do not track";
|
||||||
public static final String COOKIES_LABEL = "Cookies";
|
public static final String COOKIES_LABEL = "Cookies";
|
||||||
public static final String REMEMBER_PASSWORDS_LABEL = "Remember passwords";
|
public static final String REMEMBER_PASSWORDS_LABEL = "Remember passwords";
|
||||||
public static final String MASTER_PASSWORD_LABEL = "Use master password";
|
public static final String MASTER_PASSWORD_LABEL = "Use master password";
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ public class testSettingsMenuItems extends PixelTest {
|
|||||||
// Privacy menu items.
|
// Privacy menu items.
|
||||||
String[] PATH_PRIVACY = { StringHelper.PRIVACY_SECTION_LABEL };
|
String[] PATH_PRIVACY = { StringHelper.PRIVACY_SECTION_LABEL };
|
||||||
String[][] OPTIONS_PRIVACY = {
|
String[][] OPTIONS_PRIVACY = {
|
||||||
{ StringHelper.TRACKING_LABEL },
|
{ StringHelper.TRACKING_PROTECTION_LABEL },
|
||||||
|
{ StringHelper.DNT_LABEL },
|
||||||
{ StringHelper.COOKIES_LABEL, "Enabled", "Enabled, excluding 3rd party", "Disabled" },
|
{ StringHelper.COOKIES_LABEL, "Enabled", "Enabled, excluding 3rd party", "Disabled" },
|
||||||
{ StringHelper.REMEMBER_PASSWORDS_LABEL },
|
{ StringHelper.REMEMBER_PASSWORDS_LABEL },
|
||||||
{ StringHelper.MASTER_PASSWORD_LABEL },
|
{ StringHelper.MASTER_PASSWORD_LABEL },
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class SiteIdentityPopup extends ArrowPopup {
|
|||||||
"https://support.mozilla.org/kb/how-does-insecure-content-affect-safety-android";
|
"https://support.mozilla.org/kb/how-does-insecure-content-affect-safety-android";
|
||||||
|
|
||||||
private static final String TRACKING_CONTENT_SUPPORT_URL =
|
private static final String TRACKING_CONTENT_SUPPORT_URL =
|
||||||
"https://support.mozilla.org/kb/how-does-insecure-content-affect-safety-android";
|
"https://support.mozilla.org/kb/firefox-android-tracking-protection";
|
||||||
|
|
||||||
private SiteIdentity mSiteIdentity;
|
private SiteIdentity mSiteIdentity;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user