Commit Graph

842 Commits

Author SHA1 Message Date
Pavlin Radoslavov
3c0baf0082 Merge "Integration of the LDAC codec for A2DP source" am: 3c050268f0 am: bb8f1cd92b am: 7d14914239
am: 01be004c72

Change-Id: Ia0bdac1d25993519e85f962e7b7624ae5740e685
2017-01-05 08:04:26 +00:00
Pavlin Radoslavov
7d14914239 Merge "Integration of the LDAC codec for A2DP source" am: 3c050268f0
am: bb8f1cd92b

Change-Id: I62f8462330d7661b8008abf862c4d4bb47c129dc
2017-01-05 07:55:27 +00:00
Pavlin Radoslavov
9569ea0b93 Merge "Integration of the aptX and aptX-HD codecs for A2DP source" am: 5242acbd0b am: a750c90ac1 am: 5aaa985e97
am: 546866988a

Change-Id: Id2eb6fc928098fffdf1be85bc708efa8a1b7a339
2017-01-05 02:17:35 +00:00
Pavlin Radoslavov
fad8b730d2 Integration of the LDAC codec for A2DP source
The codec can be used if the encoding shared library is installed
on the device:
 libldacBT_enc.so

Test: A2DP streaming to LDAC headsets
Bug: 30958229

Change-Id: I524805fd308b5181427515617eda05625a7c4ae5
2017-01-04 18:07:29 -08:00
Pavlin Radoslavov
5aaa985e97 Merge "Integration of the aptX and aptX-HD codecs for A2DP source" am: 5242acbd0b
am: a750c90ac1

Change-Id: I7957fb151bb113485240fdc2bae1cdd380930f27
2017-01-05 02:07:05 +00:00
Pavlin Radoslavov
feeb9b245c Integration of the aptX and aptX-HD codecs for A2DP source
Each of the codecs can be used if the corresponding encoding
shared library is installed on the device:
 - aptX: libaptX.so
 - aptX-HD: libaptXHD.so

Test: A2DP streaming to aptX and aptX-HD headsets
Bug: 30958229
Change-Id: I24faddc8cd88ae3e1370922c633f30e13124a867
2017-01-04 16:30:35 -08:00
Ivan Podogov
c8daa78a42 Merge "HID Device role API fixes" am: f33a71d017 am: a7d58fecc6 am: 8e2e2b1381
am: daa72ea3ab

Change-Id: I7ee44e6d952c5d9760e04572d2009fe107aad80b
2017-01-04 10:48:34 +00:00
Ivan Podogov
8e2e2b1381 Merge "HID Device role API fixes" am: f33a71d017
am: a7d58fecc6

Change-Id: Iab0dc91a8e2d4066d5eb85ec4771d42642783671
2017-01-04 10:41:26 +00:00
Ivan Podogov
f33a71d017 Merge "HID Device role API fixes" 2017-01-04 10:32:41 +00:00
Pavlin Radoslavov
858ab99071 Merge "Add a mechanism for configuring the A2DP Source codecs" am: 63270f2b96 am: 8b46f87e7e am: da3de76bdb
am: 62c5226e9c

Change-Id: I14d4cc2dc91cb1ab431eda32d5066ac8f471c3a6
2017-01-04 03:54:18 +00:00
Pavlin Radoslavov
da3de76bdb Merge "Add a mechanism for configuring the A2DP Source codecs" am: 63270f2b96
am: 8b46f87e7e

Change-Id: I39e4b90491f646887200649954b652d9f5439925
2017-01-04 03:44:40 +00:00
Pavlin Radoslavov
44a4ef0aa9 Add a mechanism for configuring the A2DP Source codecs
* Added a new class BluetoothCodecConfig that contains codec-related
  configuration or capabilities: codec type, priority, sample rate,
  bits per sample, channel mode, and codec specific fields.

* Extended the Bluetooth A2DP AIDL interface to get/set the current
  codec configuration

* Added new call handleBluetoothA2dpDeviceConfigChange() to the Media
  Framework that is called when there are changes in the
  Bluetooth A2DP device configuration - e.g., the A2DP codec is changed.

