Introduce Settings.Global.WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN

This setting controls whether WiFi configurations created by a Device Owner app
should be locked down (that is, editable or removable only by the Device Owner).

Bug: 21427528
Change-Id: I0f8fb72bf9da1597e08d3dfc631d37b6b4178ff5
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 55eaf27..8d73f9d 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -4053,6 +4053,7 @@
      * <li>{@link Settings.Global#STAY_ON_WHILE_PLUGGED_IN}
      * This setting is only available from {@link android.os.Build.VERSION_CODES#MNC} onwards
      * and can only be set if {@link #setMaximumTimeToLock} is not used to set a timeout.</li>
+     * <li>{@link Settings.Global#WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN}</li>
      * </ul>
      *
      * @param admin Which {@link DeviceAdminReceiver} this request is associated with.
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index 37645b5..7967840 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -6655,6 +6655,17 @@
            "wifi_mobile_data_transition_wakelock_timeout_ms";
 
        /**
+        * This setting controls whether WiFi configurations created by a Device Owner app
+        * should be locked down (that is, be editable or removable only by the Device Owner App,
+        * not even by Settings app).
+        * This setting takes integer values. Non-zero values mean DO created configurations
+        * are locked down. Value of zero means they are not. Default value in the absence of
+        * actual value to this setting is 0.
+        */
+       public static final String WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN =
+               "wifi_device_owner_configs_lockdown";
+
+       /**
         * The operational wifi frequency band
         * Set to one of {@link WifiManager#WIFI_FREQUENCY_BAND_AUTO},
         * {@link WifiManager#WIFI_FREQUENCY_BAND_5GHZ} or