summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server/BluetoothManagerService.java
Commit message (Collapse)AuthorAgeFilesLines
* Start combining threads in system process.Dianne Hackborn2013-05-021-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | This introduces four generic thread that services can use in the system process: - Background: part of the framework for all processes, for work that is purely background (no timing constraint). - UI: for time-critical display of UI. - Foreground: normal foreground work. - IO: performing IO operations. I went through and moved services into these threads in the places I felt relatively comfortable about understanding what they are doing. There are still a bunch more we need to look at -- lots of networking stuff left, 3 or so different native daemon connectors which I didn't know how much would block, audio stuff, etc. Also updated Watchdog to be aware of and check these new threads, with a new API for other threads to also participate in this checking. Change-Id: Ie2f11061cebde5f018d7383b3a910fbbd11d5e11
* Merge "Unhide Bluetooth Low Energy public APIs" into jb-mr2-devMatthew Xie2013-03-281-14/+65
|\
| * Unhide Bluetooth Low Energy public APIsMatthew Xie2013-03-281-14/+65
| | | | | | | | | | | | | | | | | | | | Updated API headers. Add BluetoothManager to be retrieved by context.getSystemService(Context.BLUETOOTH_SERVICE). LE scan functions are placed in BluetoothAdapter The GATT API are device driven instead of a profile-driver. bug 8450158 Change-Id: I424a4cedaac3ef8120a05996500008dd210d2553
* | am 3ae30483: am a19647d3: Merge "Correct executable bit for source files ↵Elliott Hughes2013-03-281-0/+0
|\ \ | |/ |/| | | | | | | | | [Take 2]" * commit '3ae30483777708ff3a4f59a4fa75c6a76213cc30': Correct executable bit for source files [Take 2]
| * Correct executable bit for source files [Take 2]Chirayu Desai2013-03-271-0/+0
| | | | | | | | | | | | | | Change Ieb51bafb46c895a21d2e83696f5a901ba752b2c5 left out some files, this fixes them. Change-Id: Ia949a8581668836ea0251602e048f09c852f5169
* | Add BT - DataTracker connectionRobert Greenwalt2013-03-271-4/+4
| | | | | | | | | | | | | | | | Allows the external BT stack the means to communicate with ConnectivityService during reverse tethering. bug:8445208 Change-Id: Ice7dfb0b50c9481d359aed14a51372878185171c
* | Rename bindService to bindServiceAsUser to follow convention.Amith Yamasani2013-01-161-4/+4
|/ | | | | | This is for the multi-user version of bindService, not the original. Change-Id: Ib2de35941196accf387b1a276a77e6f9af805ec0
* Change getName and getAddress permission to BLUETOOTHMatthew Xie2012-12-041-4/+4
| | | | | | | The permissions were set as BLUETOOTH_ADMIN by mistake. Correct them bug 7665249 Change-Id: Ic1bdbeb25e8f55d886f9a8d38920cbb769dd38ca
* BT is still on after enable flight mode, and reboot the DUTZhihai Xu2012-12-031-65/+112
| | | | | bug 7275625 Change-Id: I4f8952a06152eb5f5775c1f616f6383e4f20e352
* Merge "Allow the NFC process to call Bluetooth APIs." into jb-mr1.1-devMartijn Coenen2012-11-301-4/+8
|\
| * Allow the NFC process to call Bluetooth APIs.Martijn Coenen2012-11-291-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | The NFC process used to be only running as user 0, and it may be calling into Bluetooth. Most of the handover code has now moved to a separate process running as the current user. Fix the existing checks to take into account the correct NFC UID, whatever user it is running as. Bug: 7309141 Change-Id: I953cfb263a28aef7fe1be5880b053425dc359a29
* | BluetoothManagerService call should allow SYSTEM_UIDZhihai Xu2012-11-291-17/+17
| | | | | | | | | | | | bug 7561429 Change-Id: I1483bfe1361f71c7ae3529ea496b33504b95413e
* | Merge "Settings shows it is connected to A2DP, though the device is not ↵Zhihai Xu2012-11-281-6/+31
|\ \ | | | | | | | | | actually connected" into jb-mr1.1-dev
| * | Settings shows it is connected to A2DP, though the device is not actually ↵Zhihai Xu2012-11-131-6/+31
| |/ | | | | | | | | | | | | | | | | | | | | | | connected the root cause is the A2dp and Pbap service need receive STATE_TURNING_OFF intent to shutdown cleanly. So we need send completely state transition intents in user switch handler. bug7403171 Change-Id: Ic92bc85c2b74ae7c95440b237ea8851771ee9f04
* | Cannot enable Bluetooth after using airplane and Bluetooth tethering ↵Zhihai Xu2012-11-141-8/+21
|/ | | | | | | | | | | | sequentially The root cause is we can't unbind blue service when bluetooth isnot disbaled Otherwise the bluedroid stack will be out of sync with bluetooth service only unbind bluetoothservice, when bluetooth is at OFF state. bug 7376846 Change-Id: If5a11926f77a1ac29e75cdddbf5e90d492179f43
* Fix for BluetoothAdapter.getAddress() when BT is off on some devicesZhihai Xu2012-11-011-22/+40
| | | | | | | | | | | | | There are two problem, 1.If we have wrong bluetooth address in global settings db, we never will update it 2. We need enable bluetooth to get the bluetooth address for some devices. For 1, we fix it by add a valid flag in global setting db, this flag will be set when we stored correct address and name to db. We only load the name and address from global setting db when this valid flag is set during power up. For2. we will read BT address after bluetooth is at ON state. bug 7440409 Change-Id: Ic4740b3f0b2fcd214c7ca8393f7331c140eec66d
* License of files Bluetooth package is not updated to ASL2Zhihai Xu2012-10-231-1/+13
| | | | | | bug 7385618 Change-Id: I6232f537f4fda979d3aabe3a059c11d3299de9b8
* Donot reset mEnable flag when binding timeout.Matthew Xie2012-10-111-1/+0
| | | | | | | | During start up, binding could take a while. When binding timeout only reset mBinding but not mEnable. bug 7328147 Change-Id: I306a84ca53d9e1d05111395642626e68d19e9663
* Bluetooth multi-user updates: change bluetooth manager system serviceZhihai Xu2012-10-091-112/+351
| | | | | | | | to reject background user access. disable and enable Bluetooth when user is switched bug 6925422 Change-Id: I52136e707da2d1ba8228c1bb8beef1414ead1893
* Add multi user support for bluetoothMatthew Xie2012-10-041-2/+3
| | | | | | | | Create a BLUETOOTH_STACK permission to share between all users of Bluetooth apk. Bluetooth Manager binds to apk of current user bug 6925422 Change-Id: I2df5546e977c2d77bc66d97d12479d933826922a
* Merge "Remove permission check in registerAdapter" into jb-mr1-devMatthew Xie2012-09-251-2/+0
|\
| * Remove permission check in registerAdapterMatthew Xie2012-09-251-2/+0
| | | | | | | | | | | | | | This matches the JB behavior of getDefaultAdapter public api bug 6948829 Change-Id: I86135bf45fddbb2d078f855f91a34d6fcce237a2
* | Update references to migrated global settings.Jeff Brown2012-09-251-4/+4
|/ | | | | | | | | | Fixed one setting that was migrated but not marked deprecated. Removed a hidden setting that is no longer used by the new power manager service. Bug: 7231172 Change-Id: I332f020f876a18d519a1a20598a172f1c98036f7
* Update airplane-mode manipulation for the new Settings namespaceChristopher Tate2012-09-101-7/+7
| | | | | | | | | | Quick Settings and global actions (aka longpress-Power) toggles are included in this CL. The Settings app manipulations are updated in a different CL because that's a different git package. Bug 7132230 Change-Id: I50838f5e8d7b25a750d2bcae90bf384b09816dbb
* Fault tolerance in BluedroidSyed Ibrahim M2012-09-061-0/+31
| | | | | | | | When bluetooth process gets crashed/killed/stopped by Android system, BluetoothManagerService will re-start AdapterService to recover from the crash appropriately. Change-Id: Iacb1a06a8245089517bbbd57de1378ca8ce4b41e
* Improve multi-user broadcasts.Dianne Hackborn2012-08-301-1/+3
| | | | | | | | | | | | | | | | | | | You can now use ALL and CURRENT when sending broadcasts, to specify where the broadcast goes. Sticky broadcasts are now correctly separated per user, and registered receivers are filtered based on the requested target user. New Context APIs for more kinds of sending broadcasts as users. Updating a bunch of system code that sends broadcasts to explicitly specify which user the broadcast goes to. Made a single version of the code for interpreting the requested target user ID that all entries to activity manager (start activity, send broadcast, start service) use. Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c
* Implement enableNoAutoconnect()Ganesh Ganapathi Batta2012-08-141-8/+52
| | | | | | | Adding enableNoAutoconnect() API support in Bluetooth service to let BT enable in quiet mode Change-Id: I546f3ceb298082a9c9a698f406379470e3cc0d4f
* Handle airplane mode messages in BroadcastReceiver, safe locking, etcMatthew Xie2012-07-161-168/+158
| | | | | | | | Handle airplane mode messages in BroadcastReceiver Safe-lock the access of mBluetooth as a indication of binding state break indent Change-Id: Ib24ba0b1f5102c80e55e44b40a8dbf88bc2fad2e
* Minor changes. Change some instance variables to be final.Matthew Xie2012-07-161-10/+9
| | | | | | Variable name changes, better code reability. Change-Id: I9f0e9c8a57d4bacf0723be1f91d621c592860683
* Removed startService() call from BluetoothManagerService.Fred2012-07-161-44/+40
| | | | | | | | | | BT enable()/disable() are handled by using the binder interface Change-Id: I0bb8d4984129706e424320241ca3ea7e12caf0d3 Conflicts: core/java/android/bluetooth/IBluetooth.aidl
* Moved BluetoothAdapter.ACTION_STATE_CHANGED broadcast from AdapterService to ↵fredc2012-07-161-53/+89
| | | | | | BluetoothManagerService Change-Id: I88e5f3fe050cf11eae9c5cf1b7c393a178b8f9b1
* disable the sync addr flagzzy2012-07-161-2/+1
|
* Re-enable Bluetooth after a reboot, even if airplane mode is enabled.Andre Eisenbach2012-07-161-1/+1
| | | | | | | This is to resolve Buganizer issue 6325950 and make the behaviour of Blueooth and Wifi consistant. Change-Id: Idd6cfa79136f7847e9e670d6d2aa0bf613b0381f
* Fixed socket not closing on BT off. Used RemoteCallbackList to monitor ↵fredc2012-07-161-45/+58
| | | | | | binder deaths in BluetoothManagerService. Change-Id: I524964bd2836d8c5a4bae095b93ac9481337941d
* Fixed issue with getting Bluetooth adapter's name and airplane modefredc2012-07-161-0/+20
| | | | Change-Id: I18b632223574aa41b09ba30de8e35417fad86cbe
* Fixed BT on/off issues and added airplane mode handlingfredc2012-07-161-120/+185
| | | | Change-Id: If39df19b99a3f45ebe82e89205d8bb0ff036e2a2
* Fixed issue with Bluetooth not turning on if enabled called twice in a row ↵fredc2012-07-161-9/+45
| | | | | | or disabled called twice in a row Change-Id: I26cac2fa347934e0740578b811aa5a6767cf4862
* Non persistent adapter servicefredc2012-07-161-0/+542
Change-Id: Ib13d5c77416e58161df0e04d7a15ec0dddbde8b5 Conflicts: core/java/android/bluetooth/BluetoothInputDevice.java Conflicts: core/java/com/android/internal/app/ShutdownThread.java services/java/com/android/server/SystemServer.java Conflicts: services/java/com/android/server/SystemServer.java services/java/com/android/server/pm/ShutdownThread.java