Language

EncryptionStatus Enum

Definition

Enumerates values returned by several types.

public enum EncryptionStatus
type EncryptionStatus = 
Inheritance
EncryptionStatus

Fields

Name Value Description
Unsupported 0

Result code for setStorageEncryption(ComponentName, boolean) and getStorageEncryptionStatus(): indicating that encryption is not supported.

Android reference for android.app.admin.DevicePolicyManager.ENCRYPTION_STATUS_UNSUPPORTED.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Inactive 1

Result code for setStorageEncryption(ComponentName, boolean) and getStorageEncryptionStatus(): indicating that encryption is supported, but is not currently active.

getStorageEncryptionStatus() can only return this value on devices that use Full Disk Encryption. Support for Full Disk Encryption was entirely removed in API level 33, having been replaced by File Based Encryption. Devices that use File Based Encryption always automatically activate their encryption on first boot.

setStorageEncryption(ComponentName, boolean) can still return this value for an unrelated reason, but setStorageEncryption(ComponentName, boolean) is deprecated since it doesn't do anything useful.

Android reference for android.app.admin.DevicePolicyManager.ENCRYPTION_STATUS_INACTIVE.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Activating 2

This constant was deprecated in API level 34. This result code has never actually been used, so there is no reason for apps to check for it.

Result code for getStorageEncryptionStatus(): indicating that encryption is not currently active, but is currently being activated.

Android reference for android.app.admin.DevicePolicyManager.ENCRYPTION_STATUS_ACTIVATING.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Active 3

Result code for setStorageEncryption(ComponentName, boolean) and getStorageEncryptionStatus(): indicating that encryption is active.

getStorageEncryptionStatus() can only return this value for apps targeting API level 23 or lower, or on devices that use Full Disk Encryption. Support for Full Disk Encryption was entirely removed in API level 33, having been replaced by File Based Encryption. The result code ENCRYPTION_STATUS_ACTIVE_PER_USER is used on devices that use File Based Encryption, except when the app targets API level 23 or lower.

setStorageEncryption(ComponentName, boolean) can still return this value for an unrelated reason, but setStorageEncryption(ComponentName, boolean) is deprecated since it doesn't do anything useful.

Android reference for android.app.admin.DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

ActiveDefaultKey 4

Result code for getStorageEncryptionStatus(): indicating that encryption is active, but the encryption key is not cryptographically protected by the user's credentials.

This value can only be returned on devices that use Full Disk Encryption. Support for Full Disk Encryption was entirely removed in API level 33, having been replaced by File Based Encryption. With File Based Encryption, each user's credential-encrypted storage is always cryptographically protected by the user's credentials.

Android reference for android.app.admin.DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE_DEFAULT_KEY.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

ActivePerUser 5

Result code for getStorageEncryptionStatus(): indicating that encryption is active and the encryption key is tied to the user or profile.

This value is only returned to apps targeting API level 24 and above. For apps targeting earlier API levels, ENCRYPTION_STATUS_ACTIVE is returned, even if the encryption key is specific to the user or profile.

Android reference for android.app.admin.DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE_PER_USER.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to