summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2011-10-13 08:55:04 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-13 08:55:04 -0700
commit0c265c886b563095172827d39b55a8cd71a19ffb (patch)
tree6a5ac2424f850496465797c10f03a9c5cf6d89ec
parent48cf582df3bb81afae36314c187f909486c47c55 (diff)
parent8334038f9ed367186845f76fce061c46984da660 (diff)
downloadframeworks_base-0c265c886b563095172827d39b55a8cd71a19ffb.zip
frameworks_base-0c265c886b563095172827d39b55a8cd71a19ffb.tar.gz
frameworks_base-0c265c886b563095172827d39b55a8cd71a19ffb.tar.bz2
Merge "MtpServer: Pass 0xFFFFFFFF for file size when receiving files >= 4GB in size" into ics-mr0
-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