OSDN Git Service

BT: Don't switch devices when one of the connected BT headsets disconnects
authorSatish Kodishala <skodisha@codeaurora.org>
Mon, 18 Jan 2016 08:53:12 +0000 (14:23 +0530)
committerAjay Panicker <apanicke@google.com>
Thu, 3 Nov 2016 20:57:56 +0000 (20:57 +0000)
commit2980980a75a0066273683aed8b12a58b212a0487
tree35f45ababdc506ebbcd882e5562b5de579899f4d
parent56b92e81918ac09676973d146f6df510b4faf88c
BT: Don't switch devices when one of the connected BT headsets disconnects

Usecase:
1. Enable multi-hf.
2. Connect to HS1.
3. Connect to HS2.
4. Make a call on AG. Here call audio is present on HS2.
5. Now disconnect HS1 from AG.

Failure:
When HS1 is disconnected, call audio is routed to handset/speaker.

Root cause:
When hs1 disconnection intent is received, SCO path is cleared
and audio is routed to handset/speaker.

Fix:
Check if the device being disconnected is same as the device
call audio is present before clearing SCO path.

Change-Id: If83325679b70b5893e44e8d844000ee028d0246c
services/core/java/com/android/server/audio/AudioService.java