Update hf structure on phone state change only if SLC is up
Usecase: 1. Enable multi-hf 2. Pair and connect A2DP to a headset(hs1). 3. Pair and connect HFP to another headset(hs2) 4. Accept call on AG 5. Disconnect hs2 by powering off headset 6. Disconnect the call 7. Power on the hs2 Failure: No A2DP playback on hs1 though music player is playing. Rootcause: When there is a call on AG, we update both hf structures about the call. However, when any headset gets disconnected, only its hf structure is cleared. After the call is ended, we don't clear hf structures since there is no hf connection. When A2DP queries for active call, we return true incorrectly since the hs1's structures are not updated when the call is ended. Fix: Update hf structures on phone state change only if SLC is connected on it. Updating both hf structures regardless of the SLC state causes hf state to indicate wrong status. Test: manual Change-Id: I487792038d97a2bac77639d7c699f49fc0b18f97
Loading
Please register or sign in to comment