Commit Graph

649 Commits

Author SHA1 Message Date
Adam Lesinski
010bf374d8 BatteryStats: Introduce Async external stats requests
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
2016-04-15 15:27:52 -07:00
Ajay Panicker
b6e1dafe78 Allow factory reset when bluetooth is off (1/2)
Bug: 27348444
Change-Id: I6c2709371b86581709649d7faf09391230449b9b
2016-04-05 20:23:21 +00:00
Ajay Panicker
4bb4830b75 Get name and address without enabling Bluetooth
Bug: 27665077
Change-Id: I2a06c1a65f22b2f9095a859f5bdd39d4626da165
2016-04-01 22:53:52 +00:00
Jakub Pawlowski
db29556fe8 Fix GATT Characteristic write type serialization
Default writeType for GATT characteristic was not being
serialized into Parcel. This cause errors when trying to
write into Characteristic.

Bug: 27910548
Change-Id: Ib2f88cf991123eaea244f16fa36deb0d773c5a33
2016-04-01 17:59:09 +00:00
Joseph Pirozzo
43b5d980d8 Merge "PBAP client Settings profile." into nyc-dev 2016-03-30 21:00:54 +00:00
Joseph Pirozzo
563c700f70 PBAP client Settings profile.
Add content to Settings and SettingsLib to add a checkbox for PBAP
client profile, and remove the box for PBAP server profile when the
client profile is enabled.

Bug: 27642222
Change-Id: I125559904a8e017a01ae90b1f6425129a87cbee3
2016-03-30 12:20:51 -07:00
Andre Eisenbach
613f430177 Always use Write Request for GATT descriptor writes
According to the Bluetooth Core specification v4.2, Vol 3, Part G,
section 4.12.3: "The Attribute Protocol WRITE REQUEST is used used
for this sub-procedure".

Change-Id: I86e4e1d3a8bfd7d78dfed8419f8abd2d7e89b2bc
2016-03-30 06:48:58 +00:00
Andre Eisenbach
1591d368d3 Fix log spam in getCharacteristicById()
Bug: 27744135
Change-Id: I43f6358484729dedd85eb52432ad9805a66ff81e
2016-03-30 03:27:20 +00:00
Jakub Pawlowski
c9d13c3e3e Use handles to identify GATT attributes (4/4)
Bug: 27778668
Change-Id: I01e095939df2f8dc433f14b473957c815ecade74
2016-03-21 20:10:54 -07:00
Jakub Pawlowski
bf0faed359 Change how services are passed up to the stack
Right now we pass all services, characteristics and descriptors one by one.
This patch changes that - now we pass whole GATT database at once.

Bug: 27455533
Change-Id: Ie42cd80072538e411904b9c9b011a978f26158b9
2016-03-21 19:58:27 -07:00
Ajay Panicker
001269ff89 Make BluetoothManagerCallback oneway to prevent waiting on response
Bug: 27384453
Change-Id: I2cd0f1bc03c7a1e887c89faa18d5baa6ca5be24a
2016-03-19 01:17:47 +00:00
Joseph Pirozzo
cfa8a64694 Add BluetoothProfile for PBAP PCE role.
Create a new Bluetooth profile for Pbap Client.

Bug: 27490041
Change-Id: I77d2c7eeeb8e955ea61386d784b02b14f415b318
2016-03-14 17:02:16 -07:00
Jeff Sharkey
fa6a1bc755 Sometimes to step forward, we need to go back. [2/2]
Change-Id: Iccabb95530a6e3c3950cb9a8dfe84e75354d2f5f
2016-03-01 17:36:23 -07:00
Jeff Sharkey
9ad443f59c Sometimes to step forward, we need to go back. [1/2]
Change-Id: Ibff95298dc2e6c09675018ad0c45506589b6312a
2016-03-01 17:28:36 -07:00
Jakub Pawlowski
b73ebc88d9 Hide android.bluetooth.OobData
Bug: 27385555
Change-Id: I1767909ca17b1b23a2f23ea4a5b4a02cc52eecde
2016-03-01 11:00:33 -08:00
Jeff Sharkey
50d1c044b5 Parcelable classes should always be final.
Also hide ConnectivityMetricsEvent which isn't being used yet.

Bug: 27415331
Change-Id: Iacdccddda504f3f669185f807b4f35b8dc2b0212
2016-02-29 16:46:09 -07:00
Adam Lesinski
b95d4ae257 Merge "Add WorkSource to BLE scanning API" 2016-01-27 20:41:45 +00:00
Marie Janssen
9db28ebea5 IBluetooth: remove dump(), support arguments
Because IBluetooth is a Binder service, we don't need dump() to
support dumpsys, just call the IBinder.dump().

