History log of /frameworks/base/core/java/android/server/BluetoothEventLoop.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b7e029d03c115ed65cdea9b2bba307e882c308e2 10-Mar-2010 Jaikumar Ganesh <jaikumar@google.com> Add an API to set the link timeout.

This fixes the problem where the car dock is
powered on and off pretty quickly.

Change-Id: I8724641b8c337019f089b005cb236fc90549cf6f
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
081a9b69a79ad16093122002b27320b23ac656e1 03-Mar-2010 Jaikumar Ganesh <jaikumar@google.com> Remove UUIDs from the cache when the device is unpaired.

This fixes one probable case of A2DP profile connection state hanging
in connecting state. When the device is unpaired and repaired,
before the drivers are up on the bluez side, settings app / auto-connect
code can try to connect.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
577dd1f3e274b84876471c22efac578db94811fc 17-Dec-2009 Jaikumar Ganesh <jaikumar@google.com> Accept incoming connections if no other sink is in NonDisconnecting state.

Bluez sends SINK_STATE_CHANGE before onAgentAuthorize, so
we may be already in CONNECTING state. This will happen with
some A2DP kits which don't like us connecting and thus we will
never be able to connect to them.

Bug:2335345
Dr No: Hiroshi
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
b16c4f7dd92dabf0cc27438a5d3d9ebd203a38b3 05-Dec-2009 Jaikumar Ganesh <jaikumar@google.com> Add API to get Active Sinks.

Allow incoming connections only when there are no active sinks.

Dr No: Eastham
Bug: 2133530
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
3fbf7b62bb48b10316353087d09cc3720af00642 03-Dec-2009 Jaikumar Ganesh <jaikumar@google.com> Add support for Car Dock.

Dr No: Eastham
Bug: 2133530
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
b148bc844e5eddb07bef2fd1b4b754716decb43e 20-Nov-2009 Jaikumar Ganesh <jaikumar@google.com> Fix pairings lost on reboot.

Bug:2277376
Dr No:Eastham
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
e5d93b7ed983f98855555d560faf060836f1a52f 08-Oct-2009 Jaikumar Ganesh <jaikumar@google.com> Set the Bond State to NONE when we receive a Agent Cancel.

Sometimes during OPP, we can get stuck in Pairing state when the remote
end, cancels the Pairing process - we will just get onAgentCancel
and thus not set the Pairing state properly.

DrNo: Eastham
Bug:2174874
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
16fb88a673c41b93c5d57ccb28c2697e7d87701a 07-Oct-2009 Nick Pelly <npelly@google.com> Encourage developers to connect RFCOMM by UUID instead of Channel.

Hide createRfcommSocket(int channel)
Add createRfcommSocketWithServiceRecord(UUID uuid)

Rename listenUsingRfcomm(String,UUID) -> listenUsingRfcommWithServiceRecord(..)

Now we have a complete API for developers to make peer-peer RFCOMM connections
with hard-coding the limited (30) RFCOMM channels, instead using SDP lookup
of an UUID.

This commit addresses two serious bugs:
- Do not throw IOException on accepting an incoming RFCOMM connection with
BluetoothSocket. This was a regression from commit 24bb9b8af4ff6915
- Workaround failure of bluez to update SDP cache when channel changes by
trying to use the same RFCOMM channel on the server every time, instead
of picking server channels randomly. This is a pretty ugly workaround,
and we are still trying to fix the caching issue - but with this
workaround we are at least shippable and apps will work at least until
they start colliding on the 30 RFCOMM channels.

DrNo: eastham
Bug: 2158900
Joke: What did the digital watch say to his mom? "Look mom no hands."
Change-Id: Ia4879943b83afac06b6f1a3f2391cf1628afce7d
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
37686069ae1d7db2604c8aef96a79904f6ddd2f3 30-Sep-2009 Jaikumar Ganesh <jaikumar@google.com> Set BondState to Bonding only if it not Bonded already.

Sometimes we might be paired but the other end might not have stored the link
key. So when we initiate connection the other end will ask for the authorization.
This was setting out Bond State to Bonding.

Change-Id: Iba6fd660ac90a3f48da62e7b6cf479054624a5af
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
aef439e6f825c0cb99a2ac08c8207f48b7a9fe10 28-Sep-2009 Nick Pelly <npelly@google.com> Move android.bluetooth.ParcelUuid to android.os.ParcelUuid

