diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2015-07-15 16:04:27 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2015-07-16 14:55:33 -0700 |
commit | b25e3c87724b6147ed1da7c1d6617c39bfce2fbf (patch) | |
tree | c0e95e487b2583b8ba87e2ce5505fb74dec9d2d8 /camera | |
parent | 1bc88814f530bf67e425cfb8cea0f2b8dce3c03f (diff) | |
download | frameworks_av-b25e3c87724b6147ed1da7c1d6617c39bfce2fbf.zip frameworks_av-b25e3c87724b6147ed1da7c1d6617c39bfce2fbf.tar.gz frameworks_av-b25e3c87724b6147ed1da7c1d6617c39bfce2fbf.tar.bz2 |
Camera: Add hidden experimental tearDown method.
Bug: 18949148
Change-Id: Ie86ec7d1ec3db54e1154563b2339a208a935f849
Diffstat (limited to 'camera')
-rw-r--r-- | camera/camera2/ICameraDeviceUser.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/camera/camera2/ICameraDeviceUser.cpp b/camera/camera2/ICameraDeviceUser.cpp index ffe974b..d2dc200 100644 --- a/camera/camera2/ICameraDeviceUser.cpp +++ b/camera/camera2/ICameraDeviceUser.cpp @@ -48,7 +48,8 @@ enum { GET_CAMERA_INFO, WAIT_UNTIL_IDLE, FLUSH, - PREPARE + PREPARE, + TEAR_DOWN }; namespace { @@ -365,6 +366,20 @@ public: return reply.readInt32(); } + virtual status_t tearDown(int streamId) + { + ALOGV("tearDown"); + Parcel data, reply; + + data.writeInterfaceToken(ICameraDeviceUser::getInterfaceDescriptor()); + data.writeInt32(streamId); + + remote()->transact(TEAR_DOWN, data, &reply); + + reply.readExceptionCode(); + return reply.readInt32(); + } + private: @@ -570,6 +585,13 @@ status_t BnCameraDeviceUser::onTransact( reply->writeInt32(prepare(streamId)); return NO_ERROR; } break; + case TEAR_DOWN: { + CHECK_INTERFACE(ICameraDeviceUser, data, reply); + int streamId = data.readInt32(); + reply->writeNoException(); + reply->writeInt32(tearDown(streamId)); + return NO_ERROR; + } break; default: return BBinder::onTransact(code, data, reply, flags); |