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

Commit bda7a88b authored by Alex Johnston's avatar Alex Johnston
Browse files

Allow DISALLOW_CONFIG_DEFAULT_APPS to apply on the personal profile

Available on corporate-owned personally-enabled devices
User restriction is local when not set by a device owner

Test: TestDPC
Bug: 304934519

Change-Id: I2b41e1704175e9f5b06b58b40204f9822dd7eb8d
parent 9798b977
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -1785,7 +1785,11 @@ public class UserManager {
    /**
     * Specifies whether the user is allowed to modify default apps in settings.
     *
     * <p>This restriction can be set by device or profile owner.
     * <p>A device owner and a profile owner can set this restriction. When it is set by a
     * device owner, it applies globally - i.e., modifying of default apps in Settings for all
     * users is disallowed. When it is set by a profile owner on the primary user or by a profile
     * owner of an organization-owned managed profile on the parent profile, modifying of
     * default apps in Settings for the primary user is disallowed.
     *
     * <p>The default value is <code>false</code>.
     *
+4 −2
Original line number Diff line number Diff line
@@ -232,7 +232,8 @@ public class UserRestrictionsUtils {
            UserManager.DISALLOW_UNMUTE_MICROPHONE,
            UserManager.DISALLOW_UNMUTE_DEVICE,
            UserManager.DISALLOW_CAMERA,
            UserManager.DISALLOW_ASSIST_CONTENT
            UserManager.DISALLOW_ASSIST_CONTENT,
            UserManager.DISALLOW_CONFIG_DEFAULT_APPS
    );

    /**
@@ -288,7 +289,8 @@ public class UserRestrictionsUtils {
                    UserManager.DISALLOW_SMS,
                    UserManager.DISALLOW_USB_FILE_TRANSFER,
                    UserManager.DISALLOW_MOUNT_PHYSICAL_MEDIA,
                    UserManager.DISALLOW_UNMUTE_MICROPHONE
                    UserManager.DISALLOW_UNMUTE_MICROPHONE,
                    UserManager.DISALLOW_CONFIG_DEFAULT_APPS
    );

    /**