Change-Id: I564429d5c5b6a5372b6ff26a53b0d7e518b53631
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
7633b89443986b35a701a6f41235707de2107bd0 22-Sep-2009 Jaikumar Ganesh <jaikumar@google.com> Set the bonding for incoming connections only when authentication is requested.

Change-Id: Ic44ac0e6dedcb310b0cf47020e5c2ff3d0a4459a
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
10eac971b3a6e5f34a420dd68ebfa796553ad2b9 21-Sep-2009 Jaikumar Ganesh <jaikumar@google.com> Cache the remote device's service channel.

Bluez Device implementation is such that when a device
is unpaired, we removes the device and hence there is no
way to interact with it unless you pair again. Remote service
channel call is used to get the rfcomm channel number which
will be used in profiles like OPP which don't require pairing.

Change-Id: I868a6cdfdb1b7d3591dd8b66cd0320f41a9c1b92
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
2092361d586a20190c9137fb3cc9434cdc9ec99f 20-Sep-2009 Jaikumar Ganesh <jaikumar@google.com> Maintain pending outgoing bonding address.

This helps us to distinguish between incoming and outgoing Bonding requests.

Change-Id: I69e6a269b7dd6aad60e6f5711cad812291a7d313
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
6a9d93cc1abd0f96c68d6b0a6860acd002e9df3d 20-Sep-2009 Jaikumar Ganesh <jaikumar@google.com> Fix adapter name change problem.

This got introduced as a result of the Bluetooth API changes.

Change-Id: I04ce4a91f0e4f74253407897c2f3973f7b0a0055
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
1caa6d111eff6814760ec156b14adc29aa3aae6c 18-Sep-2009 Jaikumar Ganesh <jaikumar@google.com> Add new API for fetching UUIDs using SDP.

Add new API which clients can use to force an SDP query.
The result is broadcast using an intent having the UUIDs.
The intent is broadcast after a timeout, in case of an error.
This timeout is greater than the page timeout.

Change-Id: I61e6db4c05b34c42f679a66987e37e2063a793b6
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
dd0463aef18d251c741bfc9dc7a2787443ef36f1 16-Sep-2009 Jaikumar Ganesh <jaikumar@google.com> Change handling of remoteUuids.

Use the ParcelUuid instead of UUID

Change-Id:Ie05d65a62e8a4df8182a4c737d46c14142bfec43
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
32d8571f509c392dca732c243e9b2138c15daecf 11-Sep-2009 Jaikumar Ganesh <jaikumar@google.com> Changes for BT 2.1

1) Handle incoming 2.1 pairing requests
2) Modify displaying error messages on bond failures.
3) Add delay while accepting incoming pairing for certain 2.1 devices.
When MITM is on, the link key request might come more than once.
Auto accept with a delay.
4) Handle DisplayPasskey callback for pairing a 2.1 keyboard with
a 2.1 device
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
5e59ca8ae4e29efb77acbd5513dcc109ea5dd2b4 11-Sep-2009 Jaikumar Ganesh <jaikumar@google.com> Handle DisconnectRequested message sent by Bluez.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
005b228cdfb369d9b3b325884c0337ba5968bf8c 10-Sep-2009 Nick Pelly <npelly@google.com> API_CHANGE: Cleanup, javadoc and unhide more Bluetooth API.

This is a large batch, and covers:

-- Bluetooth Device Discovery --
BluetoothAdapter.ACTION_DISCOVERY_STARTED
BluetoothAdapter.ACTION_DISCOVERY_FINISHED
BluetoothAdapter.startDiscovery()
BluetoothAdapter.cancelDiscovery()
BluetoothAdapter.isDiscovering()

-- Bluetooth bonding (pairing) --
BluetoothAdapter.getBondedDevices()
BluetoothDevice.ACTION_BOND_STATE_CHANGED
BluetoothDevice.EXTRA_BOND_STATE
BluetoothDevice.EXTRA_PREVIOUS_BOND_STATE
BluetoothDevice.BOND_NONE
BluetoothDevice.BOND_BONDING
BluetoothDevice.BOND_BONDED
BluetoothDevice.getBondState()
BluetoothDevice.createBond()
BluetoothDevice.cancelBondProcess()
BluetoothDevice.removeBond()

-- BluetoothClass --
BluetoothDevice.ACTION_CLASS_CHANGED
BluetoothDevice.EXTRA_CLASS
BluetoothDevice.getBluetoothClass()
BluetoothClass.Service.*
BluetoothClass.Device.Major.*
BluetoothClass.Device.*
BluetoothClass.getDeviceClass()
BluetoothClass.getMajorDeviceClass()
BluetoothClass.hasService()

