summaryrefslogtreecommitdiffstats
path: root/mtp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-12-11 17:00:45 +0100
committerEthan Yonker <dees_troy@teamw.in>2014-12-12 16:20:42 +0100
commit4b94cfd3910de26dbca64cf746a899cbc635158b (patch)
tree9b452fb2632413e51cb3b9fd8b28e6a2bd0352f5 /mtp
parentFix loading of png images in custom themes (diff)
downloadandroid_bootable_recovery-4b94cfd3910de26dbca64cf746a899cbc635158b.tar
android_bootable_recovery-4b94cfd3910de26dbca64cf746a899cbc635158b.tar.gz
android_bootable_recovery-4b94cfd3910de26dbca64cf746a899cbc635158b.tar.bz2
android_bootable_recovery-4b94cfd3910de26dbca64cf746a899cbc635158b.tar.lz
android_bootable_recovery-4b94cfd3910de26dbca64cf746a899cbc635158b.tar.xz
android_bootable_recovery-4b94cfd3910de26dbca64cf746a899cbc635158b.tar.zst
android_bootable_recovery-4b94cfd3910de26dbca64cf746a899cbc635158b.zip
Diffstat (limited to 'mtp')
-rwxr-xr-xmtp/Android.mk4
-rwxr-xr-xmtp/MtpServer.cpp3
2 files changed, 5 insertions, 2 deletions
diff --git a/mtp/Android.mk b/mtp/Android.mk
index 809a29aba..283a283dd 100755
--- a/mtp/Android.mk
+++ b/mtp/Android.mk
@@ -29,7 +29,7 @@ LOCAL_SRC_FILES = \
twrpMtp.cpp \
mtp_MtpDatabase.cpp \
node.cpp
-LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libstlport libdl libcutils libutils
+LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libstlport libdl libcutils libutils libaosprecovery
ifneq ($(TW_MTP_DEVICE),)
LOCAL_CFLAGS += -DUSB_MTP_DEVICE=$(TW_MTP_DEVICE)
@@ -66,5 +66,5 @@ LOCAL_SRC_FILES = \
twrpMtp.cpp \
mtp_MtpDatabase.cpp \
node.cpp
-LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libstlport libdl libcutils libutils
+LOCAL_SHARED_LIBRARIES += libz libc libusbhost libstdc++ libstlport libdl libcutils libutils libaosprecovery
include $(BUILD_EXECUTABLE)
diff --git a/mtp/MtpServer.cpp b/mtp/MtpServer.cpp
index 66a641404..f4af2b948 100755
--- a/mtp/MtpServer.cpp
+++ b/mtp/MtpServer.cpp
@@ -26,6 +26,7 @@
#include <sys/stat.h>
#include <dirent.h>
#include "../twcommon.h"
+#include "../set_metadata.h"
#include <cutils/properties.h>
#include "MtpTypes.h"
@@ -1002,6 +1003,7 @@ MtpResponseCode MtpServer::doSendObjectInfo() {
return MTP_RESPONSE_GENERAL_ERROR;
}
chown((const char *)path, getuid(), mFileGroup);
+ tw_set_default_metadata((const char *)path);
// SendObject does not get sent for directories, so call endSendObject here instead
mDatabase->lockMutex();
@@ -1073,6 +1075,7 @@ MtpResponseCode MtpServer::doSendObject() {
ret = ioctl(mFD, MTP_RECEIVE_FILE, (unsigned long)&mfr);
}
close(mfr.fd);
+ tw_set_default_metadata((const char *)mSendObjectFilePath);
if (ret < 0) {
unlink(mSendObjectFilePath);