When converting the MB value MtpReserveSpace value to bytes there is a
possible integer overflow since 3 integer values are multiplied, even
though the result is stored in a long variable. This would be visible when
the value is more than 2 GB. This is solved by making the constants
longs instead of ints.
Change-Id: I799129f7076a6e331cece17b5c05aed210499648
mStorageId = volume.getStorageId();
mPath = volume.getPath();
mDescription = context.getResources().getString(volume.getDescriptionId());
- mReserveSpace = volume.getMtpReserveSpace() * 1024 * 1024;
+ mReserveSpace = volume.getMtpReserveSpace() * 1024L * 1024L;
mRemovable = volume.isRemovable();
mMaxFileSize = volume.getMaxFileSize();
}