Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

SecurityManager

extends Object
java.lang.Object
   ↳ java.lang.SecurityManager

Class Overview

Legacy security code; do not use.

Security managers do not provide a secure environment for executing untrusted code. Untrusted code cannot be safely isolated within the Dalvik VM.

Summary

Fields
protected boolean inCheck This field was deprecated in API level 1. Use checkPermission(Permission) instead.
Public Constructors
SecurityManager ()
Public Methods
void checkAccept ( String host, int port)
void checkAccess ( ThreadGroup group)
void checkAccess ( Thread thread)
void checkAwtEventQueueAccess ()
void checkConnect ( String host, int port, Object context)
void checkConnect ( String host, int port)
void checkCreateClassLoader ()
void checkDelete ( String file)
void checkExec ( String cmd)
void checkExit (int status)
void checkLink ( String libName)
void checkListen (int port)
void , int)">checkMemberAccess ( Class <?> cls, int type)
void checkMulticast ( InetAddress maddr)
void checkMulticast ( InetAddress maddr, byte ttl)
This method was deprecated in API level 1. use checkMulticast(java.net.InetAddress) instead.
void checkPackageAccess ( String packageName)
void checkPackageDefinition ( String packageName)
void checkPermission ( Permission permission)
void checkPermission ( Permission permission, Object context)
void checkPrintJobAccess ()
void checkPropertiesAccess ()
void checkPropertyAccess ( String key)
void checkRead ( String file)
void checkRead ( FileDescriptor fd)
void checkRead ( String file, Object context)
void checkSecurityAccess ( String target)
void checkSetFactory ()
void checkSystemClipboardAccess ()
boolean checkTopLevelWindow ( Object window)
void checkWrite ( FileDescriptor fd)
void checkWrite ( String file)
boolean getInCheck ()
This method was deprecated in API level 1. Use checkPermission(Permission) instead.
Object getSecurityContext ()
ThreadGroup getThreadGroup ()
Returns the current thread's thread group.
Protected Methods
int classDepth ( String name)
This method was deprecated in API level 1. Use checkPermission(Permission) instead.
int classLoaderDepth ()
This method was deprecated in API level 1. Use checkPermission(Permission) instead.
ClassLoader currentClassLoader ()
This method was deprecated in API level 1. Use checkPermission(Permission) instead.
Class <?> currentLoadedClass ()
This method was deprecated in API level 1. Use checkPermission(Permission) instead.
Class[] getClassContext ()
boolean inClass ( String name)
This method was deprecated in API level 1. Use checkPermission(Permission) instead.
boolean inClassLoader ()
This method was deprecated in API level 1. Use checkPermission(Permission) instead.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected boolean inCheck

Added in API level 1

This field was deprecated in API level 1.
Use checkPermission(Permission) instead.

Public Constructors

public SecurityManager ()

Added in API level 1

Public Methods

public void checkAccept ( String host, int port)

Added in API level 1

public void checkAccess ( ThreadGroup group)

Added in API level 1

public void checkAccess ( Thread thread)

Added in API level 1

public void checkAwtEventQueueAccess ()

Added in API level 1

public void checkConnect ( String host, int port, Object context)

Added in API level 1

public void checkConnect ( String host, int port)

Added in API level 1

public void checkCreateClassLoader ()

Added in API level 1

public void checkDelete ( String file)

Added in API level 1

public void checkExec ( String cmd)

Added in API level 1

public void checkExit (int status)

Added in API level 1

public void checkLink ( String libName)

Added in API level 1

public void checkListen (int port)

Added in API level 1

, int)">

public void checkMemberAccess ( Class <?> cls, int type)

Added in API level 1

public void checkMulticast ( InetAddress maddr)

Added in API level 1

public void checkMulticast ( InetAddress maddr, byte ttl)

Added in API level 1

This method was deprecated in API level 1.
use checkMulticast(java.net.InetAddress) instead.

public void checkPackageAccess ( String packageName)

Added in API level 1

public void checkPackageDefinition ( String packageName)

Added in API level 1

public void checkPermission ( Permission permission)

Added in API level 1

public void checkPermission ( Permission permission, Object context)

Added in API level 1

public void checkPrintJobAccess ()

Added in API level 1

public void checkPropertiesAccess ()

Added in API level 1

public void checkPropertyAccess ( String key)

Added in API level 1

public void checkRead ( String file)

Added in API level 1

public void checkRead ( FileDescriptor fd)

Added in API level 1

public void checkRead ( String file, Object context)

Added in API level 1

public void checkSecurityAccess ( String target)

Added in API level 1

public void checkSetFactory ()

Added in API level 1

public void checkSystemClipboardAccess ()

Added in API level 1

public boolean checkTopLevelWindow ( Object window)

Added in API level 1

public void checkWrite ( FileDescriptor fd)

Added in API level 1

public void checkWrite ( String file)

Added in API level 1

public boolean getInCheck ()

Added in API level 1

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

public Object getSecurityContext ()

Added in API level 1

public ThreadGroup getThreadGroup ()

Added in API level 1

Returns the current thread's thread group.

Protected Methods

protected int classDepth ( String name)

Added in API level 1

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

protected int classLoaderDepth ()

Added in API level 1

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

protected ClassLoader currentClassLoader ()

Added in API level 1

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

protected Class <?> currentLoadedClass ()

Added in API level 1

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

protected Class[] getClassContext ()

Added in API level 1

protected boolean inClass ( String name)

Added in API level 1

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.

protected boolean inClassLoader ()

Added in API level 1

This method was deprecated in API level 1.
Use checkPermission(Permission) instead.