Test: A2DP streaming to headsets, TestPlans/71390
Bug: 30958229
Change-Id: I9a82716cbc2a5efbe77352a031ac80c88f6a2459
2017-01-03 17:52:52 -08:00
Ivan Podogov
dd87cd3bb6 HID Device role API fixes
This change makes HIDD API more like the other ones, i.e.
supporting multiple devices, and implements missing methods.

While the underlying implementation may still only support a
single device at a time, the "device" parameter can still be
useful for checking if the application is trying to send the
data to a correct device.

Test: make
Change-Id: I55fe04c0762a96fcddd6c6678e790361d648111a
2017-01-03 22:36:30 +00:00
Ivan Podogov
d57df642d7 Fix profiles broken by ag/1751147 am: 5297dba712 am: 72d9008700
am: 0ad19476cb

Change-Id: I6e69bac35f1d3ec78b64287f4faa86103357e136
2016-12-30 23:22:36 +00:00
Ivan Podogov
72d9008700 Fix profiles broken by ag/1751147
am: 5297dba712

Change-Id: I9c0a4ead26f60b601847c1ba73e6b492a3611880
2016-12-30 23:07:32 +00:00
Ivan Podogov
5297dba712 Fix profiles broken by ag/1751147
Change-Id: Ifa92819df8e63355a3979ea0f1a20a0363b6cd45
2016-12-30 22:22:38 +00:00
Marie Janssen
6727859f42 resolve merge conflicts of 825d8ff to master
Change-Id: I57ae47778f738dbea6a670b85f24161cfb544a16
2016-12-29 16:20:43 -08:00
Marie Janssen
07e590a574 resolve merge conflicts of c816141 to nyc-mr1-dev-plus-aosp
Change-Id: I42e00b90165220d88519771b8f4280aaf3a07525
2016-12-29 14:05:47 -08:00
Marie Janssen
c816141bce resolve merge conflicts of 9cc7ebe to stage-aosp-master
Change-Id: Ia1cdf49d77a574c38ed5cc33c31d5cf930103484
2016-12-29 12:44:03 -08:00
Ivan Podogov
48e6745a08 Rename the Bluetooth profile classes for HID Device role. am: 0afe190af5 am: 94e3d3f499 am: 91ab2e2f98
am: 48738f5ad0

Change-Id: I15651c5a6e3baf53d915626ea6c55180fefe28b5
2016-12-29 20:08:38 +00:00
Hemant Gupta
c519b8d83e Bluetooth: Add support for HID Device Role am: e88fd4b594 am: ee469c6fe9 am: 1ee22b7f70
am: a9c92c2442

Change-Id: I56625e00b1b6c2b7b11e4ce4dc3038072ef6c231
2016-12-29 20:07:51 +00:00
Ivan Podogov
91ab2e2f98 Rename the Bluetooth profile classes for HID Device role. am: 0afe190af5
am: 94e3d3f499

Change-Id: I97ff93fd2564bd76d90095f8086f79c6c6086aff
2016-12-29 19:46:55 +00:00
Hemant Gupta
1ee22b7f70 Bluetooth: Add support for HID Device Role am: e88fd4b594
am: ee469c6fe9

Change-Id: Ic48911d254671d402f5a6b8198109f28e6497036
2016-12-29 19:46:08 +00:00
Ivan Podogov
94e3d3f499 Rename the Bluetooth profile classes for HID Device role.
am: 0afe190af5

Change-Id: Ib5c9b904da57048d719df504142edd3dab0e6ec3
2016-12-29 19:38:41 +00:00
Hemant Gupta
ee469c6fe9 Bluetooth: Add support for HID Device Role
am: e88fd4b594

Change-Id: Ic2a82d5670ffbd3046766d73ed9b180546c59169
2016-12-29 19:37:58 +00:00
Marie Janssen
9cc7ebe7d9 Merge "Bluetooth: track enabling in dumpsys" 2016-12-29 19:32:36 +00:00
Marie Janssen
5980456040 Bluetooth: track enabling in dumpsys
Move basic state dumpsys to here from AdapterService.

Track which apps are enabling and disabling Bluetooth, including BLE
apps, and show the apps in the dumpsys logs.

