ContextWrapper.EnforcePermission(String, Int32, Int32, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
If the given permission is not allowed for a particular process and user ID running in the system, throw a SecurityException.
[Android.Runtime.Register("enforcePermission", "(Ljava/lang/String;IILjava/lang/String;)V", "GetEnforcePermission_Ljava_lang_String_IILjava_lang_String_Handler")]
public override void EnforcePermission (string? permission, int pid, int uid, string? message);
[<Android.Runtime.Register("enforcePermission", "(Ljava/lang/String;IILjava/lang/String;)V", "GetEnforcePermission_Ljava_lang_String_IILjava_lang_String_Handler")>]
override this.EnforcePermission : string * int * int * string -> unit
Parameters
- permission
- String
The name of the permission being checked.
- pid
- Int32
The process ID being checked against. Must be > 0.
- uid
- Int32
The user ID being checked against. A uid of 0 is the root user, which will pass every permission check.
- message
- String
A message to include in the exception if it is thrown.
- Attributes
Remarks
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.