summaryrefslogtreecommitdiffstats
path: root/media/mtp
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2010-12-01 18:46:23 -0500
committerMike Lockwood <lockwood@android.com>2010-12-02 08:16:12 -0500
commit40ce1f262cc4edbc8b7c470830325466263acaec (patch)
tree2dee6e562eb0cc55a9be497b94e2e0b7be849622 /media/mtp
parent4070a15be31dd309446cdd400342628a8f0b1328 (diff)
downloadframeworks_av-40ce1f262cc4edbc8b7c470830325466263acaec.zip
frameworks_av-40ce1f262cc4edbc8b7c470830325466263acaec.tar.gz
frameworks_av-40ce1f262cc4edbc8b7c470830325466263acaec.tar.bz2
MTP: Add support for multiple properties in GetObjectPropList command
Change-Id: Ib469a6c8141937aaa3e811345056195117abb4b2 Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media/mtp')
-rw-r--r--media/mtp/MtpDatabase.h3
-rw-r--r--media/mtp/MtpProperty.cpp2
-rw-r--r--media/mtp/MtpServer.cpp5
3 files changed, 5 insertions, 5 deletions
diff --git a/media/mtp/MtpDatabase.h b/media/mtp/MtpDatabase.h
index 900b517..9929805 100644
--- a/media/mtp/MtpDatabase.h
+++ b/media/mtp/MtpDatabase.h
@@ -77,8 +77,7 @@ public:
virtual MtpResponseCode resetDeviceProperty(MtpDeviceProperty property) = 0;
virtual MtpResponseCode getObjectPropertyList(MtpObjectHandle handle,
- MtpObjectFormat format,
- MtpObjectProperty property,
+ uint32_t format, uint32_t property,
int groupCode, int depth,
MtpDataPacket& packet) = 0;
diff --git a/media/mtp/MtpProperty.cpp b/media/mtp/MtpProperty.cpp
index 42945f5..4356a6f 100644
--- a/media/mtp/MtpProperty.cpp
+++ b/media/mtp/MtpProperty.cpp
@@ -53,7 +53,7 @@ MtpProperty::MtpProperty(MtpPropertyCode propCode,
mDefaultArrayValues(NULL),
mCurrentArrayLength(0),
mCurrentArrayValues(NULL),
- mGroupCode(-1), // disable multiple properties in GetObjectPropList for now
+ mGroupCode(0),
mFormFlag(kFormNone),
mEnumLength(0),
mEnumValues(NULL)
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp
index c3755f3..de6cbac 100644
--- a/media/mtp/MtpServer.cpp
+++ b/media/mtp/MtpServer.cpp
@@ -536,8 +536,9 @@ MtpResponseCode MtpServer::doResetDevicePropValue() {
MtpResponseCode MtpServer::doGetObjectPropList() {
MtpObjectHandle handle = mRequest.getParameter(1);
- MtpObjectFormat format = mRequest.getParameter(2);
- MtpDeviceProperty property = mRequest.getParameter(3);
+ // use uint32_t so we can support 0xFFFFFFFF
+ uint32_t format = mRequest.getParameter(2);
+ uint32_t property = mRequest.getParameter(3);
int groupCode = mRequest.getParameter(4);
int depth = mRequest.getParameter(5);
LOGD("GetObjectPropList %d format: %s property: %s group: %d depth: %d\n",