summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-10-13 11:38:20 -0400
committerMike Lockwood <lockwood@android.com>2011-10-13 11:38:20 -0400
commit8334038f9ed367186845f76fce061c46984da660 (patch)
tree85d5e7f355e02ec3798fae74180c729faecb4aa3 /media
parent514a6cfb7f7085b266f457155ff63373d2dff8ee (diff)
downloadframeworks_base-8334038f9ed367186845f76fce061c46984da660.zip
frameworks_base-8334038f9ed367186845f76fce061c46984da660.tar.gz
frameworks_base-8334038f9ed367186845f76fce061c46984da660.tar.bz2
MtpServer: Pass 0xFFFFFFFF for file size when receiving files >= 4GB in size
Bug: 5432487 Change-Id: Ie86e72d9d85476941eab6a9d271948b8fdde6926 Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media')
-rw-r--r--media/mtp/MtpServer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index a9b539b..dc6c011 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -947,7 +947,12 @@ MtpResponseCode MtpServer::doSendObject() {
if (mSendObjectFileSize - initialData > 0) {
mfr.offset = initialData;
- mfr.length = mSendObjectFileSize - initialData;
+ if (mSendObjectFileSize == 0xFFFFFFFF) {
+ // tell driver to read until it receives a short packet
+ mfr.length = 0xFFFFFFFF;
+ } else {
+ mfr.length = mSendObjectFileSize - initialData;
+ }
LOGV("receiving %s\n", (const char *)mSendObjectFilePath);
// transfer the file