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

Commit c9e3c199 authored by Nipun Kwatra's avatar Nipun Kwatra Committed by Android (Google) Code Review
Browse files

Merge "Disable shutter sound and play recording sound for still mode time lapse."

parents 366622b1 8e02ca74
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -202,6 +202,10 @@ void CameraSourceTimeLapse::startCameraRecording() {
        mCamera->setParameters(params.flatten());
        mCameraIdle = true;

        // disable shutter sound and play the recording sound.
        mCamera->sendCommand(CAMERA_CMD_ENABLE_SHUTTER_SOUND, 0, 0);
        mCamera->sendCommand(CAMERA_CMD_PLAY_RECORDING_SOUND, 0, 0);

        // create a thread which takes pictures in a loop
        pthread_attr_t attr;
        pthread_attr_init(&attr);
@@ -219,6 +223,9 @@ void CameraSourceTimeLapse::stopCameraRecording() {
    if (mUseStillCameraForTimeLapse) {
        void *dummy;
        pthread_join(mThreadTimeLapse, &dummy);

        // play the recording sound and restart preview.
        mCamera->sendCommand(CAMERA_CMD_PLAY_RECORDING_SOUND, 0, 0);
        CHECK_EQ(OK, mCamera->startPreview());
    } else {
        mCamera->stopRecording();