Repository navigation
fix: 使用稳定任务标识复用保留的原生主页 - #235
Draft
lzh2034855417-beep wants to merge 5 commits into
Draft
lzh2034855417-beep wants to merge 5 commits into
lzh2034855417-beep wants to merge 5 commits into
Conversation
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.
返回原生主页时,保留在最近任务中的任务可能已不再运行,此时
RecentTaskInfo.id为-1。依赖该值的匹配会忽略保留任务,导致复用失败。这是 #229 的一个候选原因,尚未在报告设备确认。增加统一的稳定任务标识:API 29+ 使用
taskId,较旧版本使用persistentId。按最新主线的导航实现,适配八处标识读取,覆盖浏览器后台返回、指定任务派发、最近任务候选与可见性策略、原生宿主识别、主页派发和空宿主匹配。保留主线的nativeHost、最近任务整理、浏览器排除、原生主页兜底及空宿主移除条件,不回退导航变化,不修改全局 launchMode。两个既有测试文件适配稳定标识。除保留任务复用和空宿主回归外,本轮增加三项真实生产路径回归:保留任务指定派发、最近任务主卡分类、Web-rooted 混合任务中的存活 Main 识别;断言同时检查任务未被移除。
Related to #229. Android API contract.
来源与主线
最终来源
08b12d6092938aa756267441b56752170cd5fff8,包含实际官方 main36d89b72294348d0482d509109cf8e76d51fc1cb并保留原历史。相对该基线只有原三个文件,其余主线内容完整保留,无临时验证 workflow、运行时资产、APK 或用户数据。当前实现的云端回归
官方 Gradle/Robolectric 入口及原始 JUnit 回执 成功:
BrowserTasksTest57 项、PictureInPictureOptInTest24 项;合计 81 项,0 failures / 0 errors / 0 skipped。info.id,三个新增方法在 API 23/34 下产生 6 个预期 AssertionError,无运行错误或跳过;随后恢复生产文件,确认无源码残留差异,再运行上述 81 项。验证提交
226ecc47db25b8dd24f5c6c18afac67f27079c53相对测试来源6025d7f54526c09076ba5424c82308d79bd16f38仅包含独立验证工作流。生产 BrowserTasks SHA-256 为179be40004e47285a36eb4b2b21e1c3530d7c1928abc76d1392be82cc7eb5e66。最终提交在该测试来源基础上仅删除一个多余空行,未改变 Java token。固定 Java 格式与原字节证据 成功:google-java-format 1.22.0/JDK17,全树 1714 文件,0 need formatting;最终测试文件 SHA-256
b9c7e1a13bf0b8b6d41ca4fa0ee43b787b5a66f8c0d4691c6698d7ea7f64e7a3,格式前后精确 Java token 摘要一致。原始格式报告及格式化文本可在该作业下载。独立静态审查完整覆盖三文件差异、新增回归、完整主线树保留及最终格式字节映射,结论 APPROVE。审查会话未修改、推送或合并。
验收边界
继续保持 Draft。以上是两个测试类的源码模式 JVM 回归,不是全量单测、完整资产准备、Release/Lint、APK 打包或真机/ROM 验收;不能据此认定 #229 已完整解决或实际最近任务数量保持不变。本轮未执行本地 DSHA 代码,未修改本机安全软件设置。