From 50c294f21b3348010c3f91c5a998d54e1e45d2e4 Mon Sep 17 00:00:00 2001 From: Andy Stadler Date: Mon, 7 Mar 2011 19:13:42 -0800 Subject: Clarify rules about encryption of emulated storage. Bug: 3351426 Change-Id: I3a8fcd369862f3eab1781699108e29fe7ab474a0 --- core/java/android/app/admin/DevicePolicyManager.java | 8 ++++++-- core/java/android/os/Environment.java | 11 +++++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java index 440cb5406b85..efe263336063 100644 --- a/core/java/android/app/admin/DevicePolicyManager.java +++ b/core/java/android/app/admin/DevicePolicyManager.java @@ -1150,8 +1150,12 @@ public class DevicePolicyManager { * fail (most commonly returning {@link #ENCRYPTION_STATUS_ACTIVE}). * *

This policy controls encryption of the secure (application data) storage area. Data - * written to other areas (e.g. the directory returned by - * {@link android.os.Environment#getExternalStorageDirectory()} may or may not be encrypted. + * written to other storage areas may or may not be encrypted, and this policy does not require + * or control the encryption of any other storage areas. + * There is one exception: If {@link android.os.Environment#isExternalStorageEmulated()} is + * {@code true}, then the directory returned by + * {@link android.os.Environment#getExternalStorageDirectory()} must be written to disk + * within the encrypted storage area. * *

Important Note: On some devices, it is possible to encrypt storage without requiring * the user to create a device PIN or Password. In this case, the storage is encrypted, but diff --git a/core/java/android/os/Environment.java b/core/java/android/os/Environment.java index ec5030c7f5db..e308c2c48a8d 100644 --- a/core/java/android/os/Environment.java +++ b/core/java/android/os/Environment.java @@ -423,9 +423,16 @@ public class Environment { /** * Returns whether the device has an external storage device which is - * emulated. If true, the device does not have real external storage - * and certain system services such as the package manager use this + * emulated. If true, the device does not have real external storage, and the directory + * returned by {@link #getExternalStorageDirectory()} will be allocated using a portion of + * the internal storage system. + * + *

Certain system services, such as the package manager, use this * to determine where to install an application. + * + *

Emulated external storage may also be encrypted - see + * {@link android.app.admin.DevicePolicyManager#setStorageEncryption( + * android.content.ComponentName, boolean)} for additional details. */ public static boolean isExternalStorageEmulated() { if (mIsExternalStorageEmulated == null) { -- cgit v1.2.3-59-g8ed1b