aboutsummaryrefslogtreecommitdiff
path: root/framework/java/android/bluetooth/BluetoothAdapter.java
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | Bluetooth: prevent enabling BLE in airplane modeMarie Janssen2016-10-261-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enabling BLE in airplane mode puts BluetoothManagerService in an unexpected state which causes Bluetooth to be on when airplane mode is disabled. Also fixes a bug where a crash of a BLE client would trigger a restart into ON mode. Test: SL4A BleBackgroundScanTest:test_airplane_mode_disables_ble Bug: 32140251 Bug: 32140271 Bug: 32369494 Change-Id: Ie65157e65c3a1ca914f567a7a0c631175d1e5835 (cherry picked from commit bd93b7b3dc6141cef6236cf0ca7dcc5acf5bfeed)
* | | | Merge "Bluetooth: advertising improvements" am: a960366443Jakub Pawlowski2016-11-111-22/+0
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | | | | | am: 8dba939753 Change-Id: I54df9c355ac951d40b2d8e865d5f36f8875ce71f
| * | | Merge "Bluetooth: advertising improvements"Jakub Pawlowski2016-11-111-22/+0
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | am: a960366443 Change-Id: I662ba0f326aa204f9f07ce88bc9d48f5b06770cb
| | * | | Bluetooth: advertising improvementsJakub Pawlowski2016-11-111-22/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes isPeripheralModeSupported(), hidden public method which is always returning true. It also modify the BluetoothLeAdvertiser to be able to use advertising instance with instance id equal 0. Bug: 30622771 Bug: 24099160 Change-Id: Id31582621dbe56d5c3a8d4ee5cd296af66a5f026
* | | | | MAP MCE am: 54d4b66174Joseph Pirozzo2016-11-021-0/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: f4415296da Change-Id: I6a765b9a07204afca2763fb98fdb2e92e08292e5
| * | | | MAP MCEJoseph Pirozzo2016-11-021-0/+7
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 54d4b66174 Change-Id: I155fd0e8b44539bf79cec2c6ddb2a4d71b0c23d9
| | * | | MAP MCEJoseph Pirozzo2016-11-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add MAP client code into packages/apps/Bluetooth. Changes here are to define the MAP MCE interface and enable its selection when running on a device that is also running a PBAP client (Car Kitt). Bug: 30467210 Change-Id: Ifa2cdea7d67f63a2b5f3d971df8ec6d321dc5fee (cherry picked from commit fae5ff2578fe1e51a4677e6d344d4f5ff4618ed1)
| * | | | Merge "Add a way to query for supported Bluetooth profiles."Bryce Lee2016-11-011-0/+30
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | am: a7c4187cb4 Change-Id: Id10ad10a5dbcab92e390a7a245772d2b551ad30c
| | * | | Add a way to query for supported Bluetooth profiles.Bryce Lee2016-11-011-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently there is no way to get the profiles supported by the Bluetooth adapter. Asking for a profile proxy of an unsupported profile does not fail and can lead to code indefinitely waiting for the proxy response. This new code will allow for checking the supported profiles before asking for the proxies. Bug: 26451648 Change-Id: I4b48e7151f5ca53851aa3b967c143fae140ecd34 (cherry picked from commit b1301fa2849bafd6daa422281dc5200863bc761e)
* | | | | resolve merge conflicts of 6a31a5c to stage-aosp-masterMarie Janssen2016-10-311-11/+5
|\| | | | | |_|/ / |/| | | | | | | | | | | | | | | am: ff735e359e Change-Id: Ib6321dee7357920c73b135fbe465998dc4469e66
| * | | resolve merge conflicts of 6a31a5c to stage-aosp-masterMarie Janssen2016-10-311-11/+5
| |\| | | | | | | | | | | | | | Change-Id: I29f2085f4656b0b57896ef505ef6a50cdbd1b194
| | * | Bluetooth: prevent enabling BLE in airplane modeMarie Janssen2016-10-311-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enabling BLE in airplane mode puts BluetoothManagerService in an unexpected state which causes Bluetooth to be on when airplane mode is disabled. Also fixes a bug where a crash of a BLE client would trigger a restart into ON mode. Test: SL4A BleBackgroundScanTest:test_airplane_mode_disables_ble Bug: 32140251 Bug: 32140271 Bug: 32369494 Change-Id: Ie65157e65c3a1ca914f567a7a0c631175d1e5835
| | * | Add Bluetooth toggle prompts - frameworkSvetoslav Ganov2016-10-271-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If permission review is enabled toggling bluetoth on or off results in a user prompt to collect consent. This applies only to legacy apps, i.e. ones that don't support runtime permissions as they target SDK 22. Also added a configuration resource which controls whether permission review mode is enabled. By default it is not and an OEM can change this via an overlay. For now we also keep the old mechanism to toggle review mode via a build property which is still used and will be removed when clients have transitioned. bug:28715749 Change-Id: I94c5828ad6c8aa6b363622a26ff9da4fc2e2fac7 (cherry picked from commit 1fff3cdf4b1e4fc7920a5b76d4ae92eb6824325d)
| | * | Merge \\"Fix links to Bluetooth Guide\\" am: 6ba39e5642Marie Janssen2016-06-211-1/+1
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | am: 84abd4a0d6 Change-Id: I3818fdbfc3ad60a731bdf3b7f047a2afca04ad2e
| | | * \ Merge \"Fix links to Bluetooth Guide\"Marie Janssen2016-06-211-1/+1
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 6ba39e5642 Change-Id: I0f4e84245e05a19403603121a9138c2076ef2282
| | | | * | Fix links to Bluetooth GuideMarie Janssen2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5798c3d71c7cc9c509e0f7b04fa140168b0fdc11
| | | | * | Add missing "try ... finally" safeguardsPavlin Radoslavov2016-05-241-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Safeguards for code protected by ReentrantReadWriteLock. Bug: 28734075 Bug: 28799467 Change-Id: Ib7f598a92e8df6bd855ca48cdd094c1c73a935f2 (cherry picked from commit e957a8a0b4100d001f79c866e7904d2426ac8da0)
| | | | * | Reduced the impact of "synchronized" statementsPavlin Radoslavov2016-05-241-132/+235
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Removed "synchronized" statements that are not needed * Replaced "synchronized" statements with Read/Write lock as appropriate. The lock protects the access to and the setting of BluetoothAdapter.mService and BluetoothManagerService.mBluetooth and associated state. Bug: 28734075 Bug: 28799467 Change-Id: I8f8281c505f0a1ae0add1e14a3caba1f5b2a98e4 (cherry picked from commit eb50a39e98acb78d16465041bb5c172aa1637e97)
| | | | * | Allow factory reset when bluetooth is off (1/2)Ajay Panicker2016-03-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 27348444 Change-Id: I6c2709371b86581709649d7faf09391230449b9b
| | | | * | Add thread safety documentationNeil Fuller2016-01-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An upcoming change will remove "synchronized" from the API docs. This change documents those cases where the guarantees can be determined from code inspection. Bug: 25767152 (cherry-picked from commit bf0dc0fba790cf95f76870c37469703f8f20a57c) Change-Id: I328b96328e89950b90d537bf0a6a704242de4993
* | | | | | Bluetooth: More logging of bluetooth service stateMarie Janssen2016-10-191-3/+3
|\ \ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | am: c816f2eeba Change-Id: Idd26922caf3c1a0fb77d2091ac86bfe3a1d1c62a
| * | | | | Bluetooth: More logging of bluetooth service stateMarie Janssen2016-10-191-3/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 32140251 Bug: 32140271 Bug: 32060415 Change-Id: I50faa184551748023ea5a573646a75293f553d16
* / / / / Add a way to query for supported Bluetooth profiles.Bryce Lee2016-10-091-0/+30
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently there is no way to get the profiles supported by the Bluetooth adapter. Asking for a profile proxy of an unsupported profile does not fail and can lead to code indefinitely waiting for the proxy response. This new code will allow for checking the supported profiles before asking for the proxies. Bug: 26451648 Change-Id: I4b48e7151f5ca53851aa3b967c143fae140ecd34
* / / / Docs: Fixed the Bluetooth guide linkHemal Patel2016-08-171-2/+5
|/ / / | | | | | | | | | | | | | | | | | | Fixed the link that points to the Bluetooth guide. Bug: 29268546 Change-Id: I51c48cebf45c78481f8853a93ff7bcd8483d69ba
* / / Fix race with BT disable in BLE_ON_STATECalvin On2016-06-171-18/+0
|/ / | | | | | | | | | | | | | | This will restart the BT stack when it detects a transition into OFF state while the user enable flag (mEnable) is set. Bug: 29363429 Change-Id: I9839119b34c4694ad92e96240c6989008b2f8d52
* | Add missing "try ... finally" safeguardsPavlin Radoslavov2016-05-241-6/+9
| | | | | | | | | | | | | | | | Safeguards for code protected by ReentrantReadWriteLock. Bug: 28734075 Bug: 28799467 Change-Id: Ib7f598a92e8df6bd855ca48cdd094c1c73a935f2
* | Reduced the impact of "synchronized" statementsPavlin Radoslavov2016-05-241-135/+232
| | | | | | | | | | | | | | | | | | | | | | | | * Removed "synchronized" statements that are not needed * Replaced "synchronized" statements with Read/Write lock as appropriate. The lock protects the access to and the setting of BluetoothAdapter.mService and BluetoothManagerService.mBluetooth and associated state. Bug: 28734075 Bug: 28799467 Change-Id: I8f8281c505f0a1ae0add1e14a3caba1f5b2a98e4
* | BluetoothManager: Make requestControllerActivityInfo one callAdam Lesinski2016-05-101-28/+12
| | | | | | | | | | | | | | | | | | | | Instead of making multiple calls into the Bluetooth service, make one call that can timeout. This helps prevent cases when the Bluetooth process hangs and the system_server is calling into it and causes a WATCHDOG restart. Bug:28658141 Change-Id: I37778b7b6e508be420a21bdf23593ae89b38f5b8
* | BatteryStats: Introduce Async external stats requestsAdam Lesinski2016-04-151-10/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of calling out to external processes with a blocking IPC, pass along a Binder on which the external process can pass back the response. The calling process can then wait for the reply with a timeout. This eliminates watchdog restarts of the system_server when an external process like telephony or bluetooth hangs. Bug:26842468 Change-Id: I1b242e4ed22a63f1a4a0be8c78de8ac4d7bf56c5
* | Allow factory reset when bluetooth is off (1/2)Ajay Panicker2016-04-051-0/+3
| | | | | | | | | | Bug: 27348444 Change-Id: I6c2709371b86581709649d7faf09391230449b9b
* | Add BluetoothProfile for PBAP PCE role.Joseph Pirozzo2016-03-141-1/+8
| | | | | | | | | | | | | | Create a new Bluetooth profile for Pbap Client. Bug: 27490041 Change-Id: I77d2c7eeeb8e955ea61386d784b02b14f415b318
* | Frameworks/base: Use Arrays.toStringAndreas Gampe2015-12-141-1/+1
| | | | | | | | | | | | | | Fix a couple of cases where Arrays.toString should be used. Bug: 19797138 Change-Id: I905fc79e63face9b26975320a92086c732bf6316
* | Add thread safety documentationNeil Fuller2015-11-261-1/+3
| | | | | | | | | | | | | | | | | | An upcoming change will remove "synchronized" from the API docs. This change documents those cases where the guarantees can be determined from code inspection. Bug: 25767152 Change-Id: I75083ce01513ed315222304fe3f34190d40748cb
* | Merge "Fix wrong javadoc in BluetoothAdapter."Florian Salbrechter2015-08-201-3/+1
|\ \ | |/ |/|
| * Fix wrong javadoc in BluetoothAdapter.Florian Salbrechter2015-07-311-3/+1
| | | | | | | | | | | | | | | | Calling getSystemService(BLUETOOTH_SERVICE) returns a BluetoothManager. See ag/661924. Change-Id: I589837b9db3b7e0bc0639c85f4acf23a8f9fb7d1
* | Implement Bluetooth settings factory reset (2/5)Ajay Panicker2015-08-051-0/+19
|/ | | | | | | Implemented the factory reset function to be used to reset all bluetooth settings on device to factory default Bug: 16161518
* SAP: Make it possible to enforce a 16-digit pin code (4/5)Casper Bonde2015-06-091-6/+11
| | | | | | | | | | This change enable the posibility to enforce using a 16-digit pin or MITM for a RFCOMM or L2CAP connection. This is needed for the SIM access profile. Change-Id: I3205013f9e758c353381442a86845dab467780f8 Signed-off-by: Casper Bonde <c.bonde@samsung.com>
* Add support for MITM for BluetoothSockets (1/4)Casper Bonde2015-06-031-4/+44
| | | | | | | | | This change adds an option to enforce Man-in-the-middle protection for the authentication process. This feature is needed for the Sim Access Profile. Change-Id: Ia3ef0caeb750f88608c9fa6bf6367d1c77de4cf3 Signed-off-by: Casper Bonde <c.bonde@samsung.com>
* Expose a few system APIs for BLE scan only mode.Wei Wang2015-06-021-11/+15
| | | | | Bug: 21562349 Change-Id: Ifc58efcf01edac5b4f9e5266adb966e7bc492209
* Do not report WiFi and Bluetooth MAC addresses - framework.Svet Ganov2015-05-181-0/+8
| | | | | | | | | | | | As a part of the new runtime permissions work we are limiting the PII apps can access. BT and WiFi MAC addresses are PII and based on our research there is no valid use case for app dev to get these addresses aside of user tracking which we are trying to limit. bug:21078858 Change-Id: Ib48223b272c0fd4f5c36acc889d4f44df204b309
* Add bluetooth permission annotationsTor Norbye2015-05-151-1/+38
| | | | Change-Id: I5bc86f8ec6ea5c873f1e14dab0e0c47c5c9df7f7
* Allow obtaining BLE capabilities in BLE scan only mode.Wei Wang2015-05-071-7/+4
| | | | | Bug:20923734 Change-Id: I7f3e5fd4410da39922be4512e4ba6ccdeb32887d
* BluetoothSap class should not be publicAndre Eisenbach2015-05-041-1/+2
| | | | | Bug: 20823932 Change-Id: I87dfa10b994f7a14c123bb384925c08b34bfbe67
* Merge "Honor Ble scanning settings from Settings UI." into mnc-devWei Wang2015-05-011-22/+9
|\
| * Honor Ble scanning settings from Settings UI.Wei Wang2015-04-301-22/+9
| | | | | | | | | | | | Bug:20643039 Change-Id: Ib1465108e26b8537c9da1bfbb31a99d2e33da910
* | Fix typo.tturney2015-04-291-1/+1
|/ | | | | | bug: b/20610710 Change-Id: I7b8e0331daddadcb31f45650f5cd937b1f4f90ff
* Fix documentation - non-public API.Etan Cohen2015-04-241-3/+0
| | | | Change-Id: I418bf47b197936b2f50b231425312d5b6d272df8
* Bluetooth document fix: remove reference from open API to hidden entitiesEtan Cohen2015-04-241-4/+1
| | | | Change-Id: I183ae1083727d2e2b96aa503d0e90d81ce3b1a82
* Merge commit '7968421' into merge2Etan Cohen2015-04-241-2/+5
|\
| * Manage onfound/lost resources (1/2)Prerepa Viswanadham2015-04-211-2/+5
| | | | | | | | | | | | | | Provide error callback to app if advertisement tracking resources can't be reserved Change-Id: Ie66b2ec7a64b24bbdf3bb22003a4a7eb46623792