Bug 1222381 - Remove default theme for restricted profiles. r=ally

Instead we will introduce a theme picker in bug 1220251.
This commit is contained in:
Sebastian Kaspari 2015-11-11 13:56:31 +01:00
parent 61949d32a5
commit b2d6f9df48
5 changed files with 5 additions and 33 deletions

View File

@ -27,7 +27,6 @@ public class RestrictedProfileConfiguration implements RestrictionConfiguration
Restriction.DISALLOW_CLEAR_HISTORY,
Restriction.DISALLOW_MASTER_PASSWORD,
Restriction.DISALLOW_GUEST_BROWSING,
Restriction.DISALLOW_DEFAULT_THEME,
Restriction.DISALLOW_ADVANCED_SETTINGS,
Restriction.DISALLOW_CAMERA_MICROPHONE
);

View File

@ -50,11 +50,9 @@ public enum Restriction {
DISALLOW_GUEST_BROWSING(16, "no_guest_browsing", R.string.restriction_disallow_guest_browsing_title),
DISALLOW_DEFAULT_THEME(17, "no_default_theme", 0),
DISALLOW_ADVANCED_SETTINGS(17, "no_advanced_settings", R.string.restriction_disallow_advanced_settings_title),
DISALLOW_ADVANCED_SETTINGS(18, "no_advanced_settings", R.string.restriction_disallow_advanced_settings_title),
DISALLOW_CAMERA_MICROPHONE(19, "no_camera_microphone", R.string.restriction_disallow_camera_microphone_title);
DISALLOW_CAMERA_MICROPHONE(18, "no_camera_microphone", R.string.restriction_disallow_camera_microphone_title);
public final int id;
public final String name;

View File

@ -58,11 +58,6 @@ public class RestrictionProvider extends BroadcastReceiver {
continue;
}
if (restriction == Restriction.DISALLOW_DEFAULT_THEME) {
// This restriction is not configurable
continue;
}
RestrictionEntry entry = createRestrictionEntryWithDefaultValue(context, restriction,
oldRestrictions.getBoolean(restriction.name, true));
entries.add(entry);

View File

@ -3169,13 +3169,6 @@ var LightWeightThemeWebInstaller = {
BrowserApp.deck.addEventListener("InstallBrowserTheme", this, false, true);
BrowserApp.deck.addEventListener("PreviewBrowserTheme", this, false, true);
BrowserApp.deck.addEventListener("ResetBrowserThemePreview", this, false, true);
if (ParentalControls.parentalControlsEnabled &&
!this._manager.currentTheme &&
!ParentalControls.isAllowed(ParentalControls.DEFAULT_THEME)) {
// We are using the DEFAULT_THEME restriction to differentiate between restricted profiles & guest mode - Bug 1199596
this._installParentalControlsTheme();
}
},
handleEvent: function (event) {
@ -3212,18 +3205,6 @@ var LightWeightThemeWebInstaller = {
return this._manager = temp.LightweightThemeManager;
},
_installParentalControlsTheme: function() {
let mgr = this._manager;
let parentalControlsTheme = {
"headerURL": "resource://android/assets/parental_controls_theme.png",
"name": "Parental Controls Theme",
"id": "parental-controls-theme@mozilla.org"
};
mgr.addBuiltInTheme(parentalControlsTheme);
mgr.themeChanged(parentalControlsTheme);
},
_installRequest: function (event) {
let node = event.target;
let data = this._getThemeFromNode(node);

View File

@ -11,7 +11,7 @@ interface nsIFile;
interface nsIInterfaceRequestor;
interface nsIArray;
[scriptable, uuid(ca8eb4f8-89bc-4479-91c9-1f381e045ed7)]
[scriptable, uuid(c7713ad7-0804-4353-91d5-4d7f1376bded)]
interface nsIParentalControlsService : nsISupports
{
/**
@ -33,9 +33,8 @@ interface nsIParentalControlsService : nsISupports
const short CLEAR_HISTORY = 14; // Clear browsing history
const short MASTER_PASSWORD = 15; // Setting master password for logins
const short GUEST_BROWSING = 16; // Disallow usage of guest browsing
const short DEFAULT_THEME = 17; // Use default theme or a special parental controls theme
const short ADVANCED_SETTINGS = 18; // Advanced settings
const short CAMERA_MICROPHONE = 19; // Camera and microphone (WebRTC)
const short ADVANCED_SETTINGS = 17; // Advanced settings
const short CAMERA_MICROPHONE = 18; // Camera and microphone (WebRTC)
/**
* @returns true if the current user account has parental controls