diff options
author | Mike Lockwood <lockwood@google.com> | 2014-03-07 13:29:59 -0800 |
---|---|---|
committer | Mike Lockwood <lockwood@google.com> | 2014-03-11 15:06:39 -0700 |
commit | 0fa848d780cf990a2860637f40432d28594c85a3 (patch) | |
tree | f2a205d5d14cffd5b164fb8cedc65d6dad59a915 /media/mtp/MtpServer.cpp | |
parent | 3a06522fd0e74934acb4bacaf1e90209bc7e9aa8 (diff) | |
download | frameworks_av-0fa848d780cf990a2860637f40432d28594c85a3.zip frameworks_av-0fa848d780cf990a2860637f40432d28594c85a3.tar.gz frameworks_av-0fa848d780cf990a2860637f40432d28594c85a3.tar.bz2 |
MTP: Add support for device property changed events
Also fixed bug in MtpProperty::write() for device properties
Bug: 7342482
Change-Id: If0099095d101409d131564e55b1939895c69c202
Diffstat (limited to 'media/mtp/MtpServer.cpp')
-rw-r--r-- | media/mtp/MtpServer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp index df87db4..dadfb54 100644 --- a/media/mtp/MtpServer.cpp +++ b/media/mtp/MtpServer.cpp @@ -93,6 +93,7 @@ static const MtpEventCode kSupportedEventCodes[] = { MTP_EVENT_OBJECT_REMOVED, MTP_EVENT_STORE_ADDED, MTP_EVENT_STORE_REMOVED, + MTP_EVENT_DEVICE_PROP_CHANGED, }; MtpServer::MtpServer(int fd, MtpDatabase* database, bool ptp, @@ -261,6 +262,11 @@ void MtpServer::sendStoreRemoved(MtpStorageID id) { sendEvent(MTP_EVENT_STORE_REMOVED, id); } +void MtpServer::sendDevicePropertyChanged(MtpDeviceProperty property) { + ALOGV("sendDevicePropertyChanged %d\n", property); + sendEvent(MTP_EVENT_DEVICE_PROP_CHANGED, property); +} + void MtpServer::sendEvent(MtpEventCode code, uint32_t param1) { if (mSessionOpen) { mEvent.setEventCode(code); |