summaryrefslogtreecommitdiffstats
path: root/media/mtp
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2015-01-23 10:55:25 -0800
committerMarco Nelissen <marcone@google.com>2015-01-23 11:43:43 -0800
commitea9f215a13f1a5e6455be91624a81a024641a26d (patch)
treed1d36a017f301f3f902da3ad9e5513178ed46281 /media/mtp
parentc0c2366c180e06f03cbd1c1a4020bdc26f1002f7 (diff)
downloadframeworks_av-ea9f215a13f1a5e6455be91624a81a024641a26d.zip
frameworks_av-ea9f215a13f1a5e6455be91624a81a024641a26d.tar.gz
frameworks_av-ea9f215a13f1a5e6455be91624a81a024641a26d.tar.bz2
Fix MTP delete
Bug: 18836972 Change-Id: Ia1caa9bfb0f2084af774745b5c01b260ab1f1b20
Diffstat (limited to 'media/mtp')
-rw-r--r--media/mtp/MtpServer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index e4e16f2..07199e3 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -1119,10 +1119,10 @@ static void deletePath(const char* path) {
MtpResponseCode MtpServer::doDeleteObject() {
if (!hasStorage())
return MTP_RESPONSE_INVALID_OBJECT_HANDLE;
- if (mRequest.getParameterCount() < 2)
+ if (mRequest.getParameterCount() < 1)
return MTP_RESPONSE_INVALID_PARAMETER;
MtpObjectHandle handle = mRequest.getParameter(1);
- MtpObjectFormat format = mRequest.getParameter(2);
+ MtpObjectFormat format;
// FIXME - support deleting all objects if handle is 0xFFFFFFFF
// FIXME - implement deleting objects by format