Skip to content

Commit 53ad027

Browse files
Jean-Baptiste Queruandroid code review
authored andcommitted
Merge "MtpStorage: correct the size of reserve space for MTP"
2 parents 6f2361e + 3b60dac commit 53ad027

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

media/java/android/mtp/MtpStorage.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public MtpStorage(StorageVolume volume, Context context) {
3939
mStorageId = volume.getStorageId();
4040
mPath = volume.getPath();
4141
mDescription = context.getResources().getString(volume.getDescriptionId());
42-
mReserveSpace = volume.getMtpReserveSpace();
42+
mReserveSpace = volume.getMtpReserveSpace() * 1024 * 1024;
4343
mRemovable = volume.isRemovable();
4444
mMaxFileSize = volume.getMaxFileSize();
4545
}
@@ -87,7 +87,7 @@ public final String getDescription() {
8787
* Returns the amount of space to reserve on the storage file system.
8888
* This can be set to a non-zero value to prevent MTP from filling up the entire storage.
8989
*
90-
* @return the storage unit description
90+
* @return reserved space in bytes.
9191
*/
9292
public final long getReserveSpace() {
9393
return mReserveSpace;

0 commit comments

Comments
 (0)