Skip to content

Most visited

Recently visited

navigation

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

From class java.lang.Object

Public methods

checkPermission

added in API level 1
void checkPermission (Permission perm)

Parameters
perm Permission

Throws
AccessControlException

doPrivileged

added in API level 1
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
T doPrivileged (PrivilegedExceptionAction<T> action)

Calls action.run().

Parameters
action PrivilegedExceptionAction

Returns
T

Throws
PrivilegedActionException

doPrivileged

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

Calls action.run().

Parameters
action PrivilegedAction

Returns
T

doPrivileged

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

Calls action.run().

Parameters
action PrivilegedAction

context AccessControlContext

Returns
T

doPrivilegedWithCombiner

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

Calls action.run().

Parameters
action PrivilegedAction

Returns
T

doPrivilegedWithCombiner

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

Calls action.run().

Parameters
action PrivilegedExceptionAction

Returns
T

Throws
PrivilegedActionException

getContext

added in API level 1
AccessControlContext getContext ()

Returns
AccessControlContext

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)