summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-05-17 16:44:51 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-05-17 16:44:51 -0700
commit5a79cfd7518defdce1911cecbc2441bb0a057e54 (patch)
tree07128f1af400dbf8e1c102b0cba77f47885bd587 /media
parent1818b4a99016486d42de1a2ff35c88bb3197cd20 (diff)
parent27ac64eceee8d4e392983861c6bc6bd620e4c6f7 (diff)
downloadframeworks_base-5a79cfd7518defdce1911cecbc2441bb0a057e54.zip
frameworks_base-5a79cfd7518defdce1911cecbc2441bb0a057e54.tar.gz
frameworks_base-5a79cfd7518defdce1911cecbc2441bb0a057e54.tar.bz2
am 27ac64ec: Merge "StorageVolume: Add getStorageId() accessor" into honeycomb-mr2
* commit '27ac64eceee8d4e392983861c6bc6bd620e4c6f7': StorageVolume: Add getStorageId() accessor
Diffstat (limited to 'media')
-rw-r--r--media/java/android/mtp/MtpStorage.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/media/java/android/mtp/MtpStorage.java b/media/java/android/mtp/MtpStorage.java
index 21a18ca..7932d34 100644
--- a/media/java/android/mtp/MtpStorage.java
+++ b/media/java/android/mtp/MtpStorage.java
@@ -16,6 +16,8 @@
package android.mtp;
+import android.os.storage.StorageVolume;
+
/**
* This class represents a storage unit on an MTP device.
* Used only for MTP support in USB responder mode.
@@ -31,13 +33,12 @@ public class MtpStorage {
private final long mReserveSpace;
private final boolean mRemovable;
- public MtpStorage(int id, String path, String description,
- long reserveSpace, boolean removable) {
- mStorageId = id;
- mPath = path;
- mDescription = description;
- mReserveSpace = reserveSpace;
- mRemovable = removable;
+ public MtpStorage(StorageVolume volume) {
+ mStorageId = volume.getStorageId();
+ mPath = volume.getPath();
+ mDescription = volume.getDescription();
+ mReserveSpace = volume.getMtpReserveSpace();
+ mRemovable = volume.isRemovable();
}
/**