OSDN Git Service

Don't disconnect the same device before connecting.
authorJaikumar Ganesh <jaikumar@google.com>
Fri, 17 Sep 2010 01:24:42 +0000 (18:24 -0700)
committerJaikumar Ganesh <jaikumar@google.com>
Fri, 17 Sep 2010 01:56:30 +0000 (18:56 -0700)
commit84905edb6315ac0af53141cf2f91591443d7422a
tree1dc233b72db9e126c994bca08638097b643ca5a4
parente714898a1abfd828a239e1be7b3f75e2a3cc2120
Don't disconnect the same device before connecting.

We Pair: Remote device sends incoming connection, we get connected.
We get BondingState change and we connect.
Settings app disconnects connected profiles and then connects
without checking whether we are disconnecting the same device itself.

How was it working before ? Settings app used to queue all
commands. The disconnect followed by the connect would work
but unnecessarily disconnect and then connect.
With the queuing moved to framework, the connect fails
since the disconnect status has not been broadcasted.

Settings app shouldn't be disconnecting connected profiles.
That logic should reside in the framework. There is an open bug
and when the new APIs get implemented this will get removed.

Change-Id: I32a7fa36ff3c3321691c55071498f985dcdcfe8e
src/com/android/settings/bluetooth/CachedBluetoothDevice.java