RDKEMW-13205 : Airpods getting auto-connected even auto-connect is OFF.#60
RDKEMW-13205 : Airpods getting auto-connected even auto-connect is OFF.#60DamianoBaroneSky merged 12 commits intodevelopfrom
Conversation
Reason for change: Disconnect the airpods when auto-connect is set to OFF for an audio device since the ACL connection remains active even after the authorization rejection. Priority: P1 Test Procedure: Follow the steps provided in description. Risks: Medium Signed-off-by:Natraj Muthusamy <Natraj_Muthusamy@comcast.com>
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent AirPods from remaining connected when auto-connect is OFF by scheduling a delayed disconnect after an incoming connection is rejected (authorization rejection still leaves the ACL link up).
Changes:
- Add AirPods/Apple-vendor detection on “incoming connection rejected” paths and start a 5-second disconnect timer.
- Modify the disconnect timer callback to always disconnect the device when the timer fires (removing prior streaming/startup safety checks).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
unitTest/unitTest_btmgr/test_btrMgr.c:5153
- The test name/comment and setup don’t match the behavior being tested: expectedDevId is set to 0 (often used as “no device”), then ghBTRMgrDevHdlCurStreaming is set to the same value, which makes the callback skip disconnect but doesn’t represent a real “device is streaming” scenario. Use a non-zero device id and rename/update the test to reflect that it verifies the ‘device is currently streaming => do not disconnect’ case.
void test_btrmgr_DisconnectDeviceTimerCb_DeviceNotStreaming(void)
{
tBTRCoreDevId expectedDevId = 0; // The device is now not streaming
// Setup: Device has started streaming
ghBTRMgrDevHdlCurStreaming = expectedDevId;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Reason for change:
Disconnect the airpods when auto-connect is set to OFF for an audio device since the ACL connection remains active even after the authorization rejection.
Priority: P1
Test Procedure: Follow the steps provided in description.
Risks: Medium
Signed-off-by:Natraj Muthusamy Natraj_Muthusamy@comcast.com