Commit Graph

793 Commits

Author SHA1 Message Date
Joseph Pirozzo
22eedd9073 MAP MCE am: b8fc0679e8 am: b13240028b am: 5602b26f41
am: 132dab26e5

Change-Id: Icb6d7db9d0e1866b2c1847be2b1da0008bd8185d
2016-11-02 01:26:01 +00:00
Joseph Pirozzo
fe9368afe8 MAP MCE am: 631768d814 am: d94c280a7f am: c412914520
am: fb70d77f64

Change-Id: Ia56f6ca01a4d92b24f192102917950a10b6cb05d
2016-11-02 01:24:14 +00:00
Joseph Pirozzo
5602b26f41 MAP MCE am: b8fc0679e8
am: b13240028b

Change-Id: I62a9a758bc46fbb1174fbce4d50f488932d65113
2016-11-02 01:11:04 +00:00
Joseph Pirozzo
c412914520 MAP MCE am: 631768d814
am: d94c280a7f

Change-Id: I6a765b9a07204afca2763fb98fdb2e92e08292e5
2016-11-02 01:09:14 +00:00
Joseph Pirozzo
b13240028b MAP MCE
am: b8fc0679e8

Change-Id: Id82f047bc2d0eb7e4f04c14cfc216854e066156f
2016-11-02 01:05:14 +00:00
Joseph Pirozzo
d94c280a7f MAP MCE
am: 631768d814

Change-Id: I155fd0e8b44539bf79cec2c6ddb2a4d71b0c23d9
2016-11-02 01:03:51 +00:00
Joseph Pirozzo
b8fc0679e8 MAP MCE
Fix @LINK to @link in javadoc.

Bug: 30467210
Change-Id: Icac176947bee971c3f5d11fd4166cf8ceb0a437e
(cherry picked from commit f5fba751d360bbe8294c4640f5ad12a990f13122)
2016-11-01 17:39:16 -07:00
Joseph Pirozzo
631768d814 MAP MCE
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 433b3054847951e8e7b3864d11990604a66b8651)
2016-11-01 17:39:16 -07:00
Bryce Lee
6f84631d8d Merge "Add a way to query for supported Bluetooth profiles."
am: 0a86c936a6

Change-Id: Id10ad10a5dbcab92e390a7a245772d2b551ad30c
2016-11-01 23:20:16 +00:00
Bryce Lee
f6b74dea04 Add a way to query for supported Bluetooth profiles.
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 b1301fa284)
2016-11-01 15:13:04 -07:00
Marie Janssen
635d528877 resolve merge conflicts of 6a31a5c to stage-aosp-master
am: 879a5169ec

Change-Id: Ib6321dee7357920c73b135fbe465998dc4469e66
2016-10-31 18:47:52 +00:00
Marie Janssen
879a5169ec resolve merge conflicts of 6a31a5c to stage-aosp-master
Change-Id: I29f2085f4656b0b57896ef505ef6a50cdbd1b194
2016-10-31 11:00:06 -07:00
Marie Janssen
6a383a7d32 Bluetooth: prevent enabling BLE in airplane mode
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
2016-10-31 09:06:36 -07:00
Sanket Agarwal
9527a19cbc Merge "Use UUIDs for call management in Headset Client (HF)" am: 678ba24533
am: 958dab93cd

Change-Id: Ie21c9be4b7177179ea4588d2832d0bbf72e7a3c1
2016-10-28 20:19:14 +00:00
Sanket Agarwal
958dab93cd Merge "Use UUIDs for call management in Headset Client (HF)"
am: 678ba24533

Change-Id: I77553f45f3d5de04e9b443e425f15afb8946e237
2016-10-28 20:13:57 +00:00
Sanket Agarwal
52a04e4467 Use UUIDs for call management in Headset Client (HF)
Using UUIDs that are managed by the service gives more control and error
handling in the service since it has control over assigning them.

Bug: b/29788044
Change-Id: I8483f8e61a33302ba95d544828947d7fb4a21be9
(cherry picked from commit dbeab2c6e12693fe9b06b6a680677da5325c9230)
(cherry picked from commit 40bb6f3f8f)
2016-10-28 18:16:53 +00:00
Jakub Pawlowski
d649849928 Merge "Separate LE scanner from GATT client (1/4)" am: 87c997ca21 am: 81d5ecb7a6 am: 61d0088923
am: e582ab854d

Change-Id: Ibbf57cfccad50ae5d7dd9f80a13f08c5cfd1623e
2016-10-28 03:24:38 +00:00
Jakub Pawlowski
e582ab854d Merge "Separate LE scanner from GATT client (1/4)" am: 87c997ca21 am: 81d5ecb7a6
am: 61d0088923

