Repository navigation
Revert "fix: report camera-not-enabled status and keep the face entry… - #63
Merged
Merged
Conversation
Reviewer's GuideReverts the camera-not-enabled reporting implementation by removing its status/API and privacy-watchdog machinery, restoring generic capture failures and prior cleanup behavior, and reinstating /dev video-node monitoring so face capability follows camera presence. Sequence diagram for restored camera capture error handlingsequenceDiagram
participant Client
participant DriverManger
participant CaptureThread
participant QCamera
Client->>DriverManger: enrollStart()
DriverManger->>CaptureThread: Start()
CaptureThread->>QCamera: start()
QCamera-->>CaptureThread: captureError()
CaptureThread->>DriverManger: processStatus(FaceEnrollException)
DriverManger-->>Client: generic capture failure
Client->>DriverManger: verifyStart()
DriverManger->>CaptureThread: Start()
CaptureThread->>QCamera: start()
QCamera-->>CaptureThread: captureError()
CaptureThread->>DriverManger: processStatus(FaceVerifyException)
DriverManger-->>Client: generic capture failure
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
… visible (linuxdeepin#59)" This reverts commit 17bd7f2. The change removed the /dev video-node watcher and always reported FACECHARATYPE, so the control center still showed the face entry on machines without a camera (BUG-379893). Revert it and restore the previous behavior. 1. Remove FaceEnrollCameraNotEnabled / FaceVerifyCameraNotEnabled (15) from the status enums, the corresponding status messages and the service interface documentation. 2. Remove the camera privacy DConfig watch, the 1-second runtime watchdog in the enroll/verify threads, the queryCameraPrivacy()/ GetCameraPrivacy checks and the camera-not-enabled reporting paths; restore the previous captureError handling and Stop() behavior in ErollThread/VerifyThread. 3. Restore the /dev video-node watcher in DriverManger::init(); CharaType again follows the camera device presence, so the face entry is hidden when the camera is switched off. Log: revert camera-not-enabled status reporting and restore the /dev watcher Influence: 1. Camera FN key off: the face entry is hidden again as before the change; enrollment/verification with the camera off restore the previous generic error handling. 2. Camera on: enrollment and verification work normally. 3. Machines without a camera: the face entry is hidden again (the restored /dev watcher sets EMPTYCHARATYPE). Revert "fix: 摄像头未开启上报专用状态码并保持人脸入口始终展示" 此提交回退 17bd7f2。 该提交移除了 /dev 视频节点监听并恒上报 FACECHARATYPE,导致无摄像头 机型控制中心仍展示人脸入口(BUG-379893)。现回退该改动,恢复原有 行为。 1. 从状态枚举、状态文案及服务接口文档中移除 FaceEnrollCameraNotEnabled / FaceVerifyCameraNotEnabled(15)。 2. 移除相机隐私 DConfig 监听、录入/验证线程的 1 秒看门狗、 queryCameraPrivacy()/GetCameraPrivacy 查询及“摄像头未开启”上报 路径;ErollThread/VerifyThread 的 captureError 处理与 Stop() 行为 恢复原有实现。 3. 恢复 DriverManger::init() 中的 /dev 视频节点监听,CharaType 重新 跟随摄像头设备状态,摄像头关闭时人脸入口恢复隐藏。 Log: 回退摄像头未开启状态码上报并恢复 /dev 视频节点监听 Influence: 1. 摄像头FN键关闭:人脸入口恢复隐藏(与改动前一致);摄像头未开启 时录入/验证恢复原有通用错误处理。 2. 摄像头正常:录入、验证流程正常工作。 3. 无摄像头机型:人脸入口恢复隐藏(恢复的 /dev 监听会置为 EMPTYCHARATYPE)。 PMS: BUG-379893
Ivy233
force-pushed
the
fix/revert-pull-59
branch
from
October 16, 2026 09:29
ce41cdb to
c6dd251
Compare
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="drivermanger.cpp" line_range="77" />
<code_context>
}
void DriverManger::init()
{
</code_context>
<issue_to_address>
**Privacy toggle leaves capture active**
When a user enables the camera privacy switch during an active enroll or verify session while the V4L2 node remains present and available, the privacy-state checks no longer report the switch change, while `processCapturedImage` continues capturing and processing frames; enrollment also sends frames over its socket to the client, which continues receiving camera data after privacy is enabled.
Retain privacy-state monitoring and stop the active capture session when the camera privacy switch is enabled.
Also at `workmodule.cpp:249`, `workmodule.cpp:548`.
</issue_to_address>
fly602
approved these changes
Oct 16, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fly602, Ivy233 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… visible (#59)"
This reverts commit 17bd7f2.
The change removed the /dev video-node watcher and always reported FACECHARATYPE, so the control center still showed the face entry on machines without a camera (BUG-379893). Revert it and restore the previous behavior.
Log: revert camera-not-enabled status reporting and restore the /dev watcher
Influence:
Revert "fix: 摄像头未开启上报专用状态码并保持人脸入口始终展示"
此提交回退 17bd7f2。
该提交移除了 /dev 视频节点监听并恒上报 FACECHARATYPE,导致无摄像头
机型控制中心仍展示人脸入口(BUG-379893)。现回退该改动,恢复原有
行为。
Log: 回退摄像头未开启状态码上报并恢复 /dev 视频节点监听
Influence:
PMS: BUG-379893
Summary by Sourcery
Restore the previous camera-device availability behavior and remove dedicated camera-not-enabled status reporting.
Bug Fixes:
Enhancements:
Documentation: