diff options
| author | 2015-04-28 13:18:07 -0700 | |
|---|---|---|
| committer | 2015-04-28 13:29:19 -0700 | |
| commit | 80640fca047bb5f4e792cd87138e24586a3a37c4 (patch) | |
| tree | 9fa85da751eabb0204c460b35d784c5bca2e399c /libs | |
| parent | d9c4971da2f2c4f980a748006bd40469c3332a13 (diff) | |
libgui: Implement onTransact for sideband streams
Implements the GET_SIDEBAND_STREAM case of
IGraphicBufferConsumer::onTransact
Change-Id: I46138b87ce2d70dde48b3561dcd378ce5fd8f383
(cherry picked from commit 17166698d935a004adab216aca83a585f91e9d96)
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/gui/IGraphicBufferConsumer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/gui/IGraphicBufferConsumer.cpp b/libs/gui/IGraphicBufferConsumer.cpp index 3f23c2f689..6658ab11d7 100644 --- a/libs/gui/IGraphicBufferConsumer.cpp +++ b/libs/gui/IGraphicBufferConsumer.cpp @@ -414,6 +414,15 @@ status_t BnGraphicBufferConsumer::onTransact( reply->writeInt32(result); return NO_ERROR; } + case GET_SIDEBAND_STREAM: { + CHECK_INTERFACE(IGraphicBufferConsumer, data, reply); + sp<NativeHandle> stream = getSidebandStream(); + reply->writeInt32(static_cast<int32_t>(stream != NULL)); + if (stream != NULL) { + reply->writeNativeHandle(stream->handle()); + } + return NO_ERROR; + } case DUMP: { CHECK_INTERFACE(IGraphicBufferConsumer, data, reply); String8 result = data.readString8(); |