Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 266c467b authored by Maunik Shah's avatar Maunik Shah Committed by Steve Kondik
Browse files

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
parent 50917746
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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,
@@ -254,6 +255,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);
+1 −0
Original line number Diff line number Diff line
@@ -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);