diff options
author | Mike Lockwood <lockwood@android.com> | 2010-12-07 18:53:04 -0800 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2010-12-07 18:53:04 -0800 |
commit | a194cc7d8b39656c37acf93096550314a8d2101b (patch) | |
tree | e935967512af46459604875d5d6e7cb31cfe6cd2 /media/mtp | |
parent | bf1dbd193827c05fcb017ea5a87953b47a75dbd5 (diff) | |
download | frameworks_base-a194cc7d8b39656c37acf93096550314a8d2101b.zip frameworks_base-a194cc7d8b39656c37acf93096550314a8d2101b.tar.gz frameworks_base-a194cc7d8b39656c37acf93096550314a8d2101b.tar.bz2 |
MTP: Support format argument in host GetObjectPropDesc command
Change-Id: Ic14313c0f95bea1d1d475cc6a001b256fccb91c8
Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media/mtp')
-rw-r--r-- | media/mtp/MtpDevice.cpp | 5 | ||||
-rw-r--r-- | media/mtp/MtpDevice.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp index 8d682ce..8ad39dc 100644 --- a/media/mtp/MtpDevice.cpp +++ b/media/mtp/MtpDevice.cpp @@ -110,7 +110,7 @@ void MtpDevice::print() { if (props) { for (int j = 0; j < props->size(); j++) { MtpObjectProperty prop = (*props)[j]; - MtpProperty* property = getObjectPropDesc(prop); + MtpProperty* property = getObjectPropDesc(prop, format); if (property) property->print(); else @@ -400,11 +400,12 @@ MtpProperty* MtpDevice::getDevicePropDesc(MtpDeviceProperty code) { return NULL; } -MtpProperty* MtpDevice::getObjectPropDesc(MtpObjectProperty code) { +MtpProperty* MtpDevice::getObjectPropDesc(MtpObjectProperty code, MtpObjectFormat format) { Mutex::Autolock autoLock(mMutex); mRequest.reset(); mRequest.setParameter(1, code); + mRequest.setParameter(2, format); if (!sendRequest(MTP_OPERATION_GET_OBJECT_PROP_DESC)) return NULL; if (!readData()) diff --git a/media/mtp/MtpDevice.h b/media/mtp/MtpDevice.h index c7ba7db..6ffbd24 100644 --- a/media/mtp/MtpDevice.h +++ b/media/mtp/MtpDevice.h @@ -89,7 +89,7 @@ public: MtpObjectPropertyList* getObjectPropsSupported(MtpObjectFormat format); MtpProperty* getDevicePropDesc(MtpDeviceProperty code); - MtpProperty* getObjectPropDesc(MtpObjectProperty code); + MtpProperty* getObjectPropDesc(MtpObjectProperty code, MtpObjectFormat format); bool readObject(MtpObjectHandle handle, const char* destPath, int group, int perm); |