| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat: sync PIN freeze state and abort in-flight auth on lock/user switch Add BlockedStateSyncScheduler to keep companion-auth "blocked" state in sync with the user-auth PIN freezing time. Becoming blocked fans out a lock event that aborts in-flight MixAuth/ObtainToken requests and rejects SUCCESS results that race the lock or an active-user switch, so a locked or switched-away user can no longer complete companion auth. Centralize IssueToken/ObtainToken error replies through CompleteWithError so a failed PRE round unblocks the peer instead of waiting for timeout. Map the softbus peer-session-not-created error to a new PEER_SERVICE_NOT_AVAILABLE result code and treat it as terminal in the device-status and resync retry layers, stopping retry storms against devices without the CDA service. Add tests and a fuzz harness for the new paths. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[61%] 🔧 Human Fixed[0%] 🧑 Human[39%] 👌 AI Adopted[100%] Change-Id: I1d80925f4b0f05f1888540d7846333472776309b | 18 天前 | |
refine auth result codes, drop late callbacks, fix RemoveHostBinding after restart - Propagate precise ResultCode through cross-device request helpers instead of collapsing failures to GENERAL_ERROR; centralize the CDA<->UserAuth mapping and add the EXCEED_LIMIT code. Extract ConvertRustErrorCode into rust_error_code_converter.h so the Rust-to-CDA mapping is unit-testable. - Drop late IPC and user-auth callbacks after a request is cancelled or completed through a shared IsFinished() guard; extend the guard to the remaining async reply handlers (HandleSendDelegateAuthResultReply, HandlePeerDeviceStatusChanged) for consistency. - Resolve RemoveHostBinding through persisted binding status so it still works after a service restart. - Reject obtain-token when companion auth is blocked or the host user has switched, and validate the companion user id in the token auth handler, including rejecting INVALID_USER_ID when the device is locked. - Add unit tests for the result code converter, the Rust-to-CDA error code mapping, the HandlePeerDeviceStatusChanged behavior change, and the IsFinished late-callback drop guard. Signed-off-by: Tianshi Liu <tianshi.liu@huawei.com> 🤖 AI[51%] 🔧 Human Fixed[0%] 🧑 Human[49%] 👌 AI Adopted[100%] Change-Id: I6b4f4a6829c207b4fa0e85b7996117d536d4bc57 | 5 天前 |