Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3d9805d5 authored by Mahaver Chopra's avatar Mahaver Chopra
Browse files

Added UM.DISALLOW_OEM_UNLOCK, Removed Global.OEM_UNLOCK_DISALLOWED.

Currently we used global setting to restrict user from enabling oem
unlock. As global settings can be chagned using adb, using user
restrictions instead.

Bug: 29893399
Change-Id: Ic83112a4838b8279bf50408a29ae205e0b8639ee
parent 7e10bcff
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -602,6 +602,17 @@ public class UserManager {
     */
    public static final String DISALLOW_SET_USER_ICON = "no_set_user_icon";

    /**
     * Specifies if a user is not allowed to enable the oem unlock setting. The default value is
     * <code>false</code>.
     *
     * @see DevicePolicyManager#addUserRestriction(ComponentName, String)
     * @see DevicePolicyManager#clearUserRestriction(ComponentName, String)
     * @see #getUserRestrictions()
     * @hide
     */
    public static final String DISALLOW_OEM_UNLOCK = "no_oem_unlock";

    /**
     * Allows apps in the parent profile to handle web links from the managed profile.
     *
+0 −9
Original line number Diff line number Diff line
@@ -9113,15 +9113,6 @@ public final class Settings {
         */
        public static final String ENABLE_CELLULAR_ON_BOOT = "enable_cellular_on_boot";

        /**
         * Whether toggling OEM unlock is disallowed. If disallowed, it is not possible to enable or
         * disable OEM unlock.
         * <p>
         * Type: int (0: allow OEM unlock setting. 1: disallow OEM unlock)
         * @hide
         */
        public static final String OEM_UNLOCK_DISALLOWED = "oem_unlock_disallowed";

        /**
         * The maximum allowed notification enqueue rate in Hertz.
         *
+5 −0
Original line number Diff line number Diff line
@@ -2527,4 +2527,9 @@

    <!-- Package name for the device provisioning package. -->
    <string name="config_deviceProvisioningPackage"></string>

    <!-- User restrictions set when the first user is created.
         Note: Also update appropriate overlay files. -->
    <string-array translatable="false" name="config_defaultFirstUserRestrictions">
    </string-array>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -2668,4 +2668,7 @@
  <java-symbol type="integer" name="config_defaultNightDisplayAutoMode" />
  <java-symbol type="integer" name="config_defaultNightDisplayCustomStartTime" />
  <java-symbol type="integer" name="config_defaultNightDisplayCustomEndTime" />

  <!-- Default first user restrictions -->
  <java-symbol type="array" name="config_defaultFirstUserRestrictions" />
</resources>
+0 −3
Original line number Diff line number Diff line
@@ -216,7 +216,4 @@

    <!-- Default setting for ability to add users from the lock screen -->
    <bool name="def_add_users_from_lockscreen">false</bool>

    <!-- Default setting for disallow oem unlock. -->
    <bool name="def_oem_unlock_disallow">false</bool>
</resources>
Loading