summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpStorage.h
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-07-11 09:18:03 -0400
committerMike Lockwood <lockwood@android.com>2011-07-11 13:40:02 -0400
commit9b88b72ee2c3fd01fb46e77b7e6d80f3bd52e958 (patch)
treef14b7d39ef4012695277173c2c1fb35837af5ea8 /media/mtp/MtpStorage.h
parentbca946c7a54343f1517347bc74d3fff4e6303d3b (diff)
downloadframeworks_av-9b88b72ee2c3fd01fb46e77b7e6d80f3bd52e958.zip
frameworks_av-9b88b72ee2c3fd01fb46e77b7e6d80f3bd52e958.tar.gz
frameworks_av-9b88b72ee2c3fd01fb46e77b7e6d80f3bd52e958.tar.bz2
MTP: Return error if user tries to copy a file >= 4GB to a FAT32 file system
Bug: 4561836 Change-Id: I2bffb93b032038f6c220c24c752ccd7ca66c23a0 Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media/mtp/MtpStorage.h')
-rw-r--r--media/mtp/MtpStorage.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/media/mtp/MtpStorage.h b/media/mtp/MtpStorage.h
index 3e4f40d..e5a2e57 100644
--- a/media/mtp/MtpStorage.h
+++ b/media/mtp/MtpStorage.h
@@ -31,6 +31,7 @@ private:
MtpString mFilePath;
MtpString mDescription;
uint64_t mMaxCapacity;
+ uint64_t mMaxFileSize;
// amount of free space to leave unallocated
uint64_t mReserveSpace;
bool mRemovable;
@@ -38,7 +39,7 @@ private:
public:
MtpStorage(MtpStorageID id, const char* filePath,
const char* description, uint64_t reserveSpace,
- bool removable);
+ bool removable, uint64_t maxFileSize);
virtual ~MtpStorage();
inline MtpStorageID getStorageID() const { return mStorageID; }
@@ -50,6 +51,7 @@ public:
const char* getDescription() const;
inline const char* getPath() const { return (const char *)mFilePath; }
inline bool isRemovable() const { return mRemovable; }
+ inline uint64_t getMaxFileSize() const { return mMaxFileSize; }
};
}; // namespace android