Commit fef5e95
committed
fix: fingerprint enrollment dialog becomes unresponsive after losing focus
Root cause:
It's a timing/race condition. After stopEnroll(), Claim(false) was
called immediately, causing DA to release the fingerprint device.
However, the EnrollStatus state update from DA arrives after the device
is released. Since the device is already released, DA discards the
pending state change and does not emit the signal. As a result, the
control center never receives the state update, leaving the UI stuck
in Processing state with no error message or retry option.
Changes:
1. Move Claim(false) from stopFingerEnroll() to signal handlers
(onFingerEnrollFailed, onFingerEnrollCompleted,
onFingerEnrollDisconnected), ensuring it is called only after
DA's state change signal is received
2. Add releaseFingerClaim() to CharaMangerWorker for device claim
release after enrollment ends
3. Add Suspended state to represent enrollment interrupted by focus
loss, showing grayed icon and retry option
4. Reset addStage to StartState when dialog is closed
fix: 指纹录入界面失去焦点后不可操作
问题根因:
这是一个时序/竞态条件问题。stopEnroll() 之后立即调用了 Claim(false),
导致 DA 立即释放指纹设备。但 DA 的 EnrollStatus 状态更新比设备释放
晚到达,由于设备已释放,DA 丢弃了该状态变更,不会发出状态变更信号。
因此控制中心收不到 DA 的状态更新,界面停留在 Processing 状态,没有
错误信息也没有重试选项。
修改内容:
1. 将 Claim(false) 从 stopFingerEnroll() 移至信号回调
(onFingerEnrollFailed、onFingerEnrollCompleted、
onFingerEnrollDisconnected) 中,确保在收到 DA 状态变更信号后
才释放设备声明
2. 新增 releaseFingerClaim() 方法,在录入结束后释放设备声明
3. 新增 Suspended 状态表示焦点中断的录入,显示置灰图标和重试选项
4. 关闭对话框时重置 addStage 为 StartState
PMS: BUG-3648811 parent b033073 commit fef5e95
3 files changed
Lines changed: 10 additions & 2 deletions
File tree
- src/plugin-authentication/operation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
380 | 384 | | |
381 | 385 | | |
382 | 386 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| 173 | + | |
172 | 174 | | |
173 | 175 | | |
174 | 176 | | |
| |||
178 | 180 | | |
179 | 181 | | |
180 | 182 | | |
| 183 | + | |
181 | 184 | | |
182 | 185 | | |
183 | 186 | | |
| |||
0 commit comments