共用方式為


JavaSystem.SecurityManager Property

Definition

Always returns null in Android -or- Throws SecurityException (except in case sm == null).

public static Java.Lang.SecurityManager? SecurityManager { [Android.Runtime.Register("getSecurityManager", "()Ljava/lang/SecurityManager;", "")] get; [Android.Runtime.Register("setSecurityManager", "(Ljava/lang/SecurityManager;)V", "")] set; }
[<get: Android.Runtime.Register("getSecurityManager", "()Ljava/lang/SecurityManager;", "")>]
[<set: Android.Runtime.Register("setSecurityManager", "(Ljava/lang/SecurityManager;)V", "")>]
static member SecurityManager : Java.Lang.SecurityManager with get, set

Property Value

null in Android

Attributes

Exceptions

Remarks

Property getter documentation:

Always returns null in Android

Java documentation for java.lang.System.getSecurityManager().

Property setter documentation:

Throws SecurityException (except in case sm == null).

Security managers do not provide a secure environment for executing untrusted code and are unsupported on Android. Untrusted code cannot be safely isolated within a single VM on Android, so this method always throws a SecurityException when passed a non-null SecurityManager

Java documentation for java.lang.System.setSecurityManager(java.lang.SecurityManager).

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