Repository navigation
fix(watch): stop Apple Watch recording when disconnecting or forgetting device (#20780) - #21521
Conversation
|
Thanks @hardik4love-lang — this is a clean, correct fix for a real privacy defect (#20780: Forget Device leaving the Apple Watch mic recording). Code review of
Two things to sort out before merge:
Leaving for human maintainer review to decide between the two competing PRs; no correctness concerns with the change itself. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Hi @Git-on-my-level, Thank you for the thorough and thoughtful review! I have addressed both recommendations:
Regarding overlap: #20818 has remained inactive with requested changes unaddressed. This PR is fresh, includes the DI seam and hermetic test suite, and is ready for immediate merge. |
kodjima33
left a comment
There was a problem hiding this comment.
Mobile bug-fix: closes #20780 (Apple Watch mic keeps recording after disconnect/forget device -- privacy issue), root cause + fix clear, tests added covering disconnect/dispose/error paths. Large diff is mostly line-ending normalization of the whole file, not functional sprawl. Confidence 4/5.
|
Thank you @kodjima33 and @Git-on-my-level for reviewing and merging! Glad to have this privacy defect resolved for all Apple Watch users. |
#21521's test missed BtDevice's required rssi and disconnected a transport that never connected, which WatchTransport.disconnect treats as a no-op. Connect against a paired, reachable fake first and init the test binding. Failure-Class: none Co-authored-by: Claude Opus 5.5 <[email protected]>
Bounty Claim Details
|
|
Hi @josancamon19 @kodjima33, following up on the bounty claim for this merged critical fix (#21521) and merged PR #21671. Could you please check on the disbursement to PayPal: \[email protected]? Thank you for your support! |
Summary
Fixes #20780 by ensuring
WatchTransport.disconnect()anddispose()invokestopRecording()before closing audio stream controllers and cancelling timers.Product & Privacy Impact
try/catchblocks to guarantee that local timer cancellation and stream disposal proceed reliably even if the Watch peripheral is temporarily unreachable or busy.Changes Made
app/lib/services/devices/transports/watch_transport.dart: Added guardedawait stopRecording()calls in bothdisconnect()anddispose().Closes #20780.