summaryrefslogtreecommitdiffstats
path: root/core/jni/android_server_BluetoothEventLoop.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Out Of Band API for Secure Simple Pairing.Jaikumar Ganesh2010-09-131-0/+60
| | | | Change-Id: I54ded27ab85d46eef3d2cca84f2394b1ffe88ced
* DO NOT MERGE: Remove Device Bluez-Dbus interface watch.Jaikumar Ganesh2010-09-091-1/+1
| | | | Change-Id: I6bc04efd1292784bae5fc4786949d9da79e4aa22
* Delete local references to avoid reference table overflow.Jaikumar Ganesh2010-06-031-4/+14
| | | | Change-Id: I2218b97647e381bfe6d329b1b6134bb76c1832b6
* Fix crash while turning bluetooth on, due to a race condition.Jaikumar Ganesh2010-03-311-2/+7
| | | | | | | | | | | | | Bug: 2561150 Race condition: We were basing whether the event loop is running or not on whether nat->pollData was null or not. In rare cases, eventLoopMain would have not started, isEventLoopRunning returns true; java side makes a dbus call and the watches get set to null, causing a crash in dbus_connection_set_watch_functions when eventLoopMain starts. Change-Id: I863f182185a8e956fd53cb58783b7fe0ecfb2ddb
* merge from open-source masterThe Android Open Source Project2010-03-221-5/+12
|\ | | | | | | Change-Id: Ie60db5faf407344b8fbe3d5c1e7c01e927ff251e
| * Everytime Bluetooth was turned off two file descriptors were not closedJohannes Carlsson2010-03-161-5/+12
| | | | | | | | | | | | Using close instead of shutdown on the file descriptors and only clear the file descriptor that was closed. If both file descriptors are cleared the thread will not be able to close it.
* | Set error condition correctly when device is already created.Jaikumar Ganesh2010-02-171-1/+2
| | | | | | | | | | | | When device is already created, and we call CreateDevice, we need to report the error correctly. Only then the SDP query will be done from java land.
* | Fix leak of DBus match rule.Nick Pelly2010-01-221-1/+1
|/ | | | | | | We were registering a match for 'AudioSink', but unregistering 'audio.sink'. This does not immediately cause an error, but stress testing of BT off/on found that the leak causes a DBus Limits Error after ~300 iterations. It then becomes impossible to turn BT on again until a reboot.
* Revert "Remove STOPSHIP comment."Nick Pelly2009-10-141-1/+1
| | | | | | | This reverts commit 3d0726b4d8a30e57852b70f1dcf4d8d20508cd1e Change-Id: Ie1ce5d09cc0b799ef0799f30eedc95f0ca5d3fad DrNo: jerrryw
* Remove STOPSHIP comment.Nick Pelly2009-10-141-2/+1
| | | | | | | Change-Id: I2492bffe57bded65fdbef5cf98e22cef3937e537 DrNo: eastham Bug: 2089423 Joke: Why don't anteaters get sick? Because they're full of anty-bodies!
* Encourage developers to connect RFCOMM by UUID instead of Channel.Nick Pelly2009-10-071-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add new API for fetching UUIDs using SDP.Jaikumar Ganesh2009-09-191-0/+54
| | | | | | | | | 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
* Changes for BT 2.1Jaikumar Ganesh2009-09-111-6/+51
| | | | | | | | | | 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
* Handle DisconnectRequested message sent by Bluez.Jaikumar Ganesh2009-09-111-0/+11
|
* Wait for HCI to come up if getting the adapter path fails.Jaikumar Ganesh2009-09-011-18/+42
|
* Add local frames for parsing properties and processing events.Jaikumar Ganesh2009-08-251-25/+41
| | | | | | | We were running out of local refs when there are lots of devices. Instead of deleting every single local ref, create a local stack frame. This operation is inexpensive so doesn't add a high overload and keeps the code clean instead of deleting every single local ref.
* Fix the scanning panic issueCharles Lu2009-08-071-0/+3
| | | | | Phone panics while streaming over A2DP and scanning for new device BluetoothEventLoop should delete reference
* Initial support of 2.1 pairing.Jaikumar Ganesh2009-07-171-0/+38
| | | | | Note: Some cases have not been tested yet, as we would need to get proper UI support.
* Revert "Initial support of 2.1 pairing."Jaikumar Ganesh2009-07-171-38/+0
| | | | This reverts commit 228b2f3a813e93413a0f9e2f29dfbfc54590a356.
* Initial support of 2.1 pairing.Jaikumar Ganesh2009-07-171-0/+38
| | | | | Note: Some cases have not been tested yet, as we would need to get proper UI support.
* am c9dc19bb: Merge change 4668 into donutAndroid (Google) Code Review2009-06-181-11/+21
|\ | | | | | | | | | | | | Merge commit 'c9dc19bb96d2d77ec50f6e40fc22d1ff615f2044' * commit 'c9dc19bb96d2d77ec50f6e40fc22d1ff615f2044': Fix runtime restarts due to sending the wrong flags to dbus.
| * Fix runtime restarts due to sending the wrong flags to dbus.Nick Pelly2009-06-181-11/+21
| | | | | | | | | | | | | | | | | | In eventLoopMain we were correctly translating from unix events to dbus flags, but a coding typo then gave the unix events to dbus. Fix this typo. Also noticed that we were passing raw dbus flags to poll() in another area. This did not cause any immediate problem, since POLLIN | POLLPRI is harmless and we do not usually need POLLOUT. But fixed anyway.
* | resolved conflicts for merge of ed336839 to masterNick Pelly2009-06-171-0/+1
|\ \ | |/
| * Tell DBUS not to call _exit() if the DBUS connection disconnects.Nick Pelly2009-06-171-0/+1
| | | | | | | | | | | | | | | | | | | | This was causing the system server to quietly die. Naughty DBUS!! Now you will just see errors in the log "DBUS connection disconnected" on every DBUS call. There is still the root cause problem of why the DBUS connection disconnects, which is not addressed by this change.
| * AI 144241: Stop polling dbus.Robert Greenwalt2009-04-021-52/+341
| | | | | | | | | | | | BUG=1244263 Automated import of CL 144241
* | Fix tearDown event loop - message unref, triggers when bluetoothd crashes.Jaikumar Ganesh2009-06-111-14/+16
| |
* | Framework changes for bluez4.Jaikumar Ganesh2009-06-091-395/+238
| | | | | | | | | | Changes in the Bluetooth JNI calls and framework functions for Bluez4.
* | AI 144392: am: CL 144241 Stop polling dbus.Robert Greenwalt2009-04-021-52/+341
|/ | | | | | Original author: rgreenwalt Automated import of CL 144392
* auto import from //branches/cupcake/...@137873The Android Open Source Project2009-03-111-0/+39
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+826
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-821/+0
|
* auto import from //depot/cupcake/@132589The Android Open Source Project2009-03-031-7/+2
|
* auto import from //depot/cupcake/@137055The Android Open Source Project2009-03-021-2/+7
|
* auto import from //branches/cupcake/...@132276The Android Open Source Project2009-02-191-1/+6
|
* auto import from //branches/cupcake/...@131421The Android Open Source Project2009-02-131-0/+4
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-53/+163
|
* auto import from //branches/cupcake/...@127436The Android Open Source Project2009-01-221-5/+26
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-61/+100
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+642