Loading media/mtp/MtpDevice.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -698,6 +698,14 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro fchmod(fd, perm); umask(mask); bool result = readObject(handle, fd); ::close(fd); return result; } bool MtpDevice::readObject(MtpObjectHandle handle, int fd) { ALOGD("readObject: %d", fd); Mutex::Autolock autoLock(mMutex); bool result = false; Loading Loading @@ -779,7 +787,6 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro } fail: ::close(fd); return result; } Loading media/mtp/MtpDevice.h +1 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ public: size_t objectSize, void* clientData); bool readObject(MtpObjectHandle handle, const char* destPath, int group, int perm); bool readObject(MtpObjectHandle handle, int fd); private: bool sendRequest(MtpOperationCode operation); Loading Loading
media/mtp/MtpDevice.cpp +8 −1 Original line number Diff line number Diff line Loading @@ -698,6 +698,14 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro fchmod(fd, perm); umask(mask); bool result = readObject(handle, fd); ::close(fd); return result; } bool MtpDevice::readObject(MtpObjectHandle handle, int fd) { ALOGD("readObject: %d", fd); Mutex::Autolock autoLock(mMutex); bool result = false; Loading Loading @@ -779,7 +787,6 @@ bool MtpDevice::readObject(MtpObjectHandle handle, const char* destPath, int gro } fail: ::close(fd); return result; } Loading
media/mtp/MtpDevice.h +1 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ public: size_t objectSize, void* clientData); bool readObject(MtpObjectHandle handle, const char* destPath, int group, int perm); bool readObject(MtpObjectHandle handle, int fd); private: bool sendRequest(MtpOperationCode operation); Loading