Change-Id: I83c82b17064ee958fff6a98d90a0b351205ccf54
2016-10-28 03:01:56 +00:00
Jakub Pawlowski
61d0088923 Merge "Separate LE scanner from GATT client (1/4)" am: 87c997ca21
am: 81d5ecb7a6

Change-Id: If7688706be45e72e3ab98a35d3712ddae9d508a6
2016-10-28 02:56:54 +00:00
Jakub Pawlowski
81d5ecb7a6 Merge "Separate LE scanner from GATT client (1/4)"
am: 87c997ca21

Change-Id: I8fdf97a457d7566b4e0048624d47a6cfea693f13
2016-10-28 02:50:54 +00:00
Jakub Pawlowski
1b49e6eb04 Separate LE scanner from GATT client (1/4)
Right now, LE scanning functionality is combined with the GATT client.
This is the source of various bugs, like scans suddenly stoppinging when
a GATT client is killed. It also increases memory consumption, because
we associate many structures with a GATT client, which are not necessary
when just scanning.

Test: sl4a BleScanApiTest ConcurrentBleScanTest
Change-Id: I0c25bd4a58bb430eb0ee4100d5f2bbab194f9621
2016-10-27 23:09:35 +00:00
Svetoslav Ganov
f9e2ad0b3c 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
(cherry picked from commit ac69be543f)
2016-10-27 22:49:11 +00:00
Marie Janssen
1e012d93c7 resolve merge conflicts of 1238daf to master
Change-Id: Icc70d291379d4f4816881e46704197513e6d548e
2016-10-26 17:57:22 -07:00
Marie Janssen
1238daf20d Bluetooth: prevent enabling BLE in airplane mode am: a80d745c65 am: 6affbde556
am: 73bfd25356

Change-Id: Ieb424a2d68058d4171e6c9bd04f8a42cc1f3d7e9
2016-10-27 00:29:51 +00:00
Marie Janssen
6affbde556 Bluetooth: prevent enabling BLE in airplane mode
am: a80d745c65

Change-Id: I05a57fa747abedab24e0509c1fb7ab8737b2256a
2016-10-27 00:20:17 +00:00
Marie Janssen
a80d745c65 Bluetooth: prevent enabling BLE in airplane mode
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)
2016-10-26 14:55:47 -07:00
Jakub Pawlowski
bd7c33967c Merge "Add helper method to convert Bluetooth UUID to bytes" am: 8a0a58b218 am: f169ecb76f am: f68a0c6dec
am: 94aaa0a705

Change-Id: I6cbff5dba97d53763861b60c015cf6ff349eaa23
2016-10-25 22:02:54 +00:00
Jakub Pawlowski
f68a0c6dec Merge "Add helper method to convert Bluetooth UUID to bytes" am: 8a0a58b218
am: f169ecb76f

Change-Id: I035eb25c9a320b1760221bc5928919a148801488
2016-10-25 21:54:44 +00:00
Jakub Pawlowski
f169ecb76f Merge "Add helper method to convert Bluetooth UUID to bytes"
am: 8a0a58b218

Change-Id: I829135e559a9c3cf3c942258a16acee62c37c3ac
2016-10-25 21:47:35 +00:00
Jakub Pawlowski
f67ee83a22 Add helper method to convert Bluetooth UUID to bytes
Bug: 30622771
Test: sl4a ConcurrentBleAdvertisingTest
Change-Id: I7f646d1d357c51b82efc504a0e65d868ad363ddb
2016-10-25 12:30:24 -07:00
Jacky Cheung
c74c449bc9 Merge "Gradually increase the level of authentication on failed GATT operations." am: 6071abdb92 am: 046a5c3a00
am: bd12e5c9db

Change-Id: Ic38340c15d1f2723c31d84acff12739acf8da3ff
2016-10-20 23:20:57 +00:00
Jacky Cheung
bd12e5c9db Merge "Gradually increase the level of authentication on failed GATT operations." am: 6071abdb92
am: 046a5c3a00

Change-Id: I749b2e4d4a13f099cfdc164f7fec8556d09f8433
2016-10-20 23:11:51 +00:00
Jacky Cheung
046a5c3a00 Merge "Gradually increase the level of authentication on failed GATT operations."
am: 6071abdb92

Change-Id: If06babf4a23879acdfc358838cdc094d753c362b
2016-10-20 23:03:57 +00:00
Jacky Cheung
3854e22674 Gradually increase the level of authentication on failed GATT operations.
When lower layer returns insufficient authentication or insufficient
encryption on various GATT operations, gradually retry with increased
authentication level first to AUTHENTICATION_NO_MITM, then
AUTHENTICATION_MITM.

Test: ported from internal branch.

