BT can come up before the system boots up and we send a broadcast,
this can cause issues.
Bug: 3259948
Change-Id: I53ce6b9851fbf611309db1f0a16768ef9f388e0c
InterfaceConfiguration changed to use InetAddress and stop with the string->int->string
conversions.
bug:2542681
Change-Id: I11c4954547333c43bb840fa0469ddde57b0d043b
SDP records are now registered with a dbus call so we don't have to wait
for initiating auto connections.
Also reduce time to connect other profiles case by 2 secs.
Change-Id: I8f0eab6a95d3bfaf11a8eb7495a024949639d7fc
1. These involve disk operations and multiple processes.
2. onPropertyChange already informs us asychronously.
3. Settings app is the only user, will have to revisit the function
if we make them public.
Change-Id: If019a83c05a0c9e625f27faf99063d33f369f0d8
Most of the time it will either be empty or have 1 device.
Using list makes it much a better API and since its supported
by the AIDL format, the code becomes much nicer.
Change-Id: I5a2508b33ba754fc8cc738409d658e1235aaf2cf
Merge commit '8b525c076068eb38106dca05513816c01d8bdddb' into gingerbread-plus-aosp
* commit '8b525c076068eb38106dca05513816c01d8bdddb':
Check for state before disconnecting.
This is a race condition exposed after we turned off some STOPSHIP
logging and some other logging. We drop the ACl connection after 2 secs
of inactivity and hence the device didn't exist -> DBUS crash.
Bug: 3097224
Change-Id: I90adbbee2c5793924037685e484027ed5cd2e0d0
Merge commit 'c008ca96bb32289958010dcf8f247c35ab9b1f18' into gingerbread-plus-aosp
* commit 'c008ca96bb32289958010dcf8f247c35ab9b1f18':
Work around for errant headsets.
1. Some headsets send an AVCTP connection before an AVDTP connection
When that AVCTP connection fails, we get stuck in IncomingA2DP state
because we don't handle AVCTP signals for now.
We need to handle the signals and fix it better.
2. Also when ACL gets disconnected, reset state i.e
when the low level connection disconnected reset our state.
This is like a fail safe in case we get stuck.
Bug: 3051490
Change-Id: Ibcf188103999ffb1e08c36c2554504c639fb7f50
Merge commit '1bc3a407ceb380e35e894f405f544b5b87e980d4' into gingerbread-plus-aosp
* commit '1bc3a407ceb380e35e894f405f544b5b87e980d4':
Fix auto connection priority handling.
Bug: 3027023
1. user is connected to a headset. Headset is turned off.
2. User connects to another device. The priority of the first
headset must be set to ON. We only have 1 device set at AUTO_CONNECT
priority.
1. A remote headset sends an incoming connection. Don't set
AUTO_CONNECT till its gets connected.
2. For outgoing connections, set it to AUTO_CONNECT in Connecting state
since the user initated this connection.
Change-Id: Iaa211bf22b1fd99850875f7eda686c47142173ba
* Fix some typos in Javadoc and log messages.
* Remove redundant initializer in BluetoothAdapter.readOutOfBandData()
* Use canonical "UTF-8" charset name instead of "UTF8" in
BluetoothDevice.convertPinToBytes()
Change-Id: I58cd5dc48a7ad0053d204c5f590b4b3d438d8672
Merge commit 'a5c742bfd08df55849418cd1c77065ac54d83502' into gingerbread-plus-aosp
* commit 'a5c742bfd08df55849418cd1c77065ac54d83502':
Update local cache before sending intent.
Merge commit 'a224f70b1efc29d9698da5b5c143251a43838f2b' into gingerbread-plus-aosp
* commit 'a224f70b1efc29d9698da5b5c143251a43838f2b':
Fix interaction between BluetoothEventLoop and BluetoothService.
BluetoothEventLoop primarily handles event notifications from Bluez.
It should know innards of Bonding and especially BondState.
BondState class and BluetoothService call into each other.
When BluetoothEvent loop gets the handle to BondState it leads
to deadlocks and ANRs.
Change-Id: I785c57f6246c1288350d26d4acb87d879b27a5f9
Merge commit 'cc5494c9996f809e36539b24e8b6b67683383d29' into gingerbread-plus-aosp
* commit 'cc5494c9996f809e36539b24e8b6b67683383d29':
Out Of Band API for Secure Simple Pairing.
Merge commit '049912b76f320c55cfe56394e520ee2c35f913b8'
* commit '049912b76f320c55cfe56394e520ee2c35f913b8':
Fix to get A2DP to connect after unpairing
Merge commit '9395b4656aca4b00d080ada89a44631459ad7b85' into gingerbread-plus-aosp
* commit '9395b4656aca4b00d080ada89a44631459ad7b85':
Fix to get A2DP to connect after unpairing
In this fix, A2DP profile will be connected when pairing with a
previously paired headset. The reason for this error was that the
connection of the A2DP profile was sent before the callback
onCreatePairedDeviceResult was receied in BluetoothEventLoop.java.
By not going to the state BOND_BONDED until after this callback has been
received, the problem is fixed. However the use case is different if the
pairing is initiated by the remote device. In these cases state
BOND_BONDED will be set when onDevicePropertyChanged instead.
Change-Id: I5dedca87d0a6872705ff3a933a99cce6eb37618a