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 is deprecated. Use checkPermission(Permission)
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 checkMemberAccess(Class<?> cls, int type)
void checkMulticast(InetAddress maddr)
void checkMulticast(InetAddress maddr, byte ttl)
This method is deprecated. use checkMulticast(java.net.InetAddress)
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 is deprecated. Use checkPermission(Permission).
Object getSecurityContext()
ThreadGroup getThreadGroup()
Returns the current thread's thread group.
Protected Methods
int classDepth(String name)
This method is deprecated. Use checkPermission(Permission).
int classLoaderDepth()
This method is deprecated. Use checkPermission(Permission).
ClassLoader currentClassLoader()
This method is deprecated. Use checkPermission(Permission).
Class<?> currentLoadedClass()
This method is deprecated. Use checkPermission(Permission).
Class[] getClassContext()
boolean inClass(String name)
This method is deprecated. Use checkPermission(Permission).
boolean inClassLoader()
This method is deprecated. Use checkPermission(Permission)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

protected boolean inCheck

Since: API Level 1

This field is deprecated.
Use checkPermission(Permission)

Public Constructors

public SecurityManager ()

Since: API Level 1

Public Methods

public void checkAccept (String host, int port)

Since: API Level 1

public void checkAccess (ThreadGroup group)

Since: API Level 1

public void checkAccess (Thread thread)

Since: API Level 1

public void checkAwtEventQueueAccess ()

Since: API Level 1

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

Since: API Level 1

public void checkConnect (String host, int port)

Since: API Level 1

public void checkCreateClassLoader ()

Since: API Level 1

public void checkDelete (String file)

Since: API Level 1

public void checkExec (String cmd)

Since: API Level 1

public void checkExit (int status)

Since: API Level 1

public void checkLink (String libName)

Since: API Level 1

public void checkListen (int port)

Since: API Level 1

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

Since: API Level 1

public void checkMulticast (InetAddress maddr)

Since: API Level 1

public void checkMulticast (InetAddress maddr, byte ttl)

Since: API Level 1

This method is deprecated.
use checkMulticast(java.net.InetAddress)

public void checkPackageAccess (String packageName)

Since: API Level 1

public void checkPackageDefinition (String packageName)

Since: API Level 1

public void checkPermission (Permission permission)

Since: API Level 1

public void checkPermission (Permission permission, Object context)

Since: API Level 1

public void checkPrintJobAccess ()

Since: API Level 1

public void checkPropertiesAccess ()

Since: API Level 1

public void checkPropertyAccess (String key)

Since: API Level 1

public void checkRead (String file)

Since: API Level 1

public void checkRead (FileDescriptor fd)

Since: API Level 1

public void checkRead (String file, Object context)

Since: API Level 1

public void checkSecurityAccess (String target)

Since: API Level 1

public void checkSetFactory ()

Since: API Level 1

public void checkSystemClipboardAccess ()

Since: API Level 1

public boolean checkTopLevelWindow (Object window)

Since: API Level 1

public void checkWrite (FileDescriptor fd)

Since: API Level 1

public void checkWrite (String file)

Since: API Level 1

public boolean getInCheck ()

Since: API Level 1

This method is deprecated.
Use checkPermission(Permission).

public Object getSecurityContext ()

Since: API Level 1

public ThreadGroup getThreadGroup ()

Since: API Level 1

Returns the current thread's thread group.

Protected Methods

protected int classDepth (String name)

Since: API Level 1

This method is deprecated.
Use checkPermission(Permission).

protected int classLoaderDepth ()

Since: API Level 1

This method is deprecated.
Use checkPermission(Permission).

protected ClassLoader currentClassLoader ()

Since: API Level 1

This method is deprecated.
Use checkPermission(Permission).

protected Class<?> currentLoadedClass ()

Since: API Level 1

This method is deprecated.
Use checkPermission(Permission).

protected Class[] getClassContext ()

Since: API Level 1

protected boolean inClass (String name)

Since: API Level 1

This method is deprecated.
Use checkPermission(Permission).

protected boolean inClassLoader ()

Since: API Level 1

This method is deprecated.
Use checkPermission(Permission)