Change-Id: I6bcc4198ca493b7900ddd166a81d30cde896fa86
2016-10-20 13:59:04 -07:00
Jacky Cheung
84c6d339ee Gradually increase the level of authentication on failed GATT operations.
When lower layer returns insufficient authentication or insufficient
encryption on various GATT operations, gradually retry with increased
authentication level first to AUTHENTICATION_NO_MITM, then
AUTHENTICATION_MITM.

Change-Id: I68335cf7451aeaf49c227d604f69cb329d117d08
2016-10-20 18:17:12 +00:00
Marie Janssen
733f0bc08e Bluetooth: More logging of bluetooth service state am: 9fa2491850 am: d8e027b5a4
am: 849174f228

Change-Id: I3049a597bf3182b68167973ab897749833a0dc9d
2016-10-19 16:56:49 +00:00
Marie Janssen
849174f228 Bluetooth: More logging of bluetooth service state am: 9fa2491850
am: d8e027b5a4

Change-Id: Ifaa9bad48234a6035b49a6a05484d91df31c5727
2016-10-19 16:49:23 +00:00
Marie Janssen
d8e027b5a4 Bluetooth: More logging of bluetooth service state
am: 9fa2491850

Change-Id: Idd26922caf3c1a0fb77d2091ac86bfe3a1d1c62a
2016-10-19 16:43:09 +00:00
Marie Janssen
9fa2491850 Bluetooth: More logging of bluetooth service state
Bug: 32140251
Bug: 32140271
Bug: 32060415

Change-Id: I50faa184551748023ea5a573646a75293f553d16
2016-10-19 16:28:31 +00:00
Bryce Lee
5a5626acd7 resolve merge conflicts of b1301fa to nyc-mr1-dev-plus-aosp
am: ccd3468567

Change-Id: I5dac528db07b40bb9e59a090bd7e0016ca6e996a
2016-10-18 17:41:52 +00:00
Bryce Lee
ccd3468567 resolve merge conflicts of b1301fa to nyc-mr1-dev-plus-aosp
Change-Id: Idb97adf36d981a340cdb5d24d4c3c3858d23e2fe
2016-10-18 10:07:00 -07:00
Sanket Agarwal
086be31642 Merge "Remove APIs that are not directly usable."
am: 9cff57312d

Change-Id: I1234db97ed82017ed3bca02e10818a53fdc33d3d
2016-10-17 21:28:05 +00:00
Sanket Agarwal
fb6322425a Remove APIs that are not directly usable.
The right way to expose this API is done via MediaBrowser.

Bug: b/28791287
Change-Id: I0a8a185934fd7aaa9f2b5eac7398955fa380060f
(cherry picked from commit b5fbb75aa2)
2016-10-17 12:47:10 -07:00
Bryce Lee
b1301fa284 Add a way to query for supported Bluetooth profiles.
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
2016-10-09 12:54:42 -07:00
Jakub Pawlowski
00be0387cc Merge "Fix connecting to profiles when bonding from local device (1/3)" am: 44c013d739 am: 6fe3900791 am: 56757a44a6
am: 4984d66b6a

Change-Id: I4b78ff54941ada956d4330a6192d0f1c279d953c
2016-10-07 15:11:55 +00:00
Jakub Pawlowski
4984d66b6a Merge "Fix connecting to profiles when bonding from local device (1/3)" am: 44c013d739 am: 6fe3900791
am: 56757a44a6

Change-Id: I3bdacc816923d012f061e5310d5e076fcaf9d387
2016-10-06 21:12:06 +00:00
Jakub Pawlowski
56757a44a6 Merge "Fix connecting to profiles when bonding from local device (1/3)" am: 44c013d739
am: 6fe3900791

Change-Id: I8e04aa89379c4a50031fade065c288fd1cc30668
2016-10-06 21:07:44 +00:00
Jakub Pawlowski
0278ab957a Fix connecting to profiles when bonding from local device (1/3)
When bond is created from Bluetooth Settings, profiles gets properly
auto connected when services are discovered. If pairing is done from any
other app, i.e. NFC app, the bond is not being recognized as initiated
from local device, and profiles are not connected.

This patch makes sure that if bonding is initiated, no matter from which
app, it will cause proper profiles to connect.

Bug: 30211618
Change-Id: I71131f33eb5b9db2f5b4a8737b191d541bf1fd3d
2016-10-04 17:29:37 +00:00
Jeremy Klein
70a220be4f Remove unused mContext from BluetoothGatt[Server]. am: adc26ec1b4 am: 140e5cce70
am: 8002b27512

Change-Id: If05a528312cf0a5499c6ed122961124dc0d8e917
2016-09-28 15:50:05 +00:00
Jeremy Klein
8002b27512 Remove unused mContext from BluetoothGatt[Server]. am: adc26ec1b4
am: 140e5cce70

Change-Id: I11c459514e54bb486f3a90a1b0390453fc48b857
2016-09-28 15:44:23 +00:00