mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
Bug 1232761 - Expose telemetry/fhr settings directly in restricted profile admin UI. r=sebastian
--HG-- extra : commitid : FE0KvI9RjIO extra : rebase_source : 9ce1d4296aff0435cb27a977fab9b5ca52bcc271
This commit is contained in:
parent
d59e4ae5e8
commit
c763154973
@ -26,7 +26,8 @@ public class GuestProfileConfiguration implements RestrictionConfiguration {
|
||||
Restrictable.MODIFY_ACCOUNTS,
|
||||
Restrictable.REMOTE_DEBUGGING,
|
||||
Restrictable.IMPORT_SETTINGS,
|
||||
Restrictable.BLOCK_LIST
|
||||
Restrictable.BLOCK_LIST,
|
||||
Restrictable.DATA_CHOICES
|
||||
);
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
|
@ -48,9 +48,7 @@ public enum Restrictable {
|
||||
R.string.restrictable_feature_private_browsing,
|
||||
R.string.restrictable_feature_private_browsing_description),
|
||||
|
||||
DATA_CHOICES(13, "data_coices",
|
||||
R.string.restrictable_feature_data_choices,
|
||||
R.string.restrictable_feature_data_choices_description),
|
||||
DATA_CHOICES(13, "data_coices", 0, 0),
|
||||
|
||||
CLEAR_HISTORY(14, "clear_history",
|
||||
R.string.restrictable_feature_clear_history,
|
||||
@ -70,7 +68,16 @@ public enum Restrictable {
|
||||
|
||||
BLOCK_LIST(19, "block_list",
|
||||
R.string.restrictable_feature_block_list,
|
||||
R.string.restrictable_feature_block_list_description);
|
||||
R.string.restrictable_feature_block_list_description),
|
||||
|
||||
TELEMETRY(20, "telemetry",
|
||||
R.string.datareporting_telemetry_title,
|
||||
R.string.datareporting_telemetry_summary),
|
||||
|
||||
HEALTH_REPORT(21, "health_report",
|
||||
R.string.datareporting_fhr_title,
|
||||
R.string.datareporting_fhr_summary2);
|
||||
|
||||
|
||||
public final int id;
|
||||
public final String name;
|
||||
|
@ -33,12 +33,15 @@ public class RestrictedProfileConfiguration implements RestrictionConfiguration
|
||||
configuration.put(Restrictable.GUEST_BROWSING, false);
|
||||
configuration.put(Restrictable.ADVANCED_SETTINGS, false);
|
||||
configuration.put(Restrictable.CAMERA_MICROPHONE, false);
|
||||
configuration.put(Restrictable.DATA_CHOICES, true);
|
||||
configuration.put(Restrictable.DATA_CHOICES, false);
|
||||
|
||||
// Hold behind Nightly flag until we have an actual block list deployed.
|
||||
if (AppConstants.NIGHTLY_BUILD) {
|
||||
configuration.put(Restrictable.BLOCK_LIST, false);
|
||||
}
|
||||
|
||||
configuration.put(Restrictable.TELEMETRY, false);
|
||||
configuration.put(Restrictable.HEALTH_REPORT, true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -46,7 +49,8 @@ public class RestrictedProfileConfiguration implements RestrictionConfiguration
|
||||
*/
|
||||
private static List<Restrictable> hiddenRestrictions = Arrays.asList(
|
||||
Restrictable.MASTER_PASSWORD,
|
||||
Restrictable.GUEST_BROWSING
|
||||
Restrictable.GUEST_BROWSING,
|
||||
Restrictable.DATA_CHOICES
|
||||
);
|
||||
|
||||
/* package-private */ static boolean shouldHide(Restrictable restrictable) {
|
||||
|
@ -742,8 +742,6 @@ just addresses the organization to follow, e.g. "This site is run by " -->
|
||||
<!ENTITY restrictable_feature_advanced_settings_description "This includes importing bookmarks, restoring tabs and automated updates. Turn off for simplified settings suitable for any family member.">
|
||||
<!ENTITY restrictable_feature_camera_microphone "Camera & Microphone">
|
||||
<!ENTITY restrictable_feature_camera_microphone_description "Allows family members to engage in real time communication on websites.">
|
||||
<!ENTITY restrictable_feature_data_choices "Data Choices">
|
||||
<!ENTITY restrictable_feature_data_choices_description "Choose whether or not to send usage information to Mozilla to help make Firefox better.">
|
||||
<!ENTITY restrictable_feature_block_list "Block List">
|
||||
<!ENTITY restrictable_feature_block_list_description "Block websites that include sensitive content.">
|
||||
|
||||
|
@ -576,8 +576,6 @@
|
||||
<string name="restrictable_feature_advanced_settings_description">&restrictable_feature_advanced_settings_description;</string>
|
||||
<string name="restrictable_feature_camera_microphone">&restrictable_feature_camera_microphone;</string>
|
||||
<string name="restrictable_feature_camera_microphone_description">&restrictable_feature_camera_microphone_description;</string>
|
||||
<string name="restrictable_feature_data_choices">&restrictable_feature_data_choices;</string>
|
||||
<string name="restrictable_feature_data_choices_description">&restrictable_feature_data_choices_description;</string>
|
||||
<string name="restrictable_feature_block_list">&restrictable_feature_block_list;</string>
|
||||
<string name="restrictable_feature_block_list_description">&restrictable_feature_block_list_description;</string>
|
||||
|
||||
|
@ -542,6 +542,12 @@ var BrowserApp = {
|
||||
let isBlockListEnabled = ParentalControls.isAllowed(ParentalControls.BLOCK_LIST);
|
||||
Services.prefs.setBoolPref("browser.safebrowsing.forbiddenURIs.enabled", isBlockListEnabled);
|
||||
Services.prefs.setBoolPref("browser.safebrowsing.allowOverride", !isBlockListEnabled);
|
||||
|
||||
let isTelemetryEnabled = ParentalControls.isAllowed(ParentalControls.TELEMETRY);
|
||||
Services.prefs.setBoolPref("toolkit.telemetry.enabled", isTelemetryEnabled);
|
||||
|
||||
let isHealthReportEnabled = ParentalControls.isAllowed(ParentalControls.HEALTH_REPORT);
|
||||
SharedPreferences.forApp().setBoolPref("android.not_a_preference.healthreport.uploadEnabled", isHealthReportEnabled);
|
||||
}
|
||||
|
||||
let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
|
||||
|
@ -11,7 +11,7 @@ interface nsIFile;
|
||||
interface nsIInterfaceRequestor;
|
||||
interface nsIArray;
|
||||
|
||||
[scriptable, uuid(f17414cd-d357-476d-b894-2f7bda9e3a9b)]
|
||||
[scriptable, uuid(3dc75deb-14cc-4bc3-9369-5002b5275c58)]
|
||||
interface nsIParentalControlsService : nsISupports
|
||||
{
|
||||
/**
|
||||
@ -36,6 +36,8 @@ interface nsIParentalControlsService : nsISupports
|
||||
const short ADVANCED_SETTINGS = 17; // Advanced settings
|
||||
const short CAMERA_MICROPHONE = 18; // Camera and microphone (WebRTC)
|
||||
const short BLOCK_LIST = 19; // Block websites that include sensitive content
|
||||
const short TELEMETRY = 20; // Submit telemetry data
|
||||
const short HEALTH_REPORT = 21; // Submit FHR data
|
||||
|
||||
/**
|
||||
* @returns true if the current user account has parental controls
|
||||
|
Loading…
Reference in New Issue
Block a user