Test: start phone and enable/disable, take bug report
Bug: 33692282
Change-Id: I6ea62ebdcfd7873d0be1bb5c5c520bbce3737a40
2016-12-29 19:22:14 +00:00
Ivan Podogov
0afe190af5 Rename the Bluetooth profile classes for HID Device role.
We already have BluetoothInputDevice class, so adding something
called BluetoothHidDevice seems confusing. On the other hand,
the new class is designed to connect to HID Host devices, so
naming it BluetoothInputHost makes sense and goes in line with
the existing BluetoothInputDevice.

The same goes for the new constant HID_DEVICE that is just as
confusing to have together with the INPUT_DEVICE one.

This CL also renames the "connection state changed" broadcast
(for the same reasons), declares it as an SDK constant, and also
adds some javadoc to it.

Note that BluetoothHidDeviceApp* classes remained unchanged, as
those correspond to the app that implements the Device (and
connects to the Host).

Test: make
Change-Id: I5075ca5b97db3c1dd403c2e9660eecc7380cffe2
2016-12-29 14:30:40 +00:00
Hemant Gupta
e88fd4b594 Bluetooth: Add support for HID Device Role
This patch adds the HID Device Role support in Bluetooth framework.
Also AIDL and callback related files for HID Device role are added
to provide interface for third party applications to communicate with
HID Device Service.

Change-Id: Id03a362b7bcfa2e76056fa0197eaac12ce49b5a2
2016-12-29 14:29:53 +00:00
Marie Janssen
5c7ef9ccc7 resolve merge conflicts of 7a2518e to nyc-mr1-dev-plus-aosp am: f2fc15824d
am: 2f94877c01

Change-Id: I00f1e604816bd95b4ecc3063209e38780a4e8675
2016-12-15 00:27:08 +00:00
Marie Janssen
f2fc15824d resolve merge conflicts of 7a2518e to nyc-mr1-dev-plus-aosp
Change-Id: I903680717ed121a93fee3b7c2ed358cb29726d71
2016-12-14 13:44:28 -08:00
Marie Janssen
7a2518ee6e Merge "Bluetooth: log message improvements"
am: f34bdf7676

Change-Id: Ic89c59257559d95119829fa4157dbb763124e86f
2016-12-14 20:01:39 +00:00
Marie Janssen
cb21ad71ed Bluetooth: log message improvements
Some log improvements:
 - Reduce logspam
 - Use names for states in logs instead of numbers
 - Be more consistent with messages

Also remove some commented out dead code.

Test: run on phone, observe more useful logs
Change-Id: I32163278e148be144c03d4e8aaf0eb761226c94c
2016-12-14 09:51:30 -08:00
Ivan Podogov
903d6414e5 resolve merge conflicts of b1e2da7 to nyc-mr1-dev-plus-aosp
Test: build police
Change-Id: Ifec1ab6760ebb94b0b411c9c60f07066e151206b
2016-12-13 17:55:14 +00:00
Svetoslav Ganov
c2ac5bde6f DO NOT MERGE Add Bluetooth toggle prompts - framework
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: I77bca2305f9d0f20034b2c8fc5b58e0565d5e617
2016-12-12 09:50:24 -08:00
Svetoslav Ganov
b1e2da7c24 Add Bluetooth toggle prompts - framework
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
2016-12-02 11:52:18 +00:00
Jakub Pawlowski
e3fb0afa96 Merge "Bluetooth: report proper advertiser status on error" am: b509957e62 am: 673c0e5596 am: e8ceb15b51
am: 0debe3c5b7

Change-Id: Iff59148dd5862bf0dcc51112b27ced7e9f76bef6
2016-11-23 02:15:40 +00:00
Jakub Pawlowski
e8ceb15b51 Merge "Bluetooth: report proper advertiser status on error" am: b509957e62
am: 673c0e5596

Change-Id: Ic91b1c614e9cc71e7d57bd39ac31ec1127f08f65
2016-11-23 02:03:13 +00:00
Jakub Pawlowski
673c0e5596 Merge "Bluetooth: report proper advertiser status on error"
am: b509957e62

