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

Commit 5e3501fe authored by Yin-Chia Yeh's avatar Yin-Chia Yeh Committed by android-build-merger
Browse files

Merge "Camera: send disable error code to API1 client" into pi-dev

am: 4fe8f25f

Change-Id: I4397885c098e1d4c4da18844d7f5320930d1a2e3
parents 4a8d2545 4fe8f25f
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2337,10 +2337,13 @@ void CameraService::BasicClient::block() {

void CameraService::Client::notifyError(int32_t errorCode,
        const CaptureResultExtras& resultExtras) {
    (void) errorCode;
    (void) resultExtras;
    if (mRemoteCallback != NULL) {
        mRemoteCallback->notifyCallback(CAMERA_MSG_ERROR, CAMERA_ERROR_RELEASED, 0);
        int32_t api1ErrorCode = CAMERA_ERROR_RELEASED;
        if (errorCode == hardware::camera2::ICameraDeviceCallbacks::ERROR_CAMERA_DISABLED) {
            api1ErrorCode = CAMERA_ERROR_DISABLED;
        }
        mRemoteCallback->notifyCallback(CAMERA_MSG_ERROR, api1ErrorCode, 0);
    } else {
        ALOGE("mRemoteCallback is NULL!!");
    }