Loading media/mtp/MtpCursor.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -437,7 +437,7 @@ bool MtpCursor::putThumbnail(CursorWindow* window, int objectID, int format, int } else { thumbnail = device->getThumbnail(objectID, size); LOGD("putThumbnail: %p, size: %d\n", thumbnail, size); LOGV("putThumbnail: %p, size: %d\n", thumbnail, size); offset = window->alloc(size); if (!offset) { window->freeLastRow(); Loading media/mtp/MtpDebug.h +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ #ifndef _MTP_DEBUG_H #define _MTP_DEBUG_H #define LOG_NDEBUG 0 // #define LOG_NDEBUG 0 #include <utils/Log.h> #include "MtpTypes.h" Loading media/mtp/MtpDevice.cpp +5 −9 Original line number Diff line number Diff line Loading @@ -264,9 +264,7 @@ MtpObjectHandle MtpDevice::sendObjectInfo(MtpObjectInfo* info) { mData.putEmptyString(); if (sendRequest(MTP_OPERATION_SEND_OBJECT_INFO) && sendData()) { printf("MTP_OPERATION_SEND_OBJECT_INFO sent\n"); MtpResponseCode ret = readResponse(); printf("sendObjectInfo response: %04X\n", ret); if (ret == MTP_RESPONSE_OK) { info->mStorageID = mResponse.getParameter(1); info->mParent = mResponse.getParameter(2); Loading @@ -284,7 +282,6 @@ bool MtpDevice::sendObject(MtpObjectInfo* info, int srcFD) { mRequest.reset(); mRequest.setParameter(1, info->mHandle); if (sendRequest(MTP_OPERATION_SEND_OBJECT)) { printf("MTP_OPERATION_SEND_OBJECT sent\n"); // send data header writeDataHeader(MTP_OPERATION_SEND_OBJECT, remaining); Loading @@ -293,7 +290,6 @@ bool MtpDevice::sendObject(MtpObjectInfo* info, int srcFD) { int count = read(srcFD, buffer, sizeof(buffer)); if (count > 0) { int written = mData.write(mEndpointOut, buffer, count); printf("wrote %d\n", written); // FIXME check error remaining -= count; } else { Loading Loading @@ -446,7 +442,7 @@ int MtpDevice::readObject(MtpObjectHandle handle, int objectSize) { } bool MtpDevice::sendRequest(MtpOperationCode operation) { LOGD("sendRequest: %s\n", MtpDebug::getOperationCodeName(operation)); LOGV("sendRequest: %s\n", MtpDebug::getOperationCodeName(operation)); mRequest.setOperationCode(operation); if (mTransactionID > 0) mRequest.setTransactionID(mTransactionID++); Loading @@ -456,7 +452,7 @@ bool MtpDevice::sendRequest(MtpOperationCode operation) { } bool MtpDevice::sendData() { LOGD("sendData\n"); LOGV("sendData\n"); mData.setOperationCode(mRequest.getOperationCode()); mData.setTransactionID(mRequest.getTransactionID()); int ret = mData.write(mEndpointOut); Loading @@ -467,13 +463,13 @@ bool MtpDevice::sendData() { bool MtpDevice::readData() { mData.reset(); int ret = mData.read(mEndpointIn); LOGD("readData returned %d\n", ret); LOGV("readData returned %d\n", ret); if (ret >= MTP_CONTAINER_HEADER_SIZE) { mData.dump(); return true; } else { LOGD("readResponse failed\n"); LOGV("readResponse failed\n"); return false; } } Loading @@ -485,7 +481,7 @@ bool MtpDevice::writeDataHeader(MtpOperationCode operation, int dataLength) { } MtpResponseCode MtpDevice::readResponse() { LOGD("readResponse\n"); LOGV("readResponse\n"); int ret = mResponse.read(mEndpointIn); if (ret >= MTP_CONTAINER_HEADER_SIZE) { mResponse.dump(); Loading media/mtp/MtpDeviceInfo.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -88,9 +88,9 @@ void MtpDeviceInfo::read(MtpDataPacket& packet) { } void MtpDeviceInfo::print() { LOGD("Device Info:\n\tmStandardVersion: %d\n\tmVendorExtensionID: %d\n\tmVendorExtensionVersiony: %d\n", LOGV("Device Info:\n\tmStandardVersion: %d\n\tmVendorExtensionID: %d\n\tmVendorExtensionVersiony: %d\n", mStandardVersion, mVendorExtensionID, mVendorExtensionVersion); LOGD("\tmVendorExtensionDesc: %s\n\tmFunctionalCode: %d\n\tmManufacturer: %s\n\tmModel: %s\n\tmVersion: %s\n\tmSerial: %s\n", LOGV("\tmVendorExtensionDesc: %s\n\tmFunctionalCode: %d\n\tmManufacturer: %s\n\tmModel: %s\n\tmVersion: %s\n\tmSerial: %s\n", mVendorExtensionDesc, mFunctionalCode, mManufacturer, mModel, mVersion, mSerial); } Loading media/mtp/MtpProperty.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -191,9 +191,9 @@ void MtpProperty::write(MtpDataPacket& packet) { } void MtpProperty::print() { LOGD("MtpProperty %04X\n", mCode); LOGD(" type %04X\n", mType); LOGD(" writeable %s\n", (mWriteable ? "true" : "false")); LOGV("MtpProperty %04X\n", mCode); LOGV(" type %04X\n", mType); LOGV(" writeable %s\n", (mWriteable ? "true" : "false")); } void MtpProperty::readValue(MtpDataPacket& packet, MtpPropertyValue& value) { Loading Loading
media/mtp/MtpCursor.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -437,7 +437,7 @@ bool MtpCursor::putThumbnail(CursorWindow* window, int objectID, int format, int } else { thumbnail = device->getThumbnail(objectID, size); LOGD("putThumbnail: %p, size: %d\n", thumbnail, size); LOGV("putThumbnail: %p, size: %d\n", thumbnail, size); offset = window->alloc(size); if (!offset) { window->freeLastRow(); Loading
media/mtp/MtpDebug.h +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ #ifndef _MTP_DEBUG_H #define _MTP_DEBUG_H #define LOG_NDEBUG 0 // #define LOG_NDEBUG 0 #include <utils/Log.h> #include "MtpTypes.h" Loading
media/mtp/MtpDevice.cpp +5 −9 Original line number Diff line number Diff line Loading @@ -264,9 +264,7 @@ MtpObjectHandle MtpDevice::sendObjectInfo(MtpObjectInfo* info) { mData.putEmptyString(); if (sendRequest(MTP_OPERATION_SEND_OBJECT_INFO) && sendData()) { printf("MTP_OPERATION_SEND_OBJECT_INFO sent\n"); MtpResponseCode ret = readResponse(); printf("sendObjectInfo response: %04X\n", ret); if (ret == MTP_RESPONSE_OK) { info->mStorageID = mResponse.getParameter(1); info->mParent = mResponse.getParameter(2); Loading @@ -284,7 +282,6 @@ bool MtpDevice::sendObject(MtpObjectInfo* info, int srcFD) { mRequest.reset(); mRequest.setParameter(1, info->mHandle); if (sendRequest(MTP_OPERATION_SEND_OBJECT)) { printf("MTP_OPERATION_SEND_OBJECT sent\n"); // send data header writeDataHeader(MTP_OPERATION_SEND_OBJECT, remaining); Loading @@ -293,7 +290,6 @@ bool MtpDevice::sendObject(MtpObjectInfo* info, int srcFD) { int count = read(srcFD, buffer, sizeof(buffer)); if (count > 0) { int written = mData.write(mEndpointOut, buffer, count); printf("wrote %d\n", written); // FIXME check error remaining -= count; } else { Loading Loading @@ -446,7 +442,7 @@ int MtpDevice::readObject(MtpObjectHandle handle, int objectSize) { } bool MtpDevice::sendRequest(MtpOperationCode operation) { LOGD("sendRequest: %s\n", MtpDebug::getOperationCodeName(operation)); LOGV("sendRequest: %s\n", MtpDebug::getOperationCodeName(operation)); mRequest.setOperationCode(operation); if (mTransactionID > 0) mRequest.setTransactionID(mTransactionID++); Loading @@ -456,7 +452,7 @@ bool MtpDevice::sendRequest(MtpOperationCode operation) { } bool MtpDevice::sendData() { LOGD("sendData\n"); LOGV("sendData\n"); mData.setOperationCode(mRequest.getOperationCode()); mData.setTransactionID(mRequest.getTransactionID()); int ret = mData.write(mEndpointOut); Loading @@ -467,13 +463,13 @@ bool MtpDevice::sendData() { bool MtpDevice::readData() { mData.reset(); int ret = mData.read(mEndpointIn); LOGD("readData returned %d\n", ret); LOGV("readData returned %d\n", ret); if (ret >= MTP_CONTAINER_HEADER_SIZE) { mData.dump(); return true; } else { LOGD("readResponse failed\n"); LOGV("readResponse failed\n"); return false; } } Loading @@ -485,7 +481,7 @@ bool MtpDevice::writeDataHeader(MtpOperationCode operation, int dataLength) { } MtpResponseCode MtpDevice::readResponse() { LOGD("readResponse\n"); LOGV("readResponse\n"); int ret = mResponse.read(mEndpointIn); if (ret >= MTP_CONTAINER_HEADER_SIZE) { mResponse.dump(); Loading
media/mtp/MtpDeviceInfo.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -88,9 +88,9 @@ void MtpDeviceInfo::read(MtpDataPacket& packet) { } void MtpDeviceInfo::print() { LOGD("Device Info:\n\tmStandardVersion: %d\n\tmVendorExtensionID: %d\n\tmVendorExtensionVersiony: %d\n", LOGV("Device Info:\n\tmStandardVersion: %d\n\tmVendorExtensionID: %d\n\tmVendorExtensionVersiony: %d\n", mStandardVersion, mVendorExtensionID, mVendorExtensionVersion); LOGD("\tmVendorExtensionDesc: %s\n\tmFunctionalCode: %d\n\tmManufacturer: %s\n\tmModel: %s\n\tmVersion: %s\n\tmSerial: %s\n", LOGV("\tmVendorExtensionDesc: %s\n\tmFunctionalCode: %d\n\tmManufacturer: %s\n\tmModel: %s\n\tmVersion: %s\n\tmSerial: %s\n", mVendorExtensionDesc, mFunctionalCode, mManufacturer, mModel, mVersion, mSerial); } Loading
media/mtp/MtpProperty.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -191,9 +191,9 @@ void MtpProperty::write(MtpDataPacket& packet) { } void MtpProperty::print() { LOGD("MtpProperty %04X\n", mCode); LOGD(" type %04X\n", mType); LOGD(" writeable %s\n", (mWriteable ? "true" : "false")); LOGV("MtpProperty %04X\n", mCode); LOGV(" type %04X\n", mType); LOGV(" writeable %s\n", (mWriteable ? "true" : "false")); } void MtpProperty::readValue(MtpDataPacket& packet, MtpPropertyValue& value) { Loading