diff options
author | San Mehat <san@google.com> | 2010-02-05 08:26:50 -0800 |
---|---|---|
committer | San Mehat <san@google.com> | 2010-02-09 11:03:16 -0800 |
commit | b104340496e3a531e26c8f428c808eca0e039f50 (patch) | |
tree | 11247cb68359d43ca4871c0cb0165c9bec339a6f /packages | |
parent | 3ee1317173260252d475772fec09d492f8fcfd33 (diff) | |
download | frameworks_base-b104340496e3a531e26c8f428c808eca0e039f50.zip frameworks_base-b104340496e3a531e26c8f428c808eca0e039f50.tar.gz frameworks_base-b104340496e3a531e26c8f428c808eca0e039f50.tar.bz2 |
Framework: Clean up / Refactor Mount APIs
- Move android.storage.* -> android.os.storage.* and refactor users
- Refactor generic shares back to explicit ums enable/disable/isEnabled
- Remove media insert/removed event callbacks (not ready for Froyo)
- Remove 'label' from volume state change callbacks
- Add public API functions for enabling/disabling USB mass storage (permissions enforced
in MountSevice)
- Remove some stray un-needed import lines
- Move android.os.IMountService / android.os.IMountServiceListener -> android.os.storage
- Improve code comments
Updated:
MountService: Add dup state check and move debugging behind a conditional
UsbStorageActivity: Fix review comments + a TODO
StorageNotification: Add @Override tags
StorageManager: Don't use a static Listener list
MountService: Reduce bloat and fix == where I meant .equals()
PackageManagerTests: Update for new API
Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'packages')
-rw-r--r-- | packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java index d23b7d0..fecd366 100644 --- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java +++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java @@ -6,8 +6,8 @@ import android.content.Intent; import android.net.Uri; import android.os.Debug; import android.os.IBinder; -import android.os.IMountService; -import android.os.MountServiceResultCode; +import android.os.storage.IMountService; +import android.os.storage.StorageResultCode; import android.os.ParcelFileDescriptor; import android.os.Process; import android.os.RemoteException; @@ -158,12 +158,12 @@ public class DefaultContainerService extends Service { int rc = mountService.createSecureContainer( containerId, mbLen, "vfat", sdEncKey, ownerUid); - if (rc != MountServiceResultCode.OperationSucceeded) { + if (rc != StorageResultCode.OperationSucceeded) { Log.e(TAG, String.format("Container creation failed (%d)", rc)); // XXX: This destroy should not be necessary rc = mountService.destroySecureContainer(containerId); - if (rc != MountServiceResultCode.OperationSucceeded) { + if (rc != StorageResultCode.OperationSucceeded) { Log.e(TAG, String.format("Container creation-cleanup failed (%d)", rc)); return null; } @@ -171,7 +171,7 @@ public class DefaultContainerService extends Service { // XXX: Does this ever actually succeed? rc = mountService.createSecureContainer( containerId, mbLen, "vfat", sdEncKey, ownerUid); - if (rc != MountServiceResultCode.OperationSucceeded) { + if (rc != StorageResultCode.OperationSucceeded) { Log.e(TAG, String.format("Container creation retry failed (%d)", rc)); } } @@ -226,7 +226,7 @@ public class DefaultContainerService extends Service { private String mountSdDir(String containerId, String key) { try { int rc = getMountService().mountSecureContainer(containerId, key, Process.myUid()); - if (rc == MountServiceResultCode.OperationSucceeded) { + if (rc == StorageResultCode.OperationSucceeded) { return getMountService().getSecureContainerPath(containerId); } else { Log.e(TAG, String.format("Failed to mount id %s with rc %d ", containerId, rc)); |