0
Fork 0
mirror of https://github.com/Silent1566/webhtv.git synced 2026-10-31 16:25:49 +00:00

merge(C111-dev1): 合并 origin/beta ba802dc432 并修复评审发现的 5 处问题

合并 origin/beta ba802dc432(PR #500 from dev5,19 个提交 / 41 个文件)。唯一冲突 Config.java:insert()/save()/delete() 同时保留 PlaybackConfigIdentity.invalidateAll() 与 beta 新增的 invalidateCatalog()。

评审发现并修复:
1) 适配器时序窗口:setViewModel() 同步注册 observeForever,而 mFlagAdapter 只在 initView stage 1 创建;Activity 重建且 ViewModel 保留时 Result 会早到并解引用未建适配器。setDetail(Result) 闸改为 service()==null||mFlagAdapter==null,setPlayer(Result) 改为 service()==null||mQualityAdapter==null,并让 onServiceConnected 尾段在队列非空时排成 4-service-results 阶段。
2) 阶段安全网只生效一次:改为 armInitViewStageSafetyNet() 按队列非空自续期,新增 INIT_VIEW_STAGE_STALL_TIMEOUT_MS=1000 与 mInitViewLastPumpAt 判停摆,避免慢首帧时安全网变成第二个更慢的推进源;删除失效字段 mInitViewStagesPumped。
3) 迟到 stage 无人泵:deferInitViewStage() 在已 launch 时重新武装安全网,堵住 teardown 期间 service 恰好连上导致 4-service-results 永不推进的窄口。
4) 关闭媒体徽标仍预热 127 条正则:App.warmMediaBadgePatterns() 先判 PlayerSetting.isDisplayMediaBadges()。
5) Backup 绕过 Config 写路径使播放身份缓存陈旧:restore(boolean) 与 restore(SyncOptions,boolean) 补 PlaybackConfigIdentity.invalidateAll()。

文档:docs/C111-leanback-playback-loading-jank.md 新增 §14(合并事实、为何不复用旧评审、三轮评审结论、5 项修复与复验)。

Verification: compileLeanbackArmeabi_v7aDebugJavaWithJavac + compileMobileArm64_v8aDebugJavaWithJavac BUILD SUCCESSFUL; testLeanbackArmeabi_v7aDebugUnitTest 4732 tests/8 failed and testMobileArmeabi_v7aDebugUnitTest 5514 tests/6 failed, all failures are pre-existing CRLF-checkout source-scan failures (docs/HOME-STATE-NO-CONFIG-20261018.md:131) unrelated to this diff; 4 rounds of independent read-only review passed (a55494fc, d371dd9c, ecea6948 all approved)

Task-Guard: C111-beta-merge-review-dev1-20261029
This commit is contained in:
Silent1566 2026-10-29 22:54:43 +08:00
commit 380aad38da
43 changed files with 2968 additions and 113 deletions