StorageManager: Add getVolumeList() and getVolumeState() methods
Change-Id: Icf3301827dd27e8430bd44eaafde517a31ef035a
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 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.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 @@
}
}
+ 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);