Conversation
…izing Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add method to retrieve update package information before ValidateAsync
支持在 ValidateAsync 前查询更新包元数据
Sep 19, 2026
Contributor
|
@copilot HttpUpdatePackageClient相关的写法思路是错误的,所有的请求组件内部就实现了不需要使用者显式调用,在请求版本校验的时候应该触发AddListenerUpdatePrecheck在回调中给出最新版本相关信息,然后让用户决定返回值是否更新。这一块的思路可以参考GeneralUpdate的相关实现。 |
Co-authored-by: JusterZhu <11714536+JusterZhu@users.noreply.github.com>
Contributor
Author
已在 cbfb17d 调整:配置 AndroidUpdateOptions.UpdateServer 后,直接调用 ValidateAsync(currentVersion),组件内部完成服务器请求和版本比较,再通过 AddListenerUpdatePrecheck 提供最新 PackageInfo。HttpUpdatePackageClient 已收为内部实现,无需使用者显式调用。 已参照 GeneralUpdate 的实际 CanSkip 实现保留语义:true 跳过、false 继续,强制更新绕过回调。请求失败统一通过结果和失败事件通知,文档已同步修改。47 项测试通过(包含真实本地 HTTP 请求及回调顺序验证),CodeQL 无告警;Android 构建受环境缺少工作负载限制。 |
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.
现有
ValidateAsync依赖调用方提供UpdatePackageInfo,无法主动查询服务器。本次增加独立查询入口,支持先获取包信息再决定是否更新,并修复下载到校验阶段的文件生命周期问题。元数据查询
HttpUpdatePackageClient.GetPackageInfoAsync:支持 GET 标准 JSON,以及 POST GeneralUpdate 参考验证协议。更新链路
接入说明