diff options
author | Mike Lockwood <lockwood@android.com> | 2011-04-04 17:39:21 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-04-04 17:39:21 -0700 |
commit | cace13d72a71cd8802b5804c47f5b5a9a7c01a74 (patch) | |
tree | da1b7796dae43da70725d188a17fa946320e6cf2 /services | |
parent | 47c5581adab6a9c3cdba4c8bed51e0454abf7b80 (diff) | |
parent | 8fa5f804e21233c5f1993212fd5fb7c200eec905 (diff) | |
download | frameworks_base-cace13d72a71cd8802b5804c47f5b5a9a7c01a74.zip frameworks_base-cace13d72a71cd8802b5804c47f5b5a9a7c01a74.tar.gz frameworks_base-cace13d72a71cd8802b5804c47f5b5a9a7c01a74.tar.bz2 |
Merge "StorageManager: Add getVolumeList() and getVolumeState() methods"
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 5aeeb5c..7e5fd29 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; @@ -1733,6 +1734,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); |