Fix file transfer corner cases.
Fix zero packet read/write in corner cases
with initial read/writes. This affects transfers
of 16372 bytes to the device and transfers of
1012 bytes (or packet size - 12) from the device.
Test: Transfer various length files
Bug: 37175601
Change-Id: Ic1281e8757d1a33d78c66d2c57319b5ee38d6a46
diff --git a/media/mtp/IMtpHandle.h b/media/mtp/IMtpHandle.h
index 9185255..0557596 100644
--- a/media/mtp/IMtpHandle.h
+++ b/media/mtp/IMtpHandle.h
@@ -27,7 +27,7 @@
virtual int write(const void *data, int len) = 0;
// Return 0 if send/receive is successful, or -1 and errno is set
- virtual int receiveFile(mtp_file_range mfr) = 0;
+ virtual int receiveFile(mtp_file_range mfr, bool zero_packet) = 0;
virtual int sendFile(mtp_file_range mfr) = 0;
virtual int sendEvent(mtp_event me) = 0;