Change-Id: I1bb0a029a9044c3931e158c7ef02ffee4cb0f1cd
2016-11-23 01:58:03 +00:00
Jakub Pawlowski
76f517a173 Bluetooth: report proper advertiser status on error
When advertiser is not started because too many advertisers are
registered, return proper error code.

Bug: 30622771
Test: sl4a ConcurrentBleAdvertisingTest
Change-Id: I57384ff30132e9a7ee17dcf191ff89baa7abf1ef
2016-11-22 13:38:15 -08:00
Jakub Pawlowski
4bdd6d454d Merge "Bluetooth: advertising improvements" am: 82c9ba9c55 am: e3b71cd572 am: d81df46e80
am: c90cb005fe

Change-Id: I32443204849794f92917a2a2e1098951d5015851
2016-11-12 00:36:22 +00:00
Jakub Pawlowski
d81df46e80 Merge "Bluetooth: advertising improvements" am: 82c9ba9c55
am: e3b71cd572

Change-Id: I54df9c355ac951d40b2d8e865d5f36f8875ce71f
2016-11-11 23:58:44 +00:00
Jakub Pawlowski
e3b71cd572 Merge "Bluetooth: advertising improvements"
am: 82c9ba9c55

Change-Id: I662ba0f326aa204f9f07ce88bc9d48f5b06770cb
2016-11-11 23:48:51 +00:00
Jakub Pawlowski
3d83b0e90b Bluetooth: advertising improvements
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
2016-11-11 23:28:32 +00:00
Jakub Pawlowski
1cc78aa2c3 Merge "BLE OOB Pairing - parse address type (5/5)" am: 97d9fe0a2f am: c3cfff6ef6 am: f59ad8bd68
am: 196fe3597c

Change-Id: Idf087fc9dcd88733ec7755196fab3eac944bf8cf
2016-11-10 20:31:12 +00:00
Jakub Pawlowski
f59ad8bd68 Merge "BLE OOB Pairing - parse address type (5/5)" am: 97d9fe0a2f
am: c3cfff6ef6

Change-Id: Ia05bccadc06b202cf6ac1039b1e227bd67575bb5
2016-11-10 20:14:24 +00:00
Jakub Pawlowski
c3cfff6ef6 Merge "BLE OOB Pairing - parse address type (5/5)"
am: 97d9fe0a2f

Change-Id: I935cc35d9f7f1eea5459f0091ad14dc8b200bc02
2016-11-10 20:07:39 +00:00
Jakub Pawlowski
f465823f6d BLE OOB Pairing - parse address type (5/5)
When address type is not parsed, creating bond to devices not using
random address is impossible.

Bug: 32780409
Test: try pairing with nRF52DK using random address
Change-Id: Ie6cc1f8c008d43b2acd021b47f9bbfb1f63472e8
2016-11-10 19:51:49 +00:00
Jeff Sharkey
0a17db1cc5 Detect non-oneway calls leaving system_server.
To protect system stability, any Binder calls leaving the
system_server must carefully be performed using FLAG_ONEWAY (or
the 'oneway' verb in AIDL) which prevents the call from blocking
indefinitely on the remote process.

In this CL, the system_server uses the new Binder.setWarnOnBlocking()
method to enable detection by default for all remote Binder
interfaces.  It can also use Binder.allowBlocking() to allow
blocking calls on certain remote interfaces that have been
determined to be safe.

This CL adds the 'oneway' verb to several interfaces and methods
where it should have been added, and marks a handful of system
ContentProviders as being safe to call into.  Also, we assume that
any services obtained from ServiceManager are part of the core
OS, and are okay to make blocking calls to.

Test: builds, boots, runs with minimal logs triggered
Bug: 32715088
Change-Id: Ide476e120cb40436a94b7faf7615c943d691f4c0
2016-11-07 17:03:37 -07:00
Joseph Pirozzo
22eedd9073 MAP MCE am: b8fc0679e8 am: b13240028b am: 5602b26f41
am: 132dab26e5

Change-Id: Icb6d7db9d0e1866b2c1847be2b1da0008bd8185d
2016-11-02 01:26:01 +00:00