Skip to content

fix: normalize Smart Routing TLV key casing#522

Open
TomasULR wants to merge 1 commit intokavishdevar:mainfrom
TomasULR:fix/tlv-key-casing
Open

fix: normalize Smart Routing TLV key casing#522
TomasULR wants to merge 1 commit intokavishdevar:mainfrom
TomasULR:fix/tlv-key-casing

Conversation

@TomasULR
Copy link
Copy Markdown

Summary

  • createMediaInformationNewDevicePacket used camelCase keys (playingApp, hostStreamingState)
  • createMediaInformationPacket used PascalCase keys (PlayingApp, HostStreamingState)
  • Since these are protocol-level identifiers parsed by AirPods firmware, they should be consistent
  • Normalized to PascalCase to match the more complete createMediaInformationPacket function

Changes

  • AACPManager.kt: Changed playingAppPlayingApp and hostStreamingStateHostStreamingState in createMediaInformationNewDevicePacket
  • String lengths are identical (10 and 18 bytes respectively), so the ByteBuffer allocation (116 bytes) remains correct

Fixes #446

…NewDevicePacket

The keys `playingApp` and `hostStreamingState` in
createMediaInformationNewDevicePacket used camelCase, while the same
keys in createMediaInformationPacket used PascalCase (`PlayingApp`,
`HostStreamingState`). Since these are protocol-level identifiers parsed
by AirPods firmware, they should be consistent across both functions.

Fixes kavishdevar#446
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Case discrepancy in Smart Routing TLV keys between Rust and Kotlin code (PlayingApp/playingApp, HostStreamingState/hostStreamingState)

1 participant