UserManager.HasUserRestriction(String) Method

Definition

Returns whether the context user has been disallowed from performing certain actions or setting certain settings.

[Android.Runtime.Register("hasUserRestriction", "(Ljava/lang/String;)Z", "GetHasUserRestriction_Ljava_lang_String_Handler")]
public virtual bool HasUserRestriction (string? restrictionKey);
[<Android.Runtime.Register("hasUserRestriction", "(Ljava/lang/String;)Z", "GetHasUserRestriction_Ljava_lang_String_Handler")>]
abstract member HasUserRestriction : string -> bool
override this.HasUserRestriction : string -> bool

Parameters

restrictionKey
String

The string key representing the restriction.

Returns

true if the context user has the given restriction, false otherwise.

Attributes

Remarks

Returns whether the context user has been disallowed from performing certain actions or setting certain settings.

Java documentation for android.os.UserManager.hasUserRestriction(java.lang.String).

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