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

Commit cb42f317 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android (Google) Code Review
Browse files

Merge "Camera3: Improve error logging" into jb-mr2-dev

parents da0dc0af 13ec8c4e
Loading
Loading
Loading
Loading
+167 −131

File changed.

Preview size limit exceeded, changes collapsed.

+16 −0
Original line number Diff line number Diff line
@@ -128,6 +128,9 @@ class Camera3Device :
        STATUS_ACTIVE
    }                          mStatus;

    // Tracking cause of fatal errors when in STATUS_ERROR
    String8                    mErrorCause;

    // Mapping of stream IDs to stream instances
    typedef KeyedVector<int, sp<camera3::Camera3OutputStream> > StreamSet;

@@ -172,6 +175,16 @@ class Camera3Device :
     */
    status_t           configureStreamsLocked();

    /**
     * Set device into an error state due to some fatal failure, and set an
     * error message to indicate why. Only the first call's message will be
     * used. The message is also sent to the log.
     */
    void               setErrorState(const char *fmt, ...);
    void               setErrorStateV(const char *fmt, va_list args);
    void               setErrorStateLocked(const char *fmt, ...);
    void               setErrorStateLockedV(const char *fmt, va_list args);

    struct RequestTrigger {
        // Metadata tag number, e.g. android.control.aePrecaptureTrigger
        uint32_t metadataTag;
@@ -272,6 +285,9 @@ class Camera3Device :
        // Pause handling
        bool               waitIfPaused();

        // Relay error to parent device object setErrorState
        void               setErrorState(const char *fmt, ...);

        wp<Camera3Device>  mParent;
        camera3_device_t  *mHal3Device;