Join us on the livestream at Android Dev Summit on 7-8 November 2018, starting at 10AM PDT!
added in API level 1

AccessController

public final class AccessController
extends Object

java.lang.Object
   ↳ java.security.AccessController


Legacy security code; do not use.

Summary

Public methods

static void checkPermission(Permission perm)
static <T> T doPrivileged(PrivilegedExceptionAction<T> action, AccessControlContext context)

Calls action.run().

static <T> T doPrivileged(PrivilegedExceptionAction<T> action)

Calls action.run().

static <T> T doPrivileged(PrivilegedAction<T> action)

Calls action.run().

static <T> T doPrivileged(PrivilegedAction<T> action, AccessControlContext context)

Calls action.run().

static <T> T doPrivilegedWithCombiner(PrivilegedAction<T> action)

Calls action.run().

static <T> T doPrivilegedWithCombiner(PrivilegedExceptionAction<T> action)

Calls action.run().

static AccessControlContext getContext()

Inherited methods

Public methods

checkPermission

added in API level 1
public static void checkPermission (Permission perm)

Parameters
perm Permission

Throws
AccessControlException

doPrivileged

added in API level 1
public static T doPrivileged (PrivilegedExceptionAction<T> action, 
                AccessControlContext context)

Calls action.run().

Parameters
action PrivilegedExceptionAction

context AccessControlContext

Returns
T

Throws
PrivilegedActionException

doPrivileged

added in API level 1
public static T doPrivileged (PrivilegedExceptionAction<T> action)

Calls action.run().

Parameters
action PrivilegedExceptionAction

Returns
T

Throws
PrivilegedActionException

doPrivileged

added in API level 1
public static T doPrivileged (PrivilegedAction<T> action)

Calls action.run().

Parameters
action PrivilegedAction

Returns
T

doPrivileged

added in API level 1
public static T doPrivileged (PrivilegedAction<T> action, 
                AccessControlContext context)

Calls action.run().

Parameters
action PrivilegedAction

context AccessControlContext

Returns
T

doPrivilegedWithCombiner

added in API level 9
public static T doPrivilegedWithCombiner (PrivilegedAction<T> action)

Calls action.run().

Parameters
action PrivilegedAction

Returns
T

doPrivilegedWithCombiner

added in API level 9
public static T doPrivilegedWithCombiner (PrivilegedExceptionAction<T> action)

Calls action.run().

Parameters
action PrivilegedExceptionAction

Returns
T

Throws
PrivilegedActionException

getContext

added in API level 1
public static AccessControlContext getContext ()

Returns
AccessControlContext