Repository navigation
fix(android): show the Mac's Streaming Mode and Custom frame rate - #288
Merged
Merged
Conversation
Android parsed only `profile` from `streamingProfileState`. Under the Mac's Automatic mode its Streaming Profile and Priority pickers stayed editable, so a pick snapped back after the Mac declined it. In Custom, picking the Custom profile sent a local frame rate that had never been synced, which could overwrite the Mac's stored rate. - Parse the optional `mode` and `customFrameRate` keys, as iOS and the Mac Receiver already do. Each state carries the mode afresh; a Mac that doesn't send it leaves the pickers as before. - In Automatic, show the pickers disabled with the iOS note, and refuse to send a profile or priority request the Mac would decline. - In Custom, take the Mac's frame rate, so picking Custom keeps it. The current rate is now read under the session lock, not in a default argument evaluated before the lock is taken. No protocol change: the keys were already optional on the wire.
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.
Summary
Android parity for the receiver Streaming Profile fix. iOS, iPadOS and the Mac Receiver already read the Mac's Streaming Mode (#153); Android didn't.
Before this change, Android parsed only
profilefromstreamingProfileState:Now Android:
modeandcustomFrameRatekeys, as the Swift receivers do; each state carries the mode afresh;@Synchronizedtook the lock).Related issue: #142 (stays open for the physical checks).
Scope and compatibility
coresettings model, Settings screen).RECEIVER_CONTROLS.md.modeleaves the choices as before.Verification
:core:test --tests '*StreamSettingsTest*'16/16 pass (4 new: parsing, Automatic lock, Custom rate sync, older Mac). Full:core:test: 1,012 run, 1,009 pass, 2 skipped, 1 fails only on macOS (MediaListenerTest.oneHostCannotTakeEveryHandshakeSlotbinds 127.0.0.2; unrelated, passes on Linux CI).:app:compileDebugKotlinpasses.Safety and review checklist
Notes for reviewers
An independent review found the default-argument race; it is fixed in this commit. CI path classification:
androidandrelease-toolingjobs only.