diff options
author | Andreas Huber <andih@google.com> | 2012-11-29 10:57:06 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-11-29 10:57:06 -0800 |
commit | b64def9a555bfbf533a2da41ba0189b9842a76fb (patch) | |
tree | 7fbcc0dfa6bd8e2628c9e74b0d1e4774b2e99740 /media/libmedia/IRemoteDisplay.cpp | |
parent | e5aed03d30ea0ce49728873c5b74f89ba05a9541 (diff) | |
parent | 5131d127a042ee88f903370be88845dc8c9f8578 (diff) | |
download | frameworks_av-b64def9a555bfbf533a2da41ba0189b9842a76fb.zip frameworks_av-b64def9a555bfbf533a2da41ba0189b9842a76fb.tar.gz frameworks_av-b64def9a555bfbf533a2da41ba0189b9842a76fb.tar.bz2 |
Merge "[wfd] Support a low(er) power state by triggering PAUSE/RESUME." into jb-mr1.1-dev
Diffstat (limited to 'media/libmedia/IRemoteDisplay.cpp')
-rw-r--r-- | media/libmedia/IRemoteDisplay.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/media/libmedia/IRemoteDisplay.cpp b/media/libmedia/IRemoteDisplay.cpp index da25a15..1e15434 100644 --- a/media/libmedia/IRemoteDisplay.cpp +++ b/media/libmedia/IRemoteDisplay.cpp @@ -23,6 +23,8 @@ namespace android { enum { DISPOSE = IBinder::FIRST_CALL_TRANSACTION, + PAUSE, + RESUME, }; class BpRemoteDisplay: public BpInterface<IRemoteDisplay> @@ -33,6 +35,20 @@ public: { } + virtual status_t pause() { + Parcel data, reply; + data.writeInterfaceToken(IRemoteDisplay::getInterfaceDescriptor()); + remote()->transact(PAUSE, data, &reply); + return reply.readInt32(); + } + + virtual status_t resume() { + Parcel data, reply; + data.writeInterfaceToken(IRemoteDisplay::getInterfaceDescriptor()); + remote()->transact(RESUME, data, &reply); + return reply.readInt32(); + } + status_t dispose() { Parcel data, reply; @@ -55,6 +71,21 @@ status_t BnRemoteDisplay::onTransact( reply->writeInt32(dispose()); return NO_ERROR; } + + case PAUSE: + { + CHECK_INTERFACE(IRemoteDisplay, data, reply); + reply->writeInt32(pause()); + return OK; + } + + case RESUME: + { + CHECK_INTERFACE(IRemoteDisplay, data, reply); + reply->writeInt32(resume()); + return OK; + } + default: return BBinder::onTransact(code, data, reply, flags); } |