diff options
author | Mike Lockwood <lockwood@android.com> | 2011-03-24 08:12:30 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-04-04 18:54:03 -0400 |
commit | 8fa5f804e21233c5f1993212fd5fb7c200eec905 (patch) | |
tree | c79c5fe5ab468870918659cf6eb01805c2c05c6f /services | |
parent | 7fa24aa8da3d2ab22b3a7d53fe64d14c31c076b8 (diff) | |
download | frameworks_base-8fa5f804e21233c5f1993212fd5fb7c200eec905.zip frameworks_base-8fa5f804e21233c5f1993212fd5fb7c200eec905.tar.gz frameworks_base-8fa5f804e21233c5f1993212fd5fb7c200eec905.tar.bz2 |
StorageManager: Add getVolumeList() and getVolumeState() methods
Change-Id: Icf3301827dd27e8430bd44eaafde517a31ef035a
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/MountService.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java index 59f0852..1547127 100644 --- a/services/java/com/android/server/MountService.java +++ b/services/java/com/android/server/MountService.java @@ -65,6 +65,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Set; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; @@ -1732,6 +1733,18 @@ class MountService extends IMountService.Stub implements INativeDaemonConnectorC } } + public String[] getVolumeList() { + synchronized(mVolumeStates) { + Set<String> volumes = mVolumeStates.keySet(); + String[] result = new String[volumes.size()]; + int i = 0; + for (String volume : volumes) { + result[i++] = volume; + } + return result; + } + } + private void addObbStateLocked(ObbState obbState) throws RemoteException { final IBinder binder = obbState.getBinder(); List<ObbState> obbStates = mObbMounts.get(binder); |