diff --git a/services/cameraservice/cameraoperator/handler/src/dcamera_handler.cpp b/services/cameraservice/cameraoperator/handler/src/dcamera_handler.cpp index cd3355714a24f1ded9fcd869614380ddcbebf189..3f647dc3a6383a6462dfbede7cbfab0d0161dc4f 100644 --- a/services/cameraservice/cameraoperator/handler/src/dcamera_handler.cpp +++ b/services/cameraservice/cameraoperator/handler/src/dcamera_handler.cpp @@ -64,13 +64,10 @@ std::vector DCameraHandler::Query() DHLOGI("DCameraHandler::Query connection type: %d", info->GetConnectionType()); continue; } - if ((info->GetPosition() == OHOS_CAMERA_POSITION_OTHER) || - (info->GetPosition() == OHOS_CAMERA_POSITION_FRONT) || - (info->GetPosition() == OHOS_CAMERA_POSITION_BACK && - info->GetCameraType() == OHOS_CAMERA_TYPE_LOGICAL)) { - DHItem item = CreateDHItem(info); - itemList.emplace_back(item); - } + DHLOGI("DCameraHandler::Query get %s, position: %d, cameraType: %d", + GetAnonyString(info->GetID()).c_str(), info->GetPosition(), info->GetCameraType()); + DHItem item = CreateDHItem(info); + itemList.emplace_back(item); } DHLOGI("DCameraHandler::Query success, get %d items", itemList.size()); return itemList; @@ -118,13 +115,10 @@ std::vector DCameraHandler::GetCameras() DHLOGI("DCameraHandler::GetCameras connection type: %d", info->GetConnectionType()); continue; } - if ((info->GetPosition() == OHOS_CAMERA_POSITION_OTHER) || - (info->GetPosition() == OHOS_CAMERA_POSITION_FRONT) || - (info->GetPosition() == OHOS_CAMERA_POSITION_BACK && - info->GetCameraType() == OHOS_CAMERA_TYPE_LOGICAL)) { - std::string dhId = CAMERA_ID_PREFIX + info->GetID(); - cameras.emplace_back(dhId); - } + DHLOGI("DCameraHandler::GetCameras get %s, position: %d, cameraType: %d", + GetAnonyString(info->GetID()).c_str(), info->GetPosition(), info->GetCameraType()); + std::string dhId = CAMERA_ID_PREFIX + info->GetID(); + cameras.emplace_back(dhId); } DHLOGI("DCameraHandler::GetCameras success, get %d items", cameras.size()); return cameras; diff --git a/services/cameraservice/cameraoperator/handler/src/dcamera_handler_common.cpp b/services/cameraservice/cameraoperator/handler/src/dcamera_handler_common.cpp index 414fc97c9963378fca0869328ab454203beb598f..572c5eb91eb9d726b85594725a15222a63358696 100644 --- a/services/cameraservice/cameraoperator/handler/src/dcamera_handler_common.cpp +++ b/services/cameraservice/cameraoperator/handler/src/dcamera_handler_common.cpp @@ -64,13 +64,10 @@ std::vector DCameraHandler::Query() DHLOGI("DCameraHandlerCommon::Query connection type: %d", info->GetConnectionType()); continue; } - if ((info->GetPosition() == OHOS_CAMERA_POSITION_OTHER) || - (info->GetPosition() == OHOS_CAMERA_POSITION_FRONT) || - (info->GetPosition() == OHOS_CAMERA_POSITION_BACK && - info->GetCameraType() == OHOS_CAMERA_TYPE_LOGICAL)) { - DHItem item = CreateDHItem(info); - itemList.emplace_back(item); - } + DHLOGI("DCameraHandlerCommon::Query get %s, position: %d, cameraType: %d", + GetAnonyString(info->GetID()).c_str(), info->GetPosition(), info->GetCameraType()); + DHItem item = CreateDHItem(info); + itemList.emplace_back(item); } DHLOGI("DCameraHandlerCommon::Query success, get %d items", itemList.size()); return itemList; @@ -118,13 +115,10 @@ std::vector DCameraHandler::GetCameras() DHLOGI("DCameraHandlerCommon::GetCameras connection type: %d", info->GetConnectionType()); continue; } - if ((info->GetPosition() == OHOS_CAMERA_POSITION_OTHER) || - (info->GetPosition() == OHOS_CAMERA_POSITION_FRONT) || - (info->GetPosition() == OHOS_CAMERA_POSITION_BACK && - info->GetCameraType() == OHOS_CAMERA_TYPE_LOGICAL)) { - std::string dhId = CAMERA_ID_PREFIX + info->GetID(); - cameras.emplace_back(dhId); - } + DHLOGI("DCameraHandlerCommon::GetCameras get %s, position: %d, cameraType: %d", + GetAnonyString(info->GetID()).c_str(), info->GetPosition(), info->GetCameraType()); + std::string dhId = CAMERA_ID_PREFIX + info->GetID(); + cameras.emplace_back(dhId); } DHLOGI("DCameraHandlerCommon::GetCameras success, get %d items", cameras.size()); return cameras;