diff --git a/services/cameraservice/cameraoperator/client/src/callback/dcamera_input_callback.cpp b/services/cameraservice/cameraoperator/client/src/callback/dcamera_input_callback.cpp index b2344d3e3bdafe43b7f67401610f22519221b981..a554231006313f5a65e2cbd39481c38c378f9d8c 100644 --- a/services/cameraservice/cameraoperator/client/src/callback/dcamera_input_callback.cpp +++ b/services/cameraservice/cameraoperator/client/src/callback/dcamera_input_callback.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -35,7 +35,7 @@ void DCameraInputCallback::OnError(const int32_t errorType, const int32_t errorM std::shared_ptr event = std::make_shared(); event->eventType_ = DCAMERA_MESSAGE; - if (errorType == CameraStandard::CamServiceError::CAMERA_DEVICE_PREEMPTED) { + if (errorType == CameraStandard::CameraErrorCode::DEVICE_PREEMPTED) { event->eventResult_ = DCAMERA_EVENT_DEVICE_PREEMPT; } else { event->eventResult_ = DCAMERA_EVENT_DEVICE_ERROR; diff --git a/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp b/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp index f99a23e7f883863f7738601e10ee3b51d2949e23..92503a6109a42b03a3407b1328913e0743f9e626 100644 --- a/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp +++ b/services/cameraservice/cameraoperator/client/src/dcamera_client.cpp @@ -208,9 +208,9 @@ int32_t DCameraClient::StartCapture(std::vectorOnFlashlightStatusChanged("", CameraStandard::FlashStatus::FLASH_STATUS_OFF); auto inputCallback = std::make_shared(nullptr); - inputCallback->OnError(CameraStandard::CamServiceError::CAMERA_DEVICE_BUSY, 0); + inputCallback->OnError(CameraStandard::CameraErrorCode::CONFLICT_CAMERA, 0); auto sessionCallback = std::make_shared(nullptr); sessionCallback->OnError(0); @@ -260,8 +260,8 @@ HWTEST_F(DCameraClientTest, dcamera_client_test_001, TestSize.Level1) std::shared_ptr stateCallback = std::make_shared(); inputCallback = std::make_shared(stateCallback); - inputCallback->OnError(CameraStandard::CamServiceError::CAMERA_DEVICE_BUSY, 0); - inputCallback->OnError(CameraStandard::CamServiceError::CAMERA_DEVICE_PREEMPTED, 0); + inputCallback->OnError(CameraStandard::CameraErrorCode::CONFLICT_CAMERA, 0); + inputCallback->OnError(CameraStandard::CameraErrorCode::DEVICE_PREEMPTED, 0); sessionCallback = std::make_shared(stateCallback); sessionCallback->OnError(0); @@ -536,13 +536,13 @@ HWTEST_F(DCameraClientTest, dcamera_client_test_008, TestSize.Level1) HWTEST_F(DCameraClientTest, dcamera_client_test_009, TestSize.Level1) { DHLOGI("DCameraClientTest dcamera_client_test_009: test cameraServiceErrorType"); - int32_t ret = client_->CameraServiceErrorType(CameraStandard::CamServiceError::CAMERA_OK); + int32_t ret = client_->CameraServiceErrorType(CameraStandard::CameraErrorCode::SUCCESS); EXPECT_EQ(DCAMERA_OK, ret); - ret = client_->CameraServiceErrorType(CameraStandard::CamServiceError::CAMERA_ALLOC_ERROR); + ret = client_->CameraServiceErrorType(CameraStandard::CameraErrorCode::SERVICE_FATL_ERROR); EXPECT_EQ(DCAMERA_ALLOC_ERROR, ret); - ret = client_->CameraServiceErrorType(CameraStandard::CamServiceError::CAMERA_DEVICE_BUSY); + ret = client_->CameraServiceErrorType(CameraStandard::CameraErrorCode::CONFLICT_CAMERA); EXPECT_EQ(DCAMERA_DEVICE_BUSY, ret); }