diff options
Diffstat (limited to 'services/camera/libcameraservice/Camera2Client.cpp')
-rw-r--r-- | services/camera/libcameraservice/Camera2Client.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/services/camera/libcameraservice/Camera2Client.cpp b/services/camera/libcameraservice/Camera2Client.cpp index dfcc8c0..cd74e6d 100644 --- a/services/camera/libcameraservice/Camera2Client.cpp +++ b/services/camera/libcameraservice/Camera2Client.cpp @@ -792,8 +792,15 @@ void Camera2Client::stopRecording() { bool Camera2Client::recordingEnabled() { ATRACE_CALL(); Mutex::Autolock icl(mICameraLock); + if ( checkPid(__FUNCTION__) != OK) return false; + return recordingEnabledL(); +} + +bool Camera2Client::recordingEnabledL() { + ATRACE_CALL(); + return (mState == RECORD || mState == VIDEO_SNAPSHOT); } @@ -1632,7 +1639,7 @@ status_t Camera2Client::commandPingL() { } status_t Camera2Client::commandSetVideoBufferCountL(size_t count) { - if (recordingEnabled()) { + if (recordingEnabledL()) { ALOGE("%s: Camera %d: Error setting video buffer count after " "recording was started", __FUNCTION__, mCameraId); return INVALID_OPERATION; |