| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
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 | 16 天前 | |
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 | 16 天前 |