Call access(2) on all files/dirs modified by Mtp
External sdcards are accessed through /mnt/media_rw,
so access() each touched file for sdcardfs to update
its metadata. This is done for all created/deleted/renamed
folders and files.
Bug: 77849654
Test: use mtp with emulated sdcard
Change-Id: Ic8cef9dc90e9cbc9783ff45a87c481833f910665
diff --git a/media/mtp/MtpUtils.h b/media/mtp/MtpUtils.h
index 744546b..21f5df0 100644
--- a/media/mtp/MtpUtils.h
+++ b/media/mtp/MtpUtils.h
@@ -34,7 +34,9 @@
int copyRecursive(const char *fromPath, const char *toPath);
int copyFile(const char *fromPath, const char *toPath);
bool deletePath(const char* path);
+int renameTo(const char *oldPath, const char *newPath);
+void closeObjFd(int fd, const char *path);
}; // namespace android
#endif // _MTP_UTILS_H