From 983905d0ea6c83bccf0ba66c10cb98f62a2ccc34 Mon Sep 17 00:00:00 2001 From: Maunik Shah Date: Thu, 15 Aug 2013 17:11:15 +0530 Subject: Screenshots info is not updated when device is plugged in MTP mode When device is connected as MTP mode and user opens folder /sdcard/Pictures/Screenshots/ in windows system and captures new screenshot, image information is always shown as 0 KB Issue: https://code.google.com/p/android/issues/detail?id=56204 Change-Id: I86d8e1ee54c0d8b2008b5f6bc0de2cac3faafc20 --- media/mtp/MtpServer.cpp | 6 ++++++ media/mtp/MtpServer.h | 1 + 2 files changed, 7 insertions(+) (limited to 'media/mtp') diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp index 07199e3..6a334e6 100644 --- a/media/mtp/MtpServer.cpp +++ b/media/mtp/MtpServer.cpp @@ -95,6 +95,7 @@ static const MtpEventCode kSupportedEventCodes[] = { MTP_EVENT_STORE_ADDED, MTP_EVENT_STORE_REMOVED, MTP_EVENT_DEVICE_PROP_CHANGED, + MTP_EVENT_OBJECT_PROP_CHANGED, }; MtpServer::MtpServer(int fd, MtpDatabase* database, bool ptp, @@ -253,6 +254,11 @@ void MtpServer::sendObjectRemoved(MtpObjectHandle handle) { sendEvent(MTP_EVENT_OBJECT_REMOVED, handle); } +void MtpServer::sendObjectUpdated(MtpObjectHandle handle) { + ALOGV("sendObjectUpdated %d\n", handle); + sendEvent(MTP_EVENT_OBJECT_PROP_CHANGED, handle); +} + void MtpServer::sendStoreAdded(MtpStorageID id) { ALOGV("sendStoreAdded %08X\n", id); sendEvent(MTP_EVENT_STORE_ADDED, id); diff --git a/media/mtp/MtpServer.h b/media/mtp/MtpServer.h index b3a11e0..8bd0472 100644 --- a/media/mtp/MtpServer.h +++ b/media/mtp/MtpServer.h @@ -105,6 +105,7 @@ public: void sendObjectAdded(MtpObjectHandle handle); void sendObjectRemoved(MtpObjectHandle handle); void sendDevicePropertyChanged(MtpDeviceProperty property); + void sendObjectUpdated(MtpObjectHandle handle); private: void sendStoreAdded(MtpStorageID id); -- cgit v1.1