OSDN Git Service

Terminate PBAP service cleanly during BT off
authorKausik Sinnaswamy <kausik@broadcom.com>
Mon, 10 Sep 2012 11:41:14 +0000 (17:11 +0530)
committerMatthew Xie <mattx@google.com>
Mon, 10 Sep 2012 19:17:06 +0000 (12:17 -0700)
commitf5d88a7b8659bb9ce49edc4faea6bf56f2158572
tree7ee0ef4d974cbebb449ca226e0021c54e01fe016
parent3237754f492015699fc91508d76c2e123d6f3c42
Terminate PBAP service cleanly during BT off

PBAP service runs in a loop of 10 trials to create the RFCOMM listener
thread; this loop is not getting interrupted during BT off, due to which
we end up delaying PBAP stop by 3 seconds (10 * 300ms). The fix is to
check for BT state after RFCOMM listener failure and break out of the
loop if BT is being turned off.
bug 7134544

Change-Id: I35db2221be30980bec973253cdd888e0ce8cc36b
src/com/android/bluetooth/pbap/BluetoothPbapService.java