diff options
Diffstat (limited to 'services/camera/libcameraservice/api2')
-rw-r--r-- | services/camera/libcameraservice/api2/CameraDeviceClient.cpp | 14 | ||||
-rw-r--r-- | services/camera/libcameraservice/api2/CameraDeviceClient.h | 4 |
2 files changed, 18 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp index 414316d..289ba06 100644 --- a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp +++ b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp @@ -436,6 +436,20 @@ status_t CameraDeviceClient::waitUntilIdle() return res; } +status_t CameraDeviceClient::flush() { + ATRACE_CALL(); + ALOGV("%s", __FUNCTION__); + + status_t res = OK; + if ( (res = checkPid(__FUNCTION__) ) != OK) return res; + + Mutex::Autolock icl(mBinderSerializationLock); + + if (!mDevice.get()) return DEAD_OBJECT; + + return mDevice->flush(); +} + status_t CameraDeviceClient::dump(int fd, const Vector<String16>& args) { String8 result; result.appendFormat("CameraDeviceClient[%d] (%p) PID: %d, dump:\n", diff --git a/services/camera/libcameraservice/api2/CameraDeviceClient.h b/services/camera/libcameraservice/api2/CameraDeviceClient.h index 21d633c..c6b6336 100644 --- a/services/camera/libcameraservice/api2/CameraDeviceClient.h +++ b/services/camera/libcameraservice/api2/CameraDeviceClient.h @@ -89,6 +89,10 @@ public: // Wait until all the submitted requests have finished processing virtual status_t waitUntilIdle(); + + // Flush all active and pending requests as fast as possible + virtual status_t flush(); + /** * Interface used by CameraService */ |