summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/mtp/MtpCursor.cpp2
-rw-r--r--media/mtp/MtpDebug.h2
-rw-r--r--media/mtp/MtpDevice.cpp14
-rw-r--r--media/mtp/MtpDeviceInfo.cpp4
-rw-r--r--media/mtp/MtpProperty.cpp6
5 files changed, 12 insertions, 16 deletions
diff --git a/media/mtp/MtpCursor.cpp b/media/mtp/MtpCursor.cpp
index 91201c3..3ba07cc 100644
--- a/media/mtp/MtpCursor.cpp
+++ b/media/mtp/MtpCursor.cpp
@@ -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();
diff --git a/media/mtp/MtpDebug.h b/media/mtp/MtpDebug.h
index 86f601a..87eff74 100644
--- a/media/mtp/MtpDebug.h
+++ b/media/mtp/MtpDebug.h
@@ -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"
diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp
index 367694b..163e5f1 100644
--- a/media/mtp/MtpDevice.cpp
+++ b/media/mtp/MtpDevice.cpp
@@ -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);
@@ -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);
@@ -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 {
@@ -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++);
@@ -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);
@@ -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;
}
}
@@ -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();
diff --git a/media/mtp/MtpDeviceInfo.cpp b/media/mtp/MtpDeviceInfo.cpp
index 025b8eb..5a9322e 100644
--- a/media/mtp/MtpDeviceInfo.cpp
+++ b/media/mtp/MtpDeviceInfo.cpp
@@ -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);
}
diff --git a/media/mtp/MtpProperty.cpp b/media/mtp/MtpProperty.cpp
index 9eb8a5d..d6beb8a 100644
--- a/media/mtp/MtpProperty.cpp
+++ b/media/mtp/MtpProperty.cpp
@@ -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) {