Change-Id: Idcd48f758427b824e0b7eaafd091ba3fb2ff8993
(cherry picked from commit adbb3ff062e039b2552c6b5ded92e56346ac3934)
2016-01-26 20:00:11 +00:00
Bryce Lee
18116c01c2 Improve logging in BluetoothHeadsetClientCall.
Change-Id: I3b1b3946ca21c0bbc902a2c521938239a486d98a
(cherry picked from commit fe985fa7f0)
2016-01-21 23:11:20 +00:00
Adam Lesinski
50e4760214 Record bytes transferred for bluetooth
Bug:26039657
Change-Id: Iec42459d12f4106d5733f55313e8544d58930285
2016-01-18 18:22:55 -08:00
Adam Lesinski
6771d629b5 Add WorkSource to BLE scanning API
This will allow apps that do work on behalf of others to correctly blame
those apps for the power implications of BLE scanning.
Bug:22718669

Change-Id: Ib64af0b6a5d37721a6067ac4e5c39c01f921b56b
2016-01-18 18:19:08 -08:00
Jakub Pawlowski
2fc6e6bfd2 Implementation of BluetoothDevice.createBondOutOfBand
This patch implements out of band pairing that uses optional data.
Currently, it works only for LE transport, using Temporary Key value.
In the future fields might be added to OOBData to support other options for
optional data.

Change-Id: I0811182efb72ac5f80521ed4876b32603cb628c1
2016-01-15 00:01:02 +00:00
Sanket Agarwal
1bec6a5b0d Add support for AVRCP 1.3.
* Add metadata support.
* Add player settings support.
* Add playback support.

A2DP Settings App support.

Bluetooth: A2DP Sink support for Settings App

- add support for A2DP Sink in Settings App. This will enable connection
  initiation and updation on Settings App
- add framework Apis to support A2DP Sink. Any third party Apps can access
  A2DP Sink priority of device and playing state of device
- add support for key to set priority. This manages priority of device for
  A2DP Sink profile

Change-Id: If5f9139f37cdb9d200387877c7801075205c78a0
2016-01-14 21:59:33 +00:00
Bryce Lee
a9b1ee799e Merge "Remove duplicate Bluetooth profiles." into cw-e-dev am: 9c27969385 am: d980b8c7a0 am: 1b695edc97
am: 76656c6b48

* commit '76656c6b48d3fa3e5538e864929ba63b692d5764':
  Remove duplicate Bluetooth profiles.
2015-12-18 23:25:27 +00:00
Bryce Lee
15309a3d20 Remove duplicate Bluetooth profiles.
Change-Id: I04fd867511713dd02ef249b113f7a46c69f22f98
2015-12-18 11:34:20 -08:00
Bryce Lee
bd17928afc resolve merge conflicts of 6b9e5bf0c2 to master.
Change-Id: Idada49313619533bfeb375ee232c942589457fa4
2015-12-18 03:05:20 +00:00
Bryce Lee
cf91b45c05 Merge "Add setting for declaring disabled bluetooth profiles." into cw-e-dev 2015-12-17 19:40:47 +00:00
Bryce Lee
3a0ea6254d Merge "Add UUID to BluetoothHeadsetClientCall" into cw-e-dev am: cae2f2415b am: fc3762aafd am: 0ccc3a1cb5
am: 972c616ce2

* commit '972c616ce2f83622e5529ef86c9d7f243a60b601':
  Add UUID to BluetoothHeadsetClientCall
2015-12-17 00:42:08 +00:00
Bryce Lee
e457fa4b9d Add UUID to BluetoothHeadsetClientCall
This will allow for unique identification of a call as id only provides
uniqueness per session.

Bug: 26016489
Change-Id: I643d24bf5ff5680c26e530075649ef2a4f378295
2015-12-16 15:33:59 -08:00
Bryce Lee
ec85f34812 Add setting for declaring disabled bluetooth profiles.
Bug: 25900899
Change-Id: I420a7c590d72ba10f3e466d15dccfdbb520e810a
2015-12-16 13:32:28 -08:00
Andreas Gampe
e6748ce31f Frameworks/base: Use Arrays.toString
Fix a couple of cases where Arrays.toString should be used.

Bug: 19797138
Change-Id: I905fc79e63face9b26975320a92086c732bf6316
2015-12-14 12:04:26 -08:00
Bryce Lee
e5d5773f71 Improve logging in BluetoothHeadsetClientCall. am: 3c67873f0a am: 180dd72a9b am: a83d518689
am: 0a8c81a204

* commit '0a8c81a2046753f08c036ec68a15778e0c0dade4':
  Improve logging in BluetoothHeadsetClientCall.
2015-12-09 23:18:52 +00:00
Bryce Lee
3c67873f0a Improve logging in BluetoothHeadsetClientCall.
Bug: 26032099
Change-Id: I497edc9aa4c19cc7159993a899071e7b0c26db63
2015-12-08 11:22:31 -08:00
Neil Fuller
1d4775fbb2 Merge "Add thread safety documentation" 2015-12-04 11:09:53 +00:00
Christine Hallstrom
07c289d183 Merge "Log API calls to createBond(), cancelBondProcess(), removeBond()" into cw-e-dev am: 7fb263c472 am: 67d068b5ec am: 9355a0420e
am: c1a79e7bd2

