From b2c8b19b06357afbfd635dda3ab4d692cbe360c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zen=E7=9F=A5=E4=BB=81?= Date: Thu, 7 Apr 2022 16:32:48 +0800 Subject: [PATCH] fix: use the buildin camera to auth MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Zen知仁 Change-Id: Ieb978391d43b30cd7b54c1a1a67bdb9f6c2ebba2 --- services/faceauth/src/face_auth_camera.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/faceauth/src/face_auth_camera.cpp b/services/faceauth/src/face_auth_camera.cpp index 4ed0e9c..d8e28d3 100644 --- a/services/faceauth/src/face_auth_camera.cpp +++ b/services/faceauth/src/face_auth_camera.cpp @@ -82,7 +82,8 @@ int32_t FaceAuthCamera::CreateCamera(sptr producer) sptr camera = nullptr; if (cameraObjList.size() > 0) { for (unsigned int i = 0; i < cameraObjList.size(); i++) { - if (cameraObjList[i]->GetPosition() == OHOS_CAMERA_POSITION_FRONT) { + if (cameraObjList[i]->GetPosition() == OHOS_CAMERA_POSITION_FRONT && + cameraObjList[i]->GetConnectionType() == OHOS_CAMERA_CONNECTION_TYPE_BUILTIN) { camera = cameraObjList[i]; } }