Commit Graph

757 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
8002b27512 Remove unused mContext from BluetoothGatt[Server]. am: adc26ec1b4
am: 140e5cce70

Change-Id: I11c459514e54bb486f3a90a1b0390453fc48b857
2016-09-28 15:44:23 +00:00
Jeremy Klein
adc26ec1b4 Remove unused mContext from BluetoothGatt[Server].
All that this member variable is doing right now is leaking a
reference to a context without any benefit.

Bug: 31752040
Bug: 31710795
Change-Id: If2241422533318b866340e8dcc9f5fbd9518349c
2016-09-28 07:09:38 +00:00
Ajay Panicker
e6558c2a54 Prevent NPE if someone creates a bad BluetoothHealthAppConfig object am: 74fa2d6846
am: 26803036be

Change-Id: I4aa3f463b688f941817e6df4a16ff1036d7be8c5
2016-09-26 18:37:58 +00:00
Ajay Panicker
74fa2d6846 Prevent NPE if someone creates a bad BluetoothHealthAppConfig object
Bug: 28271086
Change-Id: Ic8ebe3152e2b06c070316acc7e6a1f89763cd2a3
2016-09-23 22:08:26 +00:00
Marie Janssen
21688f8e34 Fix setPairingConfirmation permissions issue (2/2) am: 93326cfd9f am: 3106e3ae27 am: e3812fc048 am: 532d2b11a3 am: 6f514cc82b
am: dbb8ffc47d

Change-Id: I695df247f11b6bce15d3f771e4cc2edfd7c86f10
2016-09-21 02:20:22 +00:00
Marie Janssen
dbb8ffc47d Fix setPairingConfirmation permissions issue (2/2) am: 93326cfd9f am: 3106e3ae27 am: e3812fc048 am: 532d2b11a3
am: 6f514cc82b

Change-Id: I88928de86c08a148b3124c616b309862da1a1c24
2016-09-21 01:59:29 +00:00
Marie Janssen
5742a055e2 Fix setPairingConfirmation permissions issue (2/2) am: 93326cfd9f am: 3106e3ae27 am: e3812fc048 am: 532d2b11a3
am: 6f514cc82b

Change-Id: Idc9352afe667bb8be4846dc53036e95af2b248ce
2016-09-21 01:32:37 +00:00
Marie Janssen
6f514cc82b Fix setPairingConfirmation permissions issue (2/2) am: 93326cfd9f am: 3106e3ae27 am: e3812fc048
am: 532d2b11a3

Change-Id: Iee468d3bcfd72b33475e9bf1d51865f3c5e8a4a2
2016-09-21 01:02:29 +00:00
Marie Janssen
532d2b11a3 Fix setPairingConfirmation permissions issue (2/2) am: 93326cfd9f am: 3106e3ae27
am: e3812fc048

Change-Id: I6119aa9db2792a149202c16d63de205ba32423e8
2016-09-21 00:46:01 +00:00
Marie Janssen
e3812fc048 Fix setPairingConfirmation permissions issue (2/2) am: 93326cfd9f
am: 3106e3ae27

Change-Id: I0748eed7b884294d993b4538e4e65397b6f0dbb2
2016-09-21 00:37:07 +00:00
Marie Janssen
93326cfd9f Fix setPairingConfirmation permissions issue (2/2)
setPairingConfirmation was set to only require BLUETOOTH_ADMIN
permission which shouldn't be able to set the confirmation itself.

This is restricted to BLUETOOTH_PRIVILEGED permission.

Bug: 29043989
Change-Id: I887de32d156e672ec44aa0b286cd7ea7f9f8ad55
2016-09-08 18:15:26 +00:00
Jakub Pawlowski
8348bd2317 Merge "Separate advertiser from GATT client (1/4)" am: 5f87c4539a am: 40a16ea242
am: 9f341e4e49

Change-Id: Ic3461b98449636cfc125890f255b1332d0ef5132
2016-08-31 18:28:45 +00:00
Jakub Pawlowski
9f341e4e49 Merge "Separate advertiser from GATT client (1/4)" am: 5f87c4539a
am: 40a16ea242

Change-Id: I0d08f623e78fdd779b39083d0da3a45aee72ff3c
2016-08-31 18:21:00 +00:00
Jakub Pawlowski
a480f7fe28 Separate advertiser from GATT client (1/4)
Bug: 30622771
Change-Id: I08c0498f8a1ea04423d3e864e9a60c7c78f1dbad
2016-08-31 03:36:53 -07:00
Hemal Patel
ac0b242755 resolve merge conflicts of a544221 to nyc-dev-plus-aosp
am: 309813c8af

Change-Id: Ia316e53bf0fd163da67676acfd52d3e31d9e2149
2016-08-26 00:42:38 +00:00
Hemal Patel
309813c8af resolve merge conflicts of a544221 to nyc-dev-plus-aosp
Change-Id: Ie7a3a85fdd2e59eea4f74760010190ce9f5f9b02
2016-08-25 17:30:34 -07:00