DO NOT MERGE StorageManager: Add getVolumeList() and getVolumeState() methods
Change-Id: I43d5c1730b340f1288b58012234b38f801001b71
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index 461a21e..a91b6906 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -64,6 +64,7 @@
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;
@@ -1730,6 +1731,18 @@
}
}
+ 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);