OSDN Git Service

Correcting sniff behaviour in multi-connection scenario
authorMatadeen Mishra <matade@codeaurora.org>
Mon, 1 Feb 2016 13:50:54 +0000 (19:20 +0530)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 4 Mar 2016 19:26:13 +0000 (19:26 +0000)
commit31d1a2b52507df33f13d19ed2349585dfa490542
tree905f658365031413a56757d26adbcf7ad2982537
parent91230965304bc323a96ced0527d560aacb606415
Correcting sniff behaviour in multi-connection scenario

Use case: When multiple profiles are connected on same link and if any one of the
profiles deregisters with powermanager, powermanager will initiate a sniff when it
removes the timer for one profile, even if a timeout did not trigger for other profiles.

Steps:
1. Turn on BT
2. Pair with Mi band (Wearable device)
3. Pair with carkit
4. Turn off BT
5. Turn on BT
HF and A2DP connection should successful after BT on to carkit.

Failure: HF connection fails.

Root Cause: powermanager initiates a sniff when it removes the timer for one profile
Even if a timeout did not trigger for other profiles.

Fix: When multiple profiles connect on the same link and if any one profile
deregisters with powermanager, pm should stop the timer for that profile
and restart the other profiles timers.

Change-Id: I8e215a9d868291976c70ff32b61145b4360a7f8f
bta/dm/bta_dm_pm.c