Compartir a través de


UserManager.DisallowAddUser Field

Definition

Specifies if a user is disallowed from adding new users.

[Android.Runtime.Register("DISALLOW_ADD_USER")]
public const string DisallowAddUser;
[<Android.Runtime.Register("DISALLOW_ADD_USER")>]
val mutable DisallowAddUser : string

Field Value

Attributes

Remarks

Specifies if a user is disallowed from adding new users. This can only be set by device owners or profile owners on the primary user. The default value is false.

This restriction has no effect on secondary users and managed profiles since only the primary user can add other users.

When the device is an organization-owned device provisioned with a managed profile, this restriction will be set as a base restriction which cannot be removed by any admin.

Holders of the permission android.Manifest.permission#MANAGE_DEVICE_POLICY_USERS can set this restriction using the DevicePolicyManager APIs mentioned below.

Key for user restrictions.

Type: Boolean

Java documentation for android.os.UserManager.DISALLOW_ADD_USER.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also