diff options
author | Maunik Shah <mshah@codeaurora.org> | 2013-08-15 17:11:15 +0530 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-31 14:36:34 -0700 |
commit | 983905d0ea6c83bccf0ba66c10cb98f62a2ccc34 (patch) | |
tree | 9e221250115a7fdf095069b50e0f3b659e7b1d92 /media/mtp | |
parent | 21d11a6c7dee30d4391eeee8bace8c4be26cffb8 (diff) | |
download | frameworks_av-983905d0ea6c83bccf0ba66c10cb98f62a2ccc34.zip frameworks_av-983905d0ea6c83bccf0ba66c10cb98f62a2ccc34.tar.gz frameworks_av-983905d0ea6c83bccf0ba66c10cb98f62a2ccc34.tar.bz2 |
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
Diffstat (limited to 'media/mtp')
-rw-r--r-- | media/mtp/MtpServer.cpp | 6 | ||||
-rw-r--r-- | media/mtp/MtpServer.h | 1 |
2 files changed, 7 insertions, 0 deletions
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); |