-- Misc BluetoothDevice --
BluetoothDevice.ACTION_ACL_CONNECTED
BluetoothDevice.ACTION_ACL_DISCONNECTED_REQUESTED
BluetoothDevice.ACTION_ACL_DISCONNECTED
BluetoothDevice.ACTION_DISCOVERED
BluetoothDevice.ACTION_NAME_CHANGED
BluetoothDevice.EXTRA_DEVICE
BluetoothDevice.EXTRA_NAME
BluetoothDevice.EXTRA_RSSI

-- Misc BluetoothAdapter --
BluetoothAdapter.ACTION_LOCAL_NAME_CHANGED
BluetoothAdapter.EXTRA_LOCAL_NAME
BluetoothAdapter.checkBluetoothAddress()

I deprecated BluetoothIntent and moved each intent into the class it relates
to.

Change-Id: I877b1280428ab46278b2bc25668bb44cda22dc36
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
b24e11baac589fe16426f2d243b460ab84991c7b 09-Sep-2009 Nick Pelly <npelly@google.com> API_CHANGE

Deprecate BluetoothError.java.

I spent a lot of time experimenting with a class BluetoothError to enumerate
the many error codes returned by the Bluetooth API. But at the end of the day
they were never used. The vast majority of method calls only really need a
true/false error value, and often not even that.

Methods which do need more detailed error enumeration (for example, bonding
failures) can have there own enumerated error codes. But there is no need
for a common set of error codes.

Also change the IPC failed warnings in BluetoothA2dp to Log.e. These indicate
a very serious error.

Introduce BluetoothAdapter.ERROR and BluetoothDevice.ERROR as helper sentinel
values.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
de893f550301a60274e87aa8168225e7a7a42184 08-Sep-2009 Nick Pelly <npelly@google.com> API_CHANGE

Another round of Bluetooth API clean up, javadoc'ing and unhide'ing.

-- Symbols for getting/setting bluetooth state --
BluetoothAdapter.ACTION_STATE_CHANGED
BluetoothAdapter.EXTRA_STATE
BluetoothAdapter.EXTRA_PREVIOUS_STATE
BluetoothAdapter.STATE_OFF
BluetoothAdapter.STATE_TURNING_ON
BluetoothAdapter.STATE_ON
BluetoothAdapter.STATE_TURNING_OFF
BluetoothAdapter.isEnabled()
BluetoothAdapter.getState()
BluetoothAdapter.enable()
BluetoothAdapter.disable()

-- Symbols for getting/setting scan mode --
BluetoothAdapter.ACTION_SCAN_MODE_CHANGED
BluetoothAdapter.EXTRA_SCAN_MODE
BluetoothAdapter.EXTRA_PREVIOUS_SCAN_MODE
BluetoothAdapter.SCAN_MODE_NONE
BluetoothAdapter.SCAN_MODE_CONNECTABLE
BluetoothAdapter.SCAN_MODE_DISCOVERABLE
BluetoothAdapter.getScanMode()
BluetoothAdapter.setScanMode()

-- Symbols for getting address/names --
BluetoothAdapter.getAddress()
BluetoothAdapter.getName()
BluetoothAdapter.setName()
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
9519ce75f15ba287a641166c1b7ed10f2aa73f74 09-Sep-2009 Jaikumar Ganesh <jaikumar@google.com> Query for all properties if a property change is received and cache is empty.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
efa1dd716da3372cc74a201d11de5e0ef1a9fe9a 31-Aug-2009 Lixin Yue <L.X.YUE@motorola.com> Add Bluetooth Device trust
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
efa33676caf5b7a637fad73cd22c9ef23b68cdc2 28-Aug-2009 Jaikumar Ganesh <jaikumar@google.com> Fix property being cleared when DeviceFound signal is received.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
b23d4458a91c8e77828fc38ffd81914c2e37d43a 26-Aug-2009 Nick Pelly <npelly@google.com> Fix authorization check for Audio Source.

Bluez sends the UUID of the local service being accessed in Agent.Authorize,
not the remote service. So check for Audio Source not Audio Sink.

In most cases this was not a problem because Bluez sends us AdvAudioDist UUID
(0x110D) for incoming A2DP connections, which we already check for. This is a
precautionary change.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
9abcf0982edcda6d14fd8057fe0cfd2147cac477 19-Aug-2009 Jackson Fan <xyfan@motorola.com> Use correct UUID to authorize AVRCP
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
bd022f423a33f0794bb53e5b0720da2d67e4631c 15-Aug-2009 Nick Pelly <npelly@google.com> Bluetooth: API change.

