共用方式為


UserManager.SetUserRestrictions(Bundle, UserHandle) Method

Definition

Caution

deprecated

This will no longer work.

[Android.Runtime.Register("setUserRestrictions", "(Landroid/os/Bundle;Landroid/os/UserHandle;)V", "GetSetUserRestrictions_Landroid_os_Bundle_Landroid_os_UserHandle_Handler")]
[System.Obsolete("deprecated")]
public virtual void SetUserRestrictions (Android.OS.Bundle? restrictions, Android.OS.UserHandle? userHandle);
[<Android.Runtime.Register("setUserRestrictions", "(Landroid/os/Bundle;Landroid/os/UserHandle;)V", "GetSetUserRestrictions_Landroid_os_Bundle_Landroid_os_UserHandle_Handler")>]
[<System.Obsolete("deprecated")>]
abstract member SetUserRestrictions : Android.OS.Bundle * Android.OS.UserHandle -> unit
override this.SetUserRestrictions : Android.OS.Bundle * Android.OS.UserHandle -> unit

Parameters

restrictions
Bundle

the Bundle containing all the restrictions.

userHandle
UserHandle

the UserHandle of the user for whom to set the restrictions.

Attributes

Remarks

This will no longer work. Device owners and profile owners should use DevicePolicyManager#addUserRestriction(ComponentName, String) instead.

Java documentation for android.os.UserManager.setUserRestrictions(android.os.Bundle, android.os.UserHandle).

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