MTP: Implement support for getting/setting device properties
Added support for the "device friendly name" and "synchonization partner"
properties, which are required by Microsoft.
Change-Id: Ic0443333d75f7d98a2d902a790b9d505a56d4eef
Signed-off-by: Mike Lockwood <lockwood@android.com>
diff --git a/media/mtp/MtpProperty.cpp b/media/mtp/MtpProperty.cpp
index 932ad6a..c7a91d6 100644
--- a/media/mtp/MtpProperty.cpp
+++ b/media/mtp/MtpProperty.cpp
@@ -120,7 +120,7 @@
delete[] mEnumValues;
}
-void MtpProperty::read(MtpDataPacket& packet, bool deviceProp) {
+void MtpProperty::read(MtpDataPacket& packet) {
mCode = packet.getUInt16();
mType = packet.getUInt16();
@@ -141,7 +141,7 @@
break;
default:
readValue(packet, mDefaultValue);
- if (deviceProp)
+ if (isDeviceProperty())
readValue(packet, mCurrentValue);
}
mGroupCode = packet.getUInt32();
@@ -159,7 +159,6 @@
}
}
-// FIXME - only works for object properties
void MtpProperty::write(MtpDataPacket& packet) {
packet.putUInt16(mCode);
packet.putUInt16(mType);