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>
Tue, 11 Sep 2012 05:48:57 +0000 (22:48 -0700)
commit37e1e995fdfd6aecd53f1fd1f8f0928021472db1
tree4db916f61a23ec1fbd6a9c6275ca55341206d02f
parent8ca777c3299ebf8c5869d46ba80d3fa474814751
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: I81d2a559857eef9138ebca662ea28f1d3e358bb8
src/com/android/bluetooth/pbap/BluetoothPbapService.java