OSDN Git Service

Do not perform SDP during pairing
authorAndre Eisenbach <eisenbach@google.com>
Fri, 9 Jan 2015 22:52:47 +0000 (14:52 -0800)
committerAndre Eisenbach <eisenbach@google.com>
Thu, 15 Jan 2015 19:24:49 +0000 (11:24 -0800)
commit63e0f16c63617440ce864908344af1c8ce41fbec
treead3dd8d34057314cd884c4508e028dcdf4334c6f
parentb57e1f29643e7454192973db738c13583b5c91a5
Do not perform SDP during pairing

As a result of commit 7de119c (ag/591931), SDP is performed when the
pairing dialog pops up. There are multiple problems with this. On badly
behaved devices an SDP request might trigger pairing from the remote
side, other devices (like Logitech keyboards) will close the connection
once SDP disconnects, causing the pairing to fail.

Further more, fetchUuidsWithSdk() is an asynchronous call. The code that
was added does not wait for SDP to complete. Thus the check for the PBAP
UUID will always fail and cause the permission check to still be
displayed.

With this change, SDP is not performed when the dialog is popped up and
PBAP permission is granted after bonding and subsequent service
discovery in accordance with final consensus in bug 16964116.

Bug: 18948640
Change-Id: I149afa8ae59b63f59ba579c12f97c3ea3d70112c
src/com/android/settings/bluetooth/BluetoothPairingDialog.java
src/com/android/settings/bluetooth/CachedBluetoothDevice.java