зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1399014 - Allow 'enable tracking protection in normal browsing' for release and beta channel. r=maliu
In Android, "privacy.trackingprotection.state" is not a "real" pref name, but it's used in the setting menu and browser.js. "privacy.trackingprotection.state" and "privacy.trackingprotection.pbmode.enabled"(deleted) in Android is init in Helper.getPrefs and passed to browser.js when changed. The real pref for tacking protection are two Gecko pref in browser.js. They are: "privacy.trackingprotection.pbmode.enabled" "privacy.trackingprotection.enabled" All prefs in Android are delegated to them. The Android setting UI simply reflects the single source of truth (Gecko pref). That's the reason why the two Android perfs use android:persistent="false" MozReview-Commit-ID: 5ehBhtNM2Tx --HG-- extra : rebase_source : 02ad1f3f778589ce05529f22d7d7bee03e5970e5
This commit is contained in:
Родитель
fe32021d05
Коммит
23c6850fa7
|
@ -19,11 +19,6 @@
|
|||
android:persistent="false"
|
||||
url="https://www.mozilla.org/firefox/dnt/" />
|
||||
|
||||
<CheckBoxPreference android:key="privacy.trackingprotection.pbmode.enabled"
|
||||
android:title="@string/pref_tracking_protection_title"
|
||||
android:summary="@string/pref_tracking_protection_summary"
|
||||
android:persistent="false" />
|
||||
|
||||
<ListPreference android:key="privacy.trackingprotection.state"
|
||||
android:title="@string/pref_tracking_protection_title"
|
||||
android:entries="@array/pref_tracking_protection_entries"
|
||||
|
|
|
@ -133,11 +133,8 @@ public class GeckoPreferences
|
|||
private static final String PREFS_DEVTOOLS_REMOTE_USB_ENABLED = "devtools.remote.usb.enabled";
|
||||
private static final String PREFS_DEVTOOLS_REMOTE_WIFI_ENABLED = "devtools.remote.wifi.enabled";
|
||||
private static final String PREFS_DEVTOOLS_REMOTE_LINK = NON_PREF_PREFIX + "remote_debugging.link";
|
||||
private static final String PREFS_TRACKING_PROTECTION = "privacy.trackingprotection.state";
|
||||
private static final String PREFS_TRACKING_PROTECTION_PB = "privacy.trackingprotection.pbmode.enabled";
|
||||
public static final String PREFS_VOICE_INPUT_ENABLED = NON_PREF_PREFIX + "voice_input_enabled";
|
||||
public static final String PREFS_QRCODE_ENABLED = NON_PREF_PREFIX + "qrcode_enabled";
|
||||
private static final String PREFS_TRACKING_PROTECTION_PRIVATE_BROWSING = "privacy.trackingprotection.pbmode.enabled";
|
||||
private static final String PREFS_TRACKING_PROTECTION_LEARN_MORE = NON_PREF_PREFIX + "trackingprotection.learn_more";
|
||||
private static final String PREFS_CLEAR_PRIVATE_DATA = NON_PREF_PREFIX + "privacy.clear";
|
||||
private static final String PREFS_CLEAR_PRIVATE_DATA_EXIT = NON_PREF_PREFIX + "history.clear_on_exit";
|
||||
|
@ -673,20 +670,6 @@ public class GeckoPreferences
|
|||
i--;
|
||||
continue;
|
||||
}
|
||||
} else if (PREFS_TRACKING_PROTECTION.equals(key)) {
|
||||
// Remove UI for global TP pref in non-Nightly builds.
|
||||
if (!AppConstants.NIGHTLY_BUILD) {
|
||||
preferences.removePreference(pref);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
} else if (PREFS_TRACKING_PROTECTION_PB.equals(key)) {
|
||||
// Remove UI for private-browsing-only TP pref in Nightly builds.
|
||||
if (AppConstants.NIGHTLY_BUILD) {
|
||||
preferences.removePreference(pref);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
} else if (PREFS_TELEMETRY_ENABLED.equals(key)) {
|
||||
if (!AppConstants.MOZ_TELEMETRY_REPORTING || !Restrictions.isAllowed(this, Restrictable.DATA_CHOICES)) {
|
||||
preferences.removePreference(pref);
|
||||
|
@ -786,12 +769,6 @@ public class GeckoPreferences
|
|||
i--;
|
||||
continue;
|
||||
}
|
||||
} else if (PREFS_TRACKING_PROTECTION_PRIVATE_BROWSING.equals(key)) {
|
||||
if (!Restrictions.isAllowed(this, Restrictable.PRIVATE_BROWSING)) {
|
||||
preferences.removePreference(pref);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
} else if (PREFS_TRACKING_PROTECTION_LEARN_MORE.equals(key)) {
|
||||
if (!Restrictions.isAllowed(this, Restrictable.PRIVATE_BROWSING)) {
|
||||
preferences.removePreference(pref);
|
||||
|
|
|
@ -271,7 +271,6 @@
|
|||
<!ENTITY pref_show_web_fonts_summary2 "Download remote fonts when loading a page">
|
||||
|
||||
<!ENTITY pref_tracking_protection_title2 "Tracking Protection">
|
||||
<!ENTITY pref_tracking_protection_summary3 "Enabled in Private Browsing">
|
||||
<!ENTITY pref_donottrack_title "Do not track">
|
||||
<!ENTITY pref_donottrack_summary "&brandShortName; will tell sites that you do not want to be tracked">
|
||||
|
||||
|
|
|
@ -216,7 +216,6 @@
|
|||
<string name="pref_show_web_fonts_summary">&pref_show_web_fonts_summary2;</string>
|
||||
|
||||
<string name="pref_tracking_protection_title">&pref_tracking_protection_title2;</string>
|
||||
<string name="pref_tracking_protection_summary">&pref_tracking_protection_summary3;</string>
|
||||
<string name="pref_donottrack_title">&pref_donottrack_title;</string>
|
||||
<string name="pref_donottrack_summary">&pref_donottrack_summary;</string>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче