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

Commit fa6494d0 authored by Wu-cheng Li's avatar Wu-cheng Li Committed by Android (Google) Code Review
Browse files

Merge "Do not set camera preview display if the surface is null."

parents 1bb8e81b 8e0792bb
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -515,9 +515,13 @@ status_t CameraSource::initWithCameraAccess(
        return err;
    }

    // Set the preview display. Skip this if mSurface is null because
    // applications may already set a surface to the camera.
    if (mSurface != NULL) {
        // This CHECK is good, since we just passed the lock/unlock
        // check earlier by calling mCamera->setParameters().
        CHECK_EQ((status_t)OK, mCamera->setPreviewDisplay(mSurface));
    }

    // By default, do not store metadata in video buffers
    mIsMetaDataStoredInVideoBuffers = false;