diff options
author | Kenny Root <kroot@google.com> | 2010-10-12 11:20:01 -0700 |
---|---|---|
committer | Kenny Root <kroot@google.com> | 2010-10-12 11:30:56 -0700 |
commit | e1ff214e32ed5c546a7603b07b054908c4d93312 (patch) | |
tree | d61485a78a33eaedf4494cbdf21e48225d49b4e7 /packages/DefaultContainerService | |
parent | 84e8827a477cdf3d8c2b67e370395b22ec1963ad (diff) | |
download | frameworks_base-e1ff214e32ed5c546a7603b07b054908c4d93312.zip frameworks_base-e1ff214e32ed5c546a7603b07b054908c4d93312.tar.gz frameworks_base-e1ff214e32ed5c546a7603b07b054908c4d93312.tar.bz2 |
Add API to check for emulated external storage
When the storage is emulated, we don't want to install ASEC containers
to it. This adds the API to check when the external storage is emulated
and uses it to check whether or not to install packages to the external
storage in an ASEC container.
Bug: 3024387
Change-Id: Ia0318aca9e4938a4897deaada5603a4c7c1d0f48
Diffstat (limited to 'packages/DefaultContainerService')
-rw-r--r-- | packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java index ce10f5b..e6624ae 100644 --- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java +++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java @@ -440,7 +440,7 @@ public class DefaultContainerService extends IntentService { String status = Environment.getExternalStorageState(); long availSDSize = -1; boolean mediaAvailable = false; - if (status.equals(Environment.MEDIA_MOUNTED)) { + if (!Environment.isExternalStorageEmulated() && status.equals(Environment.MEDIA_MOUNTED)) { StatFs sdStats = new StatFs( Environment.getExternalStorageDirectory().getPath()); availSDSize = (long)sdStats.getAvailableBlocks() * |