* commit 'c1a79e7bd2061c025fd88529800db7358c39ed14':
  Log API calls to createBond(), cancelBondProcess(), removeBond()
2015-12-03 21:00:30 +00:00
Christine Hallstrom
044b8f3f03 Log API calls to createBond(), cancelBondProcess(), removeBond()
In an attempt to better be able to debug Bluetooth-related parts of
the system, add info-level logging including calling process and
thread whenever the aforementioned functions are called.

Bug: 25996120
Change-Id: I5a72b2ab929f805ec1c43cc54879ed079a8dfe34
2015-12-03 19:08:17 +00:00
Neil Fuller
bf0dc0fba7 Add thread safety documentation
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
2015-11-26 13:33:48 +00:00
Bryce Lee
cdde7c8868 Merge "Add Bluetooth headset API to allow disabling audio route." into cw-e-dev am: cb8749c903 am: 0fa22022a3 am: e2861471b9 am: 52d93db91d
am: 17ffebf8c8

* commit '17ffebf8c802ccc5ee6db36aad88e560297d6c33':
  Add Bluetooth headset API to allow disabling audio route.
2015-11-17 16:41:39 +00:00
Bryce Lee
0db53d90a0 Add Bluetooth headset API to allow disabling audio route.
This functionality is required by devices which have multiple profiles
using the SCO channel. For example, a device that is both a HFP AG and HF.
In this case, we must explicitly notify the profiles when they can acquire
the channel as they are not aware of each other. A similar change was
previously added to the Bluetooth Headset Client profile.

Bug: 25485578
Change-Id: Ia60cfdd33c2c3c3f185464b24056f8ccb976056d
2015-11-16 08:55:52 -08:00
Bryce Lee
52e52f6f56 Merge "Add ability to set whether audio route is allowed in BluetoothHeadsetClient" into cw-e-dev am: 4636770f0d am: 3b6f9f78cf
am: 698b33ea7f

* commit '698b33ea7f78d200df73ef869d68cfc5ab36e604':
  Add ability to set whether audio route is allowed in BluetoothHeadsetClient
2015-10-29 18:19:14 +00:00
Bryce Lee
bc8654748f Merge "Revert "Declare new interface for headset client bluetooth profile to query."" into cw-e-dev am: 0a80294c81 am: 2adf45bee0
am: 8faa19c826

* commit '8faa19c8260d77c5ad7abc061bc06bc596be7c2b':
  Revert "Declare new interface for headset client bluetooth profile to query."
2015-10-29 18:17:41 +00:00
Bryce Lee
461ba0ce4a Merge "Declare new interface for headset client bluetooth profile to query." into cw-e-dev am: a841973dee am: 8b4f21b108
am: 2b47b6eed2

* commit '2b47b6eed247acc95a2d27980b2d20e43c852946':
  Declare new interface for headset client bluetooth profile to query.
2015-10-29 18:15:23 +00:00
Bryce Lee
dc13382622 Add ability to set whether audio route is allowed in BluetoothHeadsetClient
Bug: 25332357
Change-Id: I942ac0dea3e4f8580c44e027a570d0b59822a257
2015-10-28 22:21:54 -07:00
Bryce Lee
70d4210e2e Revert "Declare new interface for headset client bluetooth profile to query."
This reverts commit 694251eaaa.

Change-Id: I588206d8aedb96254c27494dddb32ddc3b6ea0ea
2015-10-29 04:58:38 +00:00
Bryce Lee
694251eaaa Declare new interface for headset client bluetooth profile to query.
This is needed in order to allow implementations of the HFP HF side to
define when audio can be routed to the device. This allows for calls dialed
from an AG to be kept on the AG if desired.

Bug: 25332357
Change-Id: I35a554cfc53f88c7dd3059bf52df5c69df9c7415
2015-10-28 21:06:27 -07:00
Florian Salbrechter
30c3c09071 Merge "Fix wrong javadoc in BluetoothAdapter." 2015-08-20 09:29:29 +00:00
Ajay Panicker
cda6e878cd Implement Bluetooth settings factory reset (2/5)
Implemented the factory reset function to be used to reset all bluetooth
settings on device to factory default

Bug: 16161518
2015-08-05 10:35:15 -07:00
Florian Salbrechter
05416af2ae Fix wrong javadoc in BluetoothAdapter.
Calling getSystemService(BLUETOOTH_SERVICE) returns a BluetoothManager.

See ag/661924.

Change-Id: I589837b9db3b7e0bc0639c85f4acf23a8f9fb7d1
2015-07-31 14:43:15 +01:00
Fyodor Kupolov
7bd8be0019 Added a note about location permission
ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permission is required to get
results.

Bug: 21852542
Change-Id: I3a2746d691f4d7024b0bb7b884d4436c73ce82e6
2015-07-16 19:40:13 -07:00
Fyodor Kupolov
4044440d2c Merge "Require ACCESS_COARSE_LOCATION for ACTION_FOUND broadcast" into mnc-dev 2015-07-15 01:34:43 +00:00