diff options
| author | 2011-07-14 17:54:27 -0700 | |
|---|---|---|
| committer | 2011-07-14 17:54:27 -0700 | |
| commit | 06b54d7184e015256ad1817e381f61eb7514a3e2 (patch) | |
| tree | 8e88a243d1d426e97890c6ed716fe53b379d2c09 /libs/gui/ISurfaceTexture.cpp | |
| parent | b3a26f4d94f390d4baeac0fc11ccb9d451b67dbd (diff) | |
| parent | 9709687463dc5f1255f435e57b3d2beed8b70330 (diff) | |
Merge changes Id9aa1003,I8c154189
* changes:
SurfaceTexture: make (dis)connect into an IPC
SurfaceTexture: add support for new connect values
Diffstat (limited to 'libs/gui/ISurfaceTexture.cpp')
| -rw-r--r-- | libs/gui/ISurfaceTexture.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libs/gui/ISurfaceTexture.cpp b/libs/gui/ISurfaceTexture.cpp index 16e37802b2af..ec06bc0b69a9 100644 --- a/libs/gui/ISurfaceTexture.cpp +++ b/libs/gui/ISurfaceTexture.cpp @@ -41,6 +41,8 @@ enum { GET_ALLOCATOR, QUERY, SET_SYNCHRONOUS_MODE, + CONNECT, + DISCONNECT, }; @@ -154,7 +156,23 @@ public: return result; } + virtual status_t connect(int api) { + Parcel data, reply; + data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); + data.writeInt32(api); + remote()->transact(CONNECT, data, &reply); + status_t result = reply.readInt32(); + return result; + } + virtual status_t disconnect(int api) { + Parcel data, reply; + data.writeInterfaceToken(ISurfaceTexture::getInterfaceDescriptor()); + data.writeInt32(api); + remote()->transact(DISCONNECT, data, &reply); + status_t result = reply.readInt32(); + return result; + } }; IMPLEMENT_META_INTERFACE(SurfaceTexture, "android.gui.SurfaceTexture"); @@ -248,6 +266,20 @@ status_t BnSurfaceTexture::onTransact( reply->writeInt32(res); return NO_ERROR; } break; + case CONNECT: { + CHECK_INTERFACE(ISurfaceTexture, data, reply); + int api = data.readInt32(); + status_t res = connect(api); + reply->writeInt32(res); + return NO_ERROR; + } break; + case DISCONNECT: { + CHECK_INTERFACE(ISurfaceTexture, data, reply); + int api = data.readInt32(); + status_t res = connect(api); + reply->writeInt32(res); + return NO_ERROR; + } break; } return BBinder::onTransact(code, data, reply, flags); } |