MTP host: Reduce buffer size for readObject so we don't clog our pipe.
Change-Id: I24d2b1551af5843e48c0a63b84925b3a6451e36a
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp
index 163e5f1..bd68f75 100644
--- a/media/mtp/MtpDevice.cpp
+++ b/media/mtp/MtpDevice.cpp
@@ -406,7 +406,7 @@
mInitialData = NULL;
}
- char buffer[65536];
+ char buffer[16384];
while (remaining > 0) {
int readSize = (remaining > sizeof(buffer) ? sizeof(buffer) : remaining);
int count = mDevice->mData.readData(mDevice->mEndpointIn, buffer, readSize);