Split BluetoothDevice into BluetoothDevice and BluetoothAdapter.

BluetoothAdapter: Represents the local BT adapter. Operations on the local
adapter (start a scan, etc).
BluetoothDevice: Represents a remote BT device. Operations on remote devices
(pair, connect, etc).

IBluetoothDevice.aidl -> Bluetooth.aidl
BluetoothDeviceService.java -> BluetoothDeviceService.java

TODO:
Javadoc
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
9488cbd0b9ce0a9b49647910e76c6fa910f948ea 04-Aug-2009 Jaikumar Ganesh <jaikumar@google.com> Add incoming connections to the cache and change authorization check.

a) Add incoming connections to cache.
b) Some devices like DS970 sends Adv Audio as the UUID for incoming connection.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
ade40526c899caf9369652f9481634a6232ec022 30-Jul-2009 Jaikumar Ganesh <jaikumar@google.com> Fix UUID typo and allow incoming AVRCP connections.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
b0eca41de0bb6747d8648b134912782e45e4cbef 17-Jul-2009 Jaikumar Ganesh <jaikumar@google.com> Initial support of 2.1 pairing.

Note: Some cases have not been tested yet, as we would need to
get proper UI support.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
12cae39747c49e2886bcfbac9ec42094bdb32209 17-Jul-2009 Jaikumar Ganesh <jaikumar@google.com> Revert "Initial support of 2.1 pairing."

This reverts commit 228b2f3a813e93413a0f9e2f29dfbfc54590a356.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
228b2f3a813e93413a0f9e2f29dfbfc54590a356 17-Jul-2009 Jaikumar Ganesh <jaikumar@google.com> Initial support of 2.1 pairing.

Note: Some cases have not been tested yet, as we would need to
get proper UI support.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
7f74d534f39c4d1e1db8604faa117dcf127cc8b9 14-Jul-2009 Jaikumar Ganesh <jaikumar@google.com> Reconnect to A2DP device only if it supports that profile, fix HF AG UUID.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
8bc8ce44f7e5a720e7b989bdd63bb33da512103b 25-Jun-2009 Jaikumar Ganesh <jaikumar@google.com> Rework the property parsing code.

1. Fix and remove CodeDuplication TODO
2. Fix crash while unpairing.
3. For array properties, make it a bit more efficient by passing,
lesser String objects from JNI.
4. Remove void pointer usage and use union to make code more readble.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
395d1023660c5caedf7888def17f8ad826f51bf8 20-Jun-2009 Jaikumar Ganesh <jaikumar@google.com> Send the name of the device in the DeviceFound signal.

When name resolution is done, we get a DeviceFound signal.
Settings app was not updating the cache.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
d5ac1ae36b4e096eb97984334f86d0c68abea2f7 06-May-2009 Jaikumar Ganesh <jaikumar@google.com> Framework changes for bluez4.

Changes in the Bluetooth JNI calls and framework functions
for Bluez4.
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
28d139fa953c0b3bf2c66d92587e5287ec4dd5ab 03-Apr-2009 Robert Greenwalt <> AI 144392: am: CL 144241 Stop polling dbus.
Original author: rgreenwalt

Automated import of CL 144392
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
37b5a1065fbe849e79378c192de3484bdbf9e16b 25-Mar-2009 Nick Pelly <> Automated import from //branches/master/...@141698,141698
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
9c0c492de4947a9f632eca8d3494d60f2a9a5041 25-Mar-2009 Nick Pelly <> Automated import from //branches/master/...@140894,140894
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
105925376f8d0f6b318c9938c7b83ef7fef094da 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
c39a6e0c51e182338deb8b63d07933b585134929 11-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137873
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
b2a3dd88a53cc8c6d19f6dc8ec4f3d6c4abd9b54 09-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@137197
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
15ab3eae2ec3d73b3e8aa60b33ae41445bf83f4b 20-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132569
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
3001a035439d8134a7d70d796376d1dfbff3cdcd 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
da996f390e17e16f2dfa60e972e7ebc4f868f37e 13-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@131421
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
f1e484acb594a726fb57ad0ae4cfe902c7f35858 22-Jan-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@127436
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/android/server/BluetoothEventLoop.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/server/BluetoothEventLoop.java