diff options
Diffstat (limited to 'camera/CameraHal.cpp')
-rw-r--r-- | camera/CameraHal.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/camera/CameraHal.cpp b/camera/CameraHal.cpp index 7754d51..369c398 100644 --- a/camera/CameraHal.cpp +++ b/camera/CameraHal.cpp @@ -2044,7 +2044,16 @@ status_t CameraHal::setPreviewWindow(struct preview_stream_ops *window) { // Need to create the display adapter since it has not been created // Create display adapter - mDisplayAdapter = new ANativeWindowDisplayAdapter(); + ANativeWindowDisplayAdapter* displayAdapter = new ANativeWindowDisplayAdapter(); + displayAdapter->setExternalLocking(mExternalLocking); + if (NULL != mAppCallbackNotifier.get()) { + mAppCallbackNotifier->setExternalLocking(mExternalLocking); + } else { + CAMHAL_LOGE("Can't apply locking policy on AppCallbackNotifier"); + CAMHAL_ASSERT(0); + } + + mDisplayAdapter = displayAdapter; #ifdef OMAP_ENHANCEMENT mDisplayAdapter->setExtendedOps(mExtendedPreviewStreamOps); #endif @@ -3991,6 +4000,8 @@ CameraHal::CameraHal(int cameraId) mCameraIndex = cameraId; + mExternalLocking = false; + LOG_FUNCTION_NAME_EXIT; } @@ -4679,6 +4690,11 @@ void CameraHal::getPreferredPreviewRes(int *width, int *height) LOG_FUNCTION_NAME_EXIT; } +void CameraHal::setExternalLocking(bool extBuffLocking) +{ + mExternalLocking = extBuffLocking; +} + void CameraHal::resetPreviewRes(android::CameraParameters *params) { LOG_FUNCTION_NAME; |