Conversation
The 6.5.2 profile pinned com.apple.android.music.player.fragment.m, which declares no matching field on the real APK, so the symbol fell through to the structural scan and failed closed with two candidates. Both current_song_identity and custom_lyrics inherit that failure, which is why the settings page's "获取 ID" button always claimed no song was playing and custom lyrics never replaced anything on 6.5.2. The correct owner is fragment.l: it is where the field named `c` that isLyricsCurrentItemField already requires lives, and 6.5.1 pins the same owner.
Havenmab
force-pushed
the
fix/lyrics-current-item-field
branch
from
September 30, 2026 14:36
b0d356e to
39ec393
Compare
…csCurrentItemFieldTest.kt
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.
Update
根据建议,只改混淆名:6.5.2 的
LYRICS_CURRENT_ITEM_FIELD从fragment.m改为fragment.l在 6.5.2 6.5.3 测试通过。
症状
设备:Xiaomi 15、Xiaomi Pad 7S Pro 12.5 [Xiaomi HyperOS 3 (Android 16)]
Apple Music 版本:6.5.2 (1586)、6.5.3 (1599)
一个原因同时解释两个症状:两条链路共用同一个"当前歌词条目"字段 seam。
根因
TargetSymbols.kt中:LyricsCurrentItemField使用EXACT_PREFERRED,先尝试TargetSymbolId.LYRICS_CURRENT_ITEM_FIELD钉住的类,再回退到结构候选。com.apple.android.music.player.fragment.m,且钉住的名字契约要求字段名为c。在实测设备上该 pin 未产生任何候选(fragment.m在解析诊断中一次都没出现),于是回退到结构扫描。PlayerLyricsViewFragment的继承链上找到两个BaseContentItem字段:fragment.e#U与fragment.l#c。按项目"Ambiguous不允许取第一个"的约定,解析保持未安装,两项能力一起降级。修复
不动任何版本档案的 pin,只在结构候选里应用项目已经验证过的字段名契约作为裁决:
VERIFIED_LYRICS_CURRENT_ITEM_FIELD_NAME = "c",与既有的isLyricsCurrentItemField共用同一常量,避免两处漂移;Ambiguous,绝不静默绑定错误字段)。依据
c是既有契约(isLyricsCurrentItemField中写死并已被 6.5.0–6.5.3 档案依赖);fragment.l;fragment.l#c满足该契约,fragment.e#U不满足。变更
新增 3 条 JVM 测试:
验证
已验证项
./gradlew test :app:assembleDebug未验证项
在搭载 HyperOS 3 (Android 16) 的 Xiaomi 15、Xiaomi Pad 7S Pro 12.5 上,Apple Music 6.5.2、6.5.3 上验证均通过。但无法保证在其他系统上(如 ColorOS)是否有破坏性影响。