Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0eae9f3 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Gerrit Code Review
Browse files

Merge "CameraService: Disable capture message types before stopping preview" into jellybean

parents 333bc44d 85d647ce
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -774,6 +774,16 @@ void CameraService::Client::stopPreview() {
    Mutex::Autolock lock(mLock);
    if (checkPidAndHardware() != NO_ERROR) return;

#ifdef OMAP_ENHANCEMENT
    // According to framework documentation, preview needs
    // to be started for image capture. This will make sure
    // that image capture related messages get disabled if
    // not done already in their respective handlers.
    // If these messages come when in the midddle of
    // stopping preview we will deadlock the system in
    // lockIfMessageWanted().
    disableMsgType(CAMERA_MSG_POSTVIEW_FRAME);
#endif

    disableMsgType(CAMERA_MSG_PREVIEW_FRAME);
    mHardware->stopPreview();