Fix for BT turn on/off issues: NPE, FD/thread leaks, ANR.
This fix addresses numerous BT on/off issues found from the CTS test.
Fixed fD/pipe leak in various state machine Looper objects by calling quit() function.
Fixed cursor leak in AtPhonebook.
Change Pbap to stop the RFCOMM listener on the STATE_TURNING_OFF instead of STATE_OFF.
Removed several cleanup() methods causing NPE.
Reduced RFCOMM listener timeout from 3 seconds to 300ms between retry.
bug 6834336
Change-Id: I52423343d8f52f65294af0143f373871a9874d77
17 files changed