summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/mtp/MtpDevice.cpp')
-rw-r--r--media/mtp/MtpDevice.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/media/mtp/MtpDevice.cpp b/media/mtp/MtpDevice.cpp
index 2e86159..2fc6ba8 100644
--- a/media/mtp/MtpDevice.cpp
+++ b/media/mtp/MtpDevice.cpp
@@ -72,7 +72,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
{
char* manufacturerName = usb_device_get_manufacturer_name(device);
char* productName = usb_device_get_product_name(device);
- LOGD("Found camera: \"%s\" \"%s\"\n", manufacturerName, productName);
+ ALOGD("Found camera: \"%s\" \"%s\"\n", manufacturerName, productName);
free(manufacturerName);
free(productName);
} else if (interface->bInterfaceClass == 0xFF &&
@@ -90,7 +90,7 @@ MtpDevice* MtpDevice::open(const char* deviceName, int fd) {
// Looks like an android style MTP device
char* manufacturerName = usb_device_get_manufacturer_name(device);
char* productName = usb_device_get_product_name(device);
- LOGD("Found MTP device: \"%s\" \"%s\"\n", manufacturerName, productName);
+ ALOGD("Found MTP device: \"%s\" \"%s\"\n", manufacturerName, productName);
free(manufacturerName);
free(productName);
}
@@ -232,7 +232,7 @@ void MtpDevice::print() {
mDeviceInfo->print();
if (mDeviceInfo->mDeviceProperties) {
- LOGI("***** DEVICE PROPERTIES *****\n");
+ ALOGI("***** DEVICE PROPERTIES *****\n");
int count = mDeviceInfo->mDeviceProperties->size();
for (int i = 0; i < count; i++) {
MtpDeviceProperty propCode = (*mDeviceInfo->mDeviceProperties)[i];
@@ -246,11 +246,11 @@ void MtpDevice::print() {
}
if (mDeviceInfo->mPlaybackFormats) {
- LOGI("***** OBJECT PROPERTIES *****\n");
+ ALOGI("***** OBJECT PROPERTIES *****\n");
int count = mDeviceInfo->mPlaybackFormats->size();
for (int i = 0; i < count; i++) {
MtpObjectFormat format = (*mDeviceInfo->mPlaybackFormats)[i];
- LOGI("*** FORMAT: %s\n", MtpDebug::getFormatCodeName(format));
+ ALOGI("*** FORMAT: %s\n", MtpDebug::getFormatCodeName(format));
MtpObjectPropertyList* props = getObjectPropsSupported(format);
if (props) {
for (int j = 0; j < props->size(); j++) {
@@ -666,7 +666,7 @@ fail:
// reads the object's data and writes it to the specified file path
bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int group, int perm) {
- LOGD("readObject: %s", destPath);
+ ALOGD("readObject: %s", destPath);
int fd = ::open(destPath, O_RDWR | O_CREAT | O_TRUNC);
if (fd < 0) {
LOGE("open failed for %s", destPath);
@@ -765,7 +765,7 @@ fail:
}
bool MtpDevice::sendRequest(MtpOperationCode operation) {
- LOGV("sendRequest: %s\n", MtpDebug::getOperationCodeName(operation));
+ ALOGV("sendRequest: %s\n", MtpDebug::getOperationCodeName(operation));
mReceivedResponse = false;
mRequest.setOperationCode(operation);
if (mTransactionID > 0)
@@ -776,7 +776,7 @@ bool MtpDevice::sendRequest(MtpOperationCode operation) {
}
bool MtpDevice::sendData() {
- LOGV("sendData\n");
+ ALOGV("sendData\n");
mData.setOperationCode(mRequest.getOperationCode());
mData.setTransactionID(mRequest.getTransactionID());
int ret = mData.write(mRequestOut);
@@ -787,10 +787,10 @@ bool MtpDevice::sendData() {
bool MtpDevice::readData() {
mData.reset();
int ret = mData.read(mRequestIn1);
- LOGV("readData returned %d\n", ret);
+ ALOGV("readData returned %d\n", ret);
if (ret >= MTP_CONTAINER_HEADER_SIZE) {
if (mData.getContainerType() == MTP_CONTAINER_TYPE_RESPONSE) {
- LOGD("got response packet instead of data packet");
+ ALOGD("got response packet instead of data packet");
// we got a response packet rather than data
// copy it to mResponse
mResponse.copyFrom(mData);
@@ -801,7 +801,7 @@ bool MtpDevice::readData() {
return true;
}
else {
- LOGV("readResponse failed\n");
+ ALOGV("readResponse failed\n");
return false;
}
}
@@ -813,7 +813,7 @@ bool MtpDevice::writeDataHeader(MtpOperationCode operation, int dataLength) {
}
MtpResponseCode MtpDevice::readResponse() {
- LOGV("readResponse\n");
+ ALOGV("readResponse\n");
if (mReceivedResponse) {
mReceivedResponse = false;
return mResponse.getResponseCode();
@@ -827,7 +827,7 @@ MtpResponseCode MtpDevice::readResponse() {
mResponse.dump();
return mResponse.getResponseCode();
} else {
- LOGD("readResponse failed\n");
+ ALOGD("readResponse failed\n");
return -1;
}
}