libgui: Implement onTransact for sideband streams

Implements the GET_SIDEBAND_STREAM case of
IGraphicBufferConsumer::onTransact

Change-Id: I46138b87ce2d70dde48b3561dcd378ce5fd8f383
(cherry picked from commit 17166698d9)
This commit is contained in:
Dan Stoza 2015-04-28 13:18:07 -07:00
parent d9c4971da2
commit 80640fca04

View File

@ -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();