Stay organized with collections
Save and categorize content based on your preferences.
AccessController
class AccessController
Android doesn't support SecurityManager
. Do not use this class.
Summary
Public methods |
static Unit |
|
static T |
Calls action.run() .
|
static T |
Calls action.run() .
|
static T |
Calls action.run() .
|
static T |
Calls action.run() .
|
static T |
Calls action.run() .
|
static T |
Calls action.run() .
|
static AccessControlContext! |
|
Public methods
doPrivileged
static fun <T : Any!> doPrivileged(action: PrivilegedAction<T>!): T
Calls action.run()
.
doPrivilegedWithCombiner
static fun <T : Any!> doPrivilegedWithCombiner(action: PrivilegedAction<T>!): T
Calls action.run()
.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# AccessController\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAccessController\n================\n\n```\nclass AccessController\n```\n\n|---|-------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [java.security.AccessController](#) |\n\nAndroid doesn't support [SecurityManager](../lang/SecurityManager.html#). Do not use this class.\n\nSummary\n-------\n\n| Public methods ||\n|--------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [checkPermission](#checkPermission(java.security.Permission))`(`perm:` `[Permission](/reference/kotlin/java/security/Permission)!`)` \u003cbr /\u003e |\n| static T | [doPrivileged](#doPrivileged(java.security.PrivilegedAction))`(`action:` `[PrivilegedAction](/reference/kotlin/java/security/PrivilegedAction)\u003cT\u003e!`)` Calls `action.run()`. |\n| static T | [doPrivileged](#doPrivileged(java.security.PrivilegedAction,%20java.security.AccessControlContext))`(`action:` `[PrivilegedAction](/reference/kotlin/java/security/PrivilegedAction)\u003cT\u003e!`, `context:` `[AccessControlContext](/reference/kotlin/java/security/AccessControlContext)!`)` Calls `action.run()`. |\n| static T | [doPrivileged](#doPrivileged(java.security.PrivilegedExceptionAction))`(`action:` `[PrivilegedExceptionAction](/reference/kotlin/java/security/PrivilegedExceptionAction)\u003cT\u003e!`)` Calls `action.run()`. |\n| static T | [doPrivileged](#doPrivileged(java.security.PrivilegedExceptionAction,%20java.security.AccessControlContext))`(`action:` `[PrivilegedExceptionAction](/reference/kotlin/java/security/PrivilegedExceptionAction)\u003cT\u003e!`, `context:` `[AccessControlContext](/reference/kotlin/java/security/AccessControlContext)!`)` Calls `action.run()`. |\n| static T | [doPrivilegedWithCombiner](#doPrivilegedWithCombiner(java.security.PrivilegedAction))`(`action:` `[PrivilegedAction](/reference/kotlin/java/security/PrivilegedAction)\u003cT\u003e!`)` Calls `action.run()`. |\n| static T | [doPrivilegedWithCombiner](#doPrivilegedWithCombiner(java.security.PrivilegedExceptionAction))`(`action:` `[PrivilegedExceptionAction](/reference/kotlin/java/security/PrivilegedExceptionAction)\u003cT\u003e!`)` Calls `action.run()`. |\n| static [AccessControlContext](/reference/kotlin/java/security/AccessControlContext)! | [getContext](#getContext())`()` \u003cbr /\u003e |\n\nPublic methods\n--------------\n\n### checkPermission\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic fun checkPermission(perm: Permission!): Unit\n``` \n\n### doPrivileged\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic fun \u003cT : Any!\u003e doPrivileged(action: PrivilegedAction\u003cT\u003e!): T\n```\n\nCalls `action.run()`. \n\n### doPrivileged\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic fun \u003cT : Any!\u003e doPrivileged(\n action: PrivilegedAction\u003cT\u003e!, \n context: AccessControlContext!\n): T\n```\n\nCalls `action.run()`. \n\n### doPrivileged\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic fun \u003cT : Any!\u003e doPrivileged(action: PrivilegedExceptionAction\u003cT\u003e!): T\n```\n\nCalls `action.run()`. \n\n### doPrivileged\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic fun \u003cT : Any!\u003e doPrivileged(\n action: PrivilegedExceptionAction\u003cT\u003e!, \n context: AccessControlContext!\n): T\n```\n\nCalls `action.run()`. \n\n### doPrivilegedWithCombiner\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic fun \u003cT : Any!\u003e doPrivilegedWithCombiner(action: PrivilegedAction\u003cT\u003e!): T\n```\n\nCalls `action.run()`. \n\n### doPrivilegedWithCombiner\n\nAdded in [API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic fun \u003cT : Any!\u003e doPrivilegedWithCombiner(action: PrivilegedExceptionAction\u003cT\u003e!): T\n```\n\nCalls `action.run()`. \n\n### getContext\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic fun getContext(): AccessControlContext!\n```"]]