diff options
author | Mike Lockwood <lockwood@android.com> | 2011-05-09 20:16:05 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-05-16 14:29:45 -0400 |
commit | 7efab4282a7179b2f53a3dbccee3e70d7fce6a7f (patch) | |
tree | b8810c84c6b1c35f6c6e1dc826a02add2927fe80 /media/mtp/MtpStorage.cpp | |
parent | 1a65546a55d019335655464ad895361ba9f89252 (diff) | |
download | frameworks_av-7efab4282a7179b2f53a3dbccee3e70d7fce6a7f.zip frameworks_av-7efab4282a7179b2f53a3dbccee3e70d7fce6a7f.tar.gz frameworks_av-7efab4282a7179b2f53a3dbccee3e70d7fce6a7f.tar.bz2 |
MTP: Have GetStorageInfo command return correct storage type for removable storage
Change-Id: I09b548483c12080e7d77970babcae2eef379f2f4
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media/mtp/MtpStorage.cpp')
-rw-r--r-- | media/mtp/MtpStorage.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/media/mtp/MtpStorage.cpp b/media/mtp/MtpStorage.cpp index fff0b5f..fef8066 100644 --- a/media/mtp/MtpStorage.cpp +++ b/media/mtp/MtpStorage.cpp @@ -33,12 +33,13 @@ namespace android { MtpStorage::MtpStorage(MtpStorageID id, const char* filePath, - const char* description, uint64_t reserveSpace) + const char* description, uint64_t reserveSpace, bool removable) : mStorageID(id), mFilePath(filePath), mDescription(description), mMaxCapacity(0), - mReserveSpace(reserveSpace) + mReserveSpace(reserveSpace), + mRemovable(removable) { LOGV("MtpStorage id: %d path: %s\n", id, filePath); } @@ -47,7 +48,7 @@ MtpStorage::~MtpStorage() { } int MtpStorage::getType() const { - return MTP_STORAGE_FIXED_RAM; + return (mRemovable ? MTP_STORAGE_REMOVABLE_RAM : MTP_STORAGE_FIXED_RAM); } int MtpStorage::getFileSystemType() const { |