Bug 1234153 - Hide block list feature behind Nightly flag. r=margaret
authorSebastian Kaspari <s.kaspari@gmail.com>
Fri, 08 Jan 2016 21:23:45 +0100
changeset 320169 895e44661a5fcfd826d95c560990ecea25228b25
parent 320165 ea01aa74be131267e98f034d115df035bd86cd9d
child 320170 0559e8c2d58e2a6d519bdd5476f012d4d6179981
child 320194 6a1b660bfe1aad1ad707e2763b4f47285e0aef61
child 320195 ff7738b62dc61b06de96a3eb5499f95de70f0cd3
child 320271 bd63d11ce9e799d36bf84520dc2bd49e7e5b57a3
push id9146
push users.kaspari@gmail.com
push dateFri, 08 Jan 2016 22:13:08 +0000
reviewersmargaret
bugs1234153
milestone46.0a1
Bug 1234153 - Hide block list feature behind Nightly flag. r=margaret
mobile/android/base/java/org/mozilla/gecko/restrictions/RestrictedProfileConfiguration.java
--- a/mobile/android/base/java/org/mozilla/gecko/restrictions/RestrictedProfileConfiguration.java
+++ b/mobile/android/base/java/org/mozilla/gecko/restrictions/RestrictedProfileConfiguration.java
@@ -30,36 +30,37 @@ public class RestrictedProfileConfigurat
         configuration.put(Restrictable.INSTALL_EXTENSION, false);
         configuration.put(Restrictable.PRIVATE_BROWSING, false);
         configuration.put(Restrictable.CLEAR_HISTORY, false);
         configuration.put(Restrictable.MASTER_PASSWORD, false);
         configuration.put(Restrictable.GUEST_BROWSING, false);
         configuration.put(Restrictable.ADVANCED_SETTINGS, false);
         configuration.put(Restrictable.CAMERA_MICROPHONE, false);
         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.BLOCK_LIST, false);
         configuration.put(Restrictable.TELEMETRY, false);
         configuration.put(Restrictable.HEALTH_REPORT, true);
         configuration.put(Restrictable.DEFAULT_THEME, true);
     }
 
     /**
      * These restrictions are hidden from the admin configuration UI.
      */
-    private static List<Restrictable> hiddenRestrictions = Arrays.asList(
-            Restrictable.MASTER_PASSWORD,
-            Restrictable.GUEST_BROWSING,
-            Restrictable.DATA_CHOICES,
-            Restrictable.DEFAULT_THEME
-    );
+    private static List<Restrictable> hiddenRestrictions = new ArrayList<>();
+    static {
+        hiddenRestrictions.add(Restrictable.MASTER_PASSWORD);
+        hiddenRestrictions.add(Restrictable.GUEST_BROWSING);
+        hiddenRestrictions.add(Restrictable.DATA_CHOICES);
+        hiddenRestrictions.add(Restrictable.DEFAULT_THEME);
+
+        // Hold behind Nightly flag until we have an actual block list deployed.
+        if (!AppConstants.NIGHTLY_BUILD){
+            hiddenRestrictions.add(Restrictable.BLOCK_LIST);
+        }
+    }
 
     /* package-private */ static boolean shouldHide(Restrictable restrictable) {
         return hiddenRestrictions.contains(restrictable);
     }
 
     /* package-private */ static Map<Restrictable, Boolean> getConfiguration() {
         return configuration;
     }