summaryrefslogtreecommitdiffstats
path: root/media/mtp
diff options
context:
space:
mode:
Diffstat (limited to 'media/mtp')
-rw-r--r--media/mtp/MtpDevice.cpp5
-rw-r--r--media/mtp/MtpDevice.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp
index 8d682ce076..8ad39dc83b 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 c7ba7db5d2..6ffbd24bcb 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);