Stay organized with collections
Save and categorize content based on your preferences.
SecurityStateManager
open class SecurityStateManager
SecurityStateManager provides the functionality to query the security status of the system and platform components. For example, this includes the system and vendor security patch level.
Summary
Constants |
static String |
The kernel version key returned as part of the Bundle from getGlobalSecurityState .
|
static String |
The system SPL key returned as part of the Bundle from getGlobalSecurityState .
|
static String |
The vendor SPL key returned as part of the Bundle from getGlobalSecurityState .
|
Public methods |
open Bundle |
Returns the current global security state.
|
Constants
KEY_KERNEL_VERSION
static val KEY_KERNEL_VERSION: String
The kernel version key returned as part of the Bundle
from getGlobalSecurityState
.
Value: "kernel_version"
KEY_SYSTEM_SPL
static val KEY_SYSTEM_SPL: String
The system SPL key returned as part of the Bundle
from getGlobalSecurityState
.
Value: "system_spl"
KEY_VENDOR_SPL
static val KEY_VENDOR_SPL: String
The vendor SPL key returned as part of the Bundle
from getGlobalSecurityState
.
Value: "vendor_spl"
Public methods
getGlobalSecurityState
open fun getGlobalSecurityState(): Bundle
Returns the current global security state. Each key-value pair is a mapping of a component of the global security state to its current version/SPL (security patch level). For example, the KEY_SYSTEM_SPL
key will map to the SPL of the system as defined in android.os.Build.VERSION
. The bundle will also include mappings from WebView packages and packages listed under config config_securityStatePackages
to their respective versions as defined in android.content.pm.PackageInfo#versionName
.
Return |
Bundle |
A Bundle that contains the global security state information as string-to-string key-value pairs. This value cannot be null . |
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# SecurityStateManager\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nSecurityStateManager\n====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/os/SecurityStateManager \"View this page in Java\") \n\n```\nopen class SecurityStateManager\n```\n\n|---|--------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.os.SecurityStateManager](#) |\n\nSecurityStateManager provides the functionality to query the security status of the system and platform components. For example, this includes the system and vendor security patch level.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_KERNEL_VERSION](#KEY_KERNEL_VERSION:kotlin.String) The kernel version key returned as part of the `Bundle` from `getGlobalSecurityState`. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_SYSTEM_SPL](#KEY_SYSTEM_SPL:kotlin.String) The system SPL key returned as part of the `Bundle` from `getGlobalSecurityState`. |\n| static [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [KEY_VENDOR_SPL](#KEY_VENDOR_SPL:kotlin.String) The vendor SPL key returned as part of the `Bundle` from `getGlobalSecurityState`. |\n\n| Public methods ||\n|----------------------------------------------------|----------------------------------------------------------------------------------------------------|\n| open [Bundle](/reference/kotlin/android/os/Bundle) | [getGlobalSecurityState](#getGlobalSecurityState())`()` Returns the current global security state. |\n\nConstants\n---------\n\n### KEY_KERNEL_VERSION\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val KEY_KERNEL_VERSION: String\n```\n\nThe kernel version key returned as part of the `Bundle` from `getGlobalSecurityState`. \n\n Value: \"kernel_version\"\n\n### KEY_SYSTEM_SPL\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val KEY_SYSTEM_SPL: String\n```\n\nThe system SPL key returned as part of the `Bundle` from `getGlobalSecurityState`. \n\n Value: \"system_spl\"\n\n### KEY_VENDOR_SPL\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val KEY_VENDOR_SPL: String\n```\n\nThe vendor SPL key returned as part of the `Bundle` from `getGlobalSecurityState`. \n\n Value: \"vendor_spl\"\n\nPublic methods\n--------------\n\n### getGlobalSecurityState\n\nAdded in [API level 35](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getGlobalSecurityState(): Bundle\n```\n\nReturns the current global security state. Each key-value pair is a mapping of a component of the global security state to its current version/SPL (security patch level). For example, the `KEY_SYSTEM_SPL` key will map to the SPL of the system as defined in [android.os.Build.VERSION](/reference/kotlin/android/os/Build.VERSION). The bundle will also include mappings from WebView packages and packages listed under config `config_securityStatePackages` to their respective versions as defined in [android.content.pm.PackageInfo#versionName](../content/pm/PackageInfo.html#versionName:kotlin.String).\n\n| Return ||\n|-----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|\n| [Bundle](/reference/kotlin/android/os/Bundle) | A `Bundle` that contains the global security state information as string-to-string key-value pairs. This value cannot be `null`. |"]]