Merge "MTP: Read property code before calling isDeviceProperty in MtpProperty::read()"

This commit is contained in:
Mike Lockwood
2010-12-07 17:21:01 -08:00
committed by Android (Google) Code Review

View File

@@ -122,9 +122,8 @@ MtpProperty::~MtpProperty() {
}
void MtpProperty::read(MtpDataPacket& packet) {
bool deviceProp = isDeviceProperty();
mCode = packet.getUInt16();
bool deviceProp = isDeviceProperty();
mType = packet.getUInt16();
mWriteable = (packet.getUInt8() == 1);
switch (mType) {