PBAP OBEX session uses Handler/HandlerThread now.

PBAP was using Java threads which was making synchronization error prone
(as revealed by just connecting/disconnecting pbap alongwith pulling
contacts). This change uses Handler to post messages and cleans up the
internal state of the OBEX client in general.

Also, make the BluetoothSocket close non-blocking. Before this change
the close() call was waiting on BluetoothSocket#open() to finish which
has a deadlock.

Change-Id: I0d8b3d08e19f6f34f0e115d08227b029c6c6751c
2 files changed
tree: ed352898f1f9488c776e47298f21bd14945bb06a
  1. src/
  2. Android.mk