Loading media/mtp/MtpStorage.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -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); } Loading @@ -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 { Loading media/mtp/MtpStorage.h +4 −1 Original line number Diff line number Diff line Loading @@ -33,10 +33,12 @@ private: uint64_t mMaxCapacity; // amount of free space to leave unallocated uint64_t mReserveSpace; bool mRemovable; public: MtpStorage(MtpStorageID id, const char* filePath, const char* description, uint64_t reserveSpace); const char* description, uint64_t reserveSpace, bool removable); virtual ~MtpStorage(); inline MtpStorageID getStorageID() const { return mStorageID; } Loading @@ -47,6 +49,7 @@ public: uint64_t getFreeSpace(); const char* getDescription() const; inline const char* getPath() const { return (const char *)mFilePath; } inline bool isRemovable() const { return mRemovable; } }; }; // namespace android Loading Loading
media/mtp/MtpStorage.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -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); } Loading @@ -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 { Loading
media/mtp/MtpStorage.h +4 −1 Original line number Diff line number Diff line Loading @@ -33,10 +33,12 @@ private: uint64_t mMaxCapacity; // amount of free space to leave unallocated uint64_t mReserveSpace; bool mRemovable; public: MtpStorage(MtpStorageID id, const char* filePath, const char* description, uint64_t reserveSpace); const char* description, uint64_t reserveSpace, bool removable); virtual ~MtpStorage(); inline MtpStorageID getStorageID() const { return mStorageID; } Loading @@ -47,6 +49,7 @@ public: uint64_t getFreeSpace(); const char* getDescription() const; inline const char* getPath() const { return (const char *)mFilePath; } inline bool isRemovable() const { return mRemovable; } }; }; // namespace android Loading