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

Commit f79f8ca0 authored by Zhijun He's avatar Zhijun He
Browse files

Camera2Client: log an error when autoFocus is called in wrong state

Bug: 17555612
Change-Id: Ife33da712fbc8dc44d81e1e869fc75fb21026204
parent d7f77cd7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1217,6 +1217,8 @@ status_t Camera2Client::autoFocus() {
    {
        SharedParameters::Lock l(mParameters);
        if (l.mParameters.state < Parameters::PREVIEW) {
            ALOGE("%s: Camera %d: Call autoFocus when preview is inactive (state = %d).",
                    __FUNCTION__, mCameraId, l.mParameters.state);
            return INVALID_OPERATION;
        }