Commit graph

274 commits

Author SHA1 Message Date
Steven Moreland
8ac1971678 Updating all makefiles.
Bug: 64487114
Test: none
Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Change-Id: I2fa89b6661c39859ec4fb62c4bb0a05a35e645f0
2017-08-10 22:40:04 +00:00
Myles Watson
f1a1661a80 Merge "Bluetooth: Check the number of file descriptors" am: 6b75bccdce am: b58a5a0b6a am: 7b296f0909
am: 97046dbce6

Change-Id: Idac175c0c0548cf111626c3512ac64087bc95423
2017-08-10 00:58:42 +00:00
Myles Watson
97046dbce6 Merge "Bluetooth: Check the number of file descriptors" am: 6b75bccdce am: b58a5a0b6a
am: 7b296f0909

Change-Id: I93a75f77c7b016396300eb13342979dea4751711
2017-08-10 00:49:18 +00:00
Myles Watson
b58a5a0b6a Merge "Bluetooth: Check the number of file descriptors"
am: 6b75bccdce

Change-Id: I16d0c95de17649cd5750aad13a7578c3e7c007b0
2017-08-10 00:39:52 +00:00
Treehugger Robot
6b75bccdce Merge "Bluetooth: Check the number of file descriptors" 2017-08-10 00:30:44 +00:00
Myles Watson
18be6ef787 Merge "Bluetooth: Add OWNERS file for default/" am: 7b351292fe am: 372e367651 am: 5241db9e60
am: ce1af7c70b

Change-Id: Ibf576fb9809e7e96d379f28ecaf026c1584a652b
2017-08-09 23:58:23 +00:00
Myles Watson
ce1af7c70b Merge "Bluetooth: Add OWNERS file for default/" am: 7b351292fe am: 372e367651
am: 5241db9e60

Change-Id: Ic090b70d5875cea35a463c6e66a62f715ca1f065
2017-08-09 20:45:02 +00:00
Myles Watson
372e367651 Merge "Bluetooth: Add OWNERS file for default/"
am: 7b351292fe

Change-Id: I34716c300678db8d1ae6a4d5aada936d8ce009fc
2017-08-09 20:40:34 +00:00
Steven Moreland
65de66a67e Update makefiles for vndk enabled. am: 5e59402492 am: 271d53d836
am: 148ca84740

Change-Id: I5ef3611026b9c770bf713c14b9e01899a796e61c
2017-08-09 20:36:43 +00:00
Myles Watson
7c127dc4cb Bluetooth: Add OWNERS file for default/
Test: build
Change-Id: Ib4cbd5502ac0791d4bc700f28de68d0548256de6
2017-08-09 18:34:19 +00:00
Myles Watson
ec1eda69b6 Bluetooth: Check the number of file descriptors
Opening the serial port(s) returns -1 when it fails, check
that the number of file descriptors is greater than 0 and
less than the size of the array.

Test: VtsHalBluetoothV1_0TargetTest, Bluetooth start/stop
Bug: 64420262
Change-Id: Icbffa5bd8c02030e389bac03aa5e1e78cc3c6057
2017-08-09 18:23:48 +00:00
Steven Moreland
271d53d836 Update makefiles for vndk enabled.
am: 5e59402492

Change-Id: I08414d68d5275df82336653cb91765af7235f914
2017-08-09 00:44:39 +00:00
Steven Moreland
5e59402492 Update makefiles for vndk enabled.
Test: none
Bug: 63866913
Merged-In: I29174fdadca2828455ef49f14e53bc95c5238dbb
Change-Id: I29174fdadca2828455ef49f14e53bc95c5238dbb
(cherry picked from commit c716b8c307)
2017-08-08 17:09:10 +09:00
Steven Moreland
4e06dd1aa9 Merge changes from topic 'go-away-static-hidl-java'
am: f4c58cd48c

Change-Id: I3502ad1d51868cd82bbe811bdf2b96ec45ccfbe6
2017-08-04 19:22:05 +00:00
Steven Moreland
f4c58cd48c Merge changes from topic 'go-away-static-hidl-java'
* changes:
  Update makefiles.
  Add an empty 1.1 ISap interface.
  [AWARE] Fix validity check on PMK + export PASSPHRASE lengths
2017-08-04 19:14:48 +00:00
Steven Moreland
a7a300a13b Merge "Update makefiles for vndk enabled." into oc-mr1-dev
am: d9b12c13e5

Change-Id: Id70e58e6b4d20dada4aab107b2aa98c58cf167ca
2017-08-04 01:04:40 +00:00
TreeHugger Robot
d9b12c13e5 Merge "Update makefiles for vndk enabled." into oc-mr1-dev 2017-08-04 00:52:06 +00:00
Steven Moreland
b5da32c177 Update makefiles.
Removes redundant "java-static" target.

Note, targets aren't removed here which have internal
targets that depend on them.

Bug: 36376126
Test: pass
Change-Id: I830f02e5f219d2d58721132c358d2783c3942eac
2017-08-03 15:25:21 -07:00
Tri Vo
c7d816b680 Merge changes from topic 'vts_deps' am: 7d149a564f am: 7f8774ef80 am: 3b84dc5c78
am: 84d1627979

Change-Id: I809807a17187a401c396cd73721ca9fdccc60f1c
2017-08-03 20:34:21 +00:00
Tri Vo
35c7bd2e2b VTS tests now static link to HAL def libs.
And use VtsHalTargetTestDefaults.

Bug: 64040096
Test: compiles
Merged-In: I3cfb1a64f6abcf3145337a736800b72d92a0b152
Change-Id: I3cfb1a64f6abcf3145337a736800b72d92a0b152
(cherry picked from commit 6c2bd86f70)
2017-08-03 13:28:08 -07:00
Tri Vo
7f8774ef80 Merge changes from topic 'vts_deps'
am: 7d149a564f

Change-Id: Idf236b741d7ff2cc529002218c34a3b4f0cf625c
2017-08-03 20:15:19 +00:00
Treehugger Robot
7d149a564f Merge changes from topic 'vts_deps'
* changes:
  VTS tests now static link to HAL def libs.
  Add cc_defaults VtsHalTargetTestDefaults
2017-08-03 20:06:15 +00:00
Tri Vo
6c2bd86f70 VTS tests now static link to HAL def libs.
And use VtsHalTargetTestDefaults.

Bug: 64040096
Test: compiles
Change-Id: I3cfb1a64f6abcf3145337a736800b72d92a0b152
2017-08-03 18:04:00 +00:00
Steven Moreland
c716b8c307 Update makefiles for vndk enabled.
Test: none
Bug: 63866913
Change-Id: I29174fdadca2828455ef49f14e53bc95c5238dbb
2017-08-02 18:00:14 -07:00
Steven Moreland
208a586cf8 Update HIDL makefiles.
Allow them to be static.

This is required for a couple of reasons:
- enabling HIDL passthrough in recovery
- enabling VTS tests to be static blobs

Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Merged-In: I1b2401fb273ab80819e3870aa71fe742269674ba
Change-Id: I1b2401fb273ab80819e3870aa71fe742269674ba
(cherry picked from commit 7206708528)
2017-08-02 12:52:41 -07:00
Sundong Ahn
3bee656e84 Change dependency library am: 94293086f8 am: 79e801cb18 am: aad41e85d4
am: 8ca20771e7

Change-Id: I1b2b68a760751ec6dcb05db1ee6fdead0f00db33
2017-08-02 17:23:11 +00:00
Sundong Ahn
79e801cb18 Change dependency library
am: 94293086f8

Change-Id: I3b024890195dad8fa3435a4ff493adbddb63ef20
2017-08-02 16:56:46 +00:00
Sundong Ahn
94293086f8 Change dependency library
hwbinder.jar will be used instead of framework.jar on build-time, but
on runtime framework.jar will be used.

This is to cut the circular dependency when using configstore from
Android framework.

Bug: 35771640
Test: no test.
Change-Id: I04cab676c91d2ea423f5e2c1b2b9efa15e522f37
2017-08-01 11:24:01 +09:00
Steven Moreland
07b399b6ec Merge "Update HIDL makefiles." am: 49dad304a5 am: 68a25d22e3 am: 27e608f01c
am: a1a7a39695

Change-Id: I4eb55db8907fcccdaa605b26c3bbf3549cbc3e7e
2017-07-31 19:43:30 +00:00
Steven Moreland
68a25d22e3 Merge "Update HIDL makefiles."
am: 49dad304a5

Change-Id: I29f1de44312f589ba6e1df9498809cbb31315a2b
2017-07-31 19:33:34 +00:00
Steven Moreland
7206708528 Update HIDL makefiles.
Allow them to be static.

This is required for a couple of reasons:
- enabling HIDL passthrough in recovery
- enabling VTS tests to be static blobs

Bug: 32920003
Bug: 64040096
Test: update-all-google-makefiles.sh
Change-Id: I1b2401fb273ab80819e3870aa71fe742269674ba
2017-07-26 10:14:57 -07:00
Stanley Tng
73363c1fe9 Merge "Fixed the HCI ACL Header definitions for PB and BC Flags" into oc-dev am: ad6b1eb846
am: 6138bbeafb

Change-Id: I450bfa1b5d6133e478761781ae43536fe972eae6
2017-07-22 16:00:51 +00:00
Stanley Tng
6138bbeafb Merge "Fixed the HCI ACL Header definitions for PB and BC Flags" into oc-dev
am: ad6b1eb846

Change-Id: I1636ac9ff75062d170db6032b8e657a0f5b29f54
2017-07-22 15:57:52 +00:00
Stanley Tng
5c98115486 Fixed the HCI ACL Header definitions for PB and BC Flags
The byte offsets for Packet Boundary (PB) and Broadcast (BC) flags
in the HCI ACL Header is swapped. This will fixed it so that it matches
the Bluetooth Specifications.

Bug: 63241720
Test: Run manual VTS tests for Bluetooth
Change-Id: Ifc1f4d4f054a1dab13458c563e47bfb884f39d92
(cherry picked from commit 7915b71fb9)
2017-07-22 06:35:47 -07:00
Stanley Tng
20be4fc270 Merge "Fixed the HCI ACL Header definitions for PB and BC Flags" am: adda0e8721 am: cd762d90e8 am: 81775f2adb
am: 2129c0dc19

Change-Id: If89213488f48a4ecd42aef86aa959f657f4f0f95
2017-07-20 18:33:05 +00:00
Stanley Tng
cd762d90e8 Merge "Fixed the HCI ACL Header definitions for PB and BC Flags"
am: adda0e8721

Change-Id: Ie621b523fb21a014dcbc7f5a2295778758333acc
2017-07-20 18:19:35 +00:00
Stanley Tng
7915b71fb9 Fixed the HCI ACL Header definitions for PB and BC Flags
The byte offsets for Packet Boundary (PB) and Broadcast (BC) flags
in the HCI ACL Header is swapped. This will fixed it so that it matches
the Bluetooth Specifications.

Bug: 63241720
Test: Run manual VTS tests for Bluetooth
Change-Id: Ifc1f4d4f054a1dab13458c563e47bfb884f39d92
2017-07-19 11:03:27 -07:00
Jiyong Park
cb198f7990 Build android.hardware.bluetooth* modules with BOARD_VNDK_VERSION
Add missing headers that aren't automatically included when
BOARD_VNDK_VERSION is set.

Bug: 37342627
Test: BOARD_VNDK_VERSION=current m -j <module> where <module> is
android.hardware.bluetooth-async.vendor,
android.hardware.bluetooth@1.0-impl.vendor, and
android.hardware.bluetooth-hci.vendor

Change-Id: Ifb14d254fa358fbd2b9fbeecb028d6efd18e9483
2017-07-10 13:28:55 +09:00
Myles Watson
a7dc6fb5b4 Bluetooth: Change CHECK() to LOG_ALWAYS_FATAL()
Bug: 62641184
Test: Compilation
Change-Id: I21192c7a5c15def379d040b586a66ee1534c7c15
(cherry picked from commit 3e272a7076)
2017-07-07 23:00:30 +00:00
Myles Watson
517186aec1 Merge "Bluetooth: Change CHECK() to LOG_ALWAYS_FATAL()"
am: 1a31a9e45e

Change-Id: I1fbef8d12e61c55bd5aa4b53378672aa6a5a54f7
2017-07-07 03:24:53 +00:00
Treehugger Robot
1a31a9e45e Merge "Bluetooth: Change CHECK() to LOG_ALWAYS_FATAL()" 2017-07-07 03:18:41 +00:00
Jakub Pawlowski
ef5d1b0209 Merge "Make RawAddress into a class (4/4)"
am: 1bd5a3ff87

Change-Id: I619d560145d6d4058be35de74bc4ded503da455e
2017-07-07 01:34:39 +00:00
Treehugger Robot
1bd5a3ff87 Merge "Make RawAddress into a class (4/4)" 2017-07-07 01:29:30 +00:00
Jakub Pawlowski
19f1c07b3a Make RawAddress into a class (4/4)
* Add libbluetooth-types - library containing types implementation, that
is common between stystem/bt and packages/apps/Bluetooth. It must be
included in every project using btif interface.
* Put Raw Address implementation into libbluetooth-types
* Unify all "to/from string" helper methods into ToString and FromString
* bd_addr_empty -> RawAddress::kEmpty
* bd_addr_any -> RawAddress::kAny

Also fix leaks in jni str2addr by adding ReleaseStringUTFChars

Test: types_unittest
Change-Id: I7dca82ec2293ae5338a9500dd6aa43b59d25657a
Merged-In: I7dca82ec2293ae5338a9500dd6aa43b59d25657a
2017-07-06 22:40:09 +00:00
Myles Watson
3e272a7076 Bluetooth: Change CHECK() to LOG_ALWAYS_FATAL()
Bug: 62641184
Test: Compilation
Change-Id: I21192c7a5c15def379d040b586a66ee1534c7c15
2017-07-06 18:44:22 +00:00
Peng Qi
1d3d5a96f0 BT HAL H4 write flow
If to send type and data separately for one HCI packet,
it will cause two system call context switch to kernel space,
which will introduce software overhead on data path.
Plus, if vendor does not use pure UART interface, it causes different
data behavior on BUS and may not adapt to all vendors as legacy HAL did.
Considering backward-compatibility, to use writev to send
type and data together once as legacy BT HAL did.

Bug: 63391357
Test: H4 UTTest, BT VTS test, Bluetooth on/off
Change-Id: I2d93085fe0c01b48d0e3729a3fa85b5b27335b2c
(cherry picked from commit 92afd74a15)
2017-07-06 18:40:04 +00:00
Peng Qi
2b1413fd87 BT HAL H4 write flow
am: 92afd74a15

Change-Id: Ie8231290c6aa5600c3e9c355b04fe494aa64d190
2017-07-06 16:27:51 +00:00
Peng Qi
92afd74a15 BT HAL H4 write flow
If to send type and data separately for one HCI packet,
it will cause two system call context switch to kernel space,
which will introduce software overhead on data path.
Plus, if vendor does not use pure UART interface, it causes different
data behavior on BUS and may not adapt to all vendors as legacy HAL did.
Considering backward-compatibility, to use writev to send
type and data together once as legacy BT HAL did.

Test: H4 UTTest, BT VTS test, Bluetooth on/off
Change-Id: I2d93085fe0c01b48d0e3729a3fa85b5b27335b2c
2017-06-30 12:32:11 -07:00
Bailey Forrest
92863322a5 Merge "Include missing headers" am: 1bbe51d0b5
am: 9cf1bbb045

Change-Id: I37f592401697c92115eea0ca33eea4170f549712
2017-06-17 00:22:10 +00:00
Treehugger Robot
1bbe51d0b5 Merge "Include missing headers" 2017-06-17 00:09:23 +00:00
Bailey Forrest
ba20404ca2 Include missing headers
Bug: None
Test: Build
Change-Id: Id4967af4ab48ceda10c45edcb0bc4b856b991fd6
2017-06-12 16:49:18 -07:00
Myles Watson
76f5c505bf Merge "Bluetooth: Call vendor cleanup() in Close()" into oc-dev
am: 32ee110269

Change-Id: I6e361c5cb186730ff25ff17d0418c9f01b944359
2017-06-12 22:59:29 +00:00
Myles Watson
5082bca12e Bluetooth: Call vendor cleanup() in Close()
Bug: 62453652
Test: sailfish and angler start/stop Bluetooth, pair
Change-Id: I8ba80ae1802d1f524acb1d8e26b5bb41fc1612d0
(cherry picked from commit 9eee83093f)
2017-06-09 15:39:26 -07:00
Myles Watson
b68bcfd769 Bluetooth: Call vendor cleanup() in Close() am: 9eee83093f
am: 58c51ad669

Change-Id: I33fb722609665638c866da062babaae3fcba0c6d
2017-06-09 22:21:23 +00:00
Myles Watson
9eee83093f Bluetooth: Call vendor cleanup() in Close()
Bug: 62453652
Test: sailfish and angler start/stop Bluetooth, pair
Change-Id: I8ba80ae1802d1f524acb1d8e26b5bb41fc1612d0
2017-06-08 20:35:32 +00:00
Myles Watson
0af2996160 Bluetooth: Remove scheduler-service dependency
am: 8c71c85252

Change-Id: I2c1a8cd403930270110ca5854aca8c01c9327134
2017-05-27 02:14:18 +00:00
Myles Watson
8c71c85252 Bluetooth: Remove scheduler-service dependency
Bug: 38178265
Test: Bluetooth enable/disable
      adb shell stop && adb shell VtsHalBluetoothV1_TargetTest

Change-Id: I7f892bad73f72b46b7b1720bda267fdddad21948
2017-05-26 20:34:12 +00:00
Steven Moreland
67b9ae7d9c Merge "Update makefiles." am: 9119d4ccd1 am: 242b2288d7
am: c6da54569f

Change-Id: Ib7f7a9cdb64985d545443edac5bb8e9c169fc592
2017-05-20 00:19:40 +00:00
Steven Moreland
e4d318948a Update makefiles.
Adds default configuration to all hals.

Test: pass
Merged-In: Icdf6b56df82c4b7b7de815e7febea9a07ab96856
Change-Id: Icdf6b56df82c4b7b7de815e7febea9a07ab96856
2017-05-19 15:53:53 -07:00
Steven Moreland
06c85d986a Update makefiles.
Adds default configuration to all hals.

Test: pass
Change-Id: Icdf6b56df82c4b7b7de815e7febea9a07ab96856
2017-05-18 16:14:16 -07:00
Myles Watson
6c4020d1d0 Bluetooth: Add a second thread for the scheduler
am: 33f36706d0

Change-Id: I4730416f799b0947690d4a4544be41bfed191afb
2017-05-12 18:01:57 +00:00
Myles Watson
33f36706d0 Bluetooth: Add a second thread for the scheduler
Test: service call bluetooth_manager 6 # (Stop Bluetooth)
      /data/nativetest64/VtsHalBluetoothV1_0TargetTest/\
          VtsHalBluetoothV1_0TargetTest
Bug: 38178265, 34461621
Change-Id: Ia8f6683ca47c9deac43d1047846caee5688f1eca
(cherry picked from commit 74c601361c)
2017-05-11 17:28:06 -07:00
Myles Watson
74c601361c Bluetooth: Add a second thread for the scheduler
Test: service call bluetooth_manager 6 # (Stop Bluetooth)
      /data/nativetest64/VtsHalBluetoothV1_0TargetTest/\
          VtsHalBluetoothV1_0TargetTest
Bug: 38178265, 34461621
Change-Id: Ia8f6683ca47c9deac43d1047846caee5688f1eca
2017-05-11 16:57:01 -07:00
Steven Moreland
8716f3063e Update makefiles for c++-sources and c++-headers.
Test: pass
Bug: 38174080
Merged-In: I683455736eed35e6ced24e2763c2bdb5fb6c9601
Change-Id: I683455736eed35e6ced24e2763c2bdb5fb6c9601
2017-05-09 19:58:45 -07:00
Steven Moreland
8e89a43590 Update makefiles for c++-sources and c++-headers. am: cb360c60d8 am: 4bd4e7fb3b
am: 127b116fe5

Change-Id: I3a2aa76acef0f0d1455bfad775e87e8089d357e8
2017-05-10 02:58:00 +00:00
Steven Moreland
cb360c60d8 Update makefiles for c++-sources and c++-headers.
Test: pass
Bug: 38174080
Change-Id: I683455736eed35e6ced24e2763c2bdb5fb6c9601
2017-05-09 14:34:19 -07:00
Yi Kong
c86120fbb4 Remove unused lambda captures am: 5ca756ea1f am: 68f6e99613
am: dcf35ca86e

Change-Id: I025a2f240cb6f4278bece0f1b3c91dbfcdffa0fc
2017-05-08 17:24:21 +00:00
Yi Kong
5ca756ea1f Remove unused lambda captures
Test: build
Bug: 37752547
Change-Id: I339baf849c7aef97dd319377026564dedd0cc568
2017-05-05 13:35:50 -07:00
Steven Moreland
f90189a79f Merge "Remove redundant dependencies" am: 62769b7196 am: 170e2e85a2
am: 5fba1db1d2

Change-Id: I661fff75d140b4359af055a0f08f08ef33c889c3
2017-05-01 23:37:04 +00:00
Treehugger Robot
62769b7196 Merge "Remove redundant dependencies" 2017-05-01 23:19:25 +00:00
Steven Moreland
ee1d248ae2 Remove redundant dependencies
android.hidl.base@1.0 and android.hidlmanager@1.0 are built into libhidltransport.

Test: links
Bug: 33276472
Change-Id: I424371932af129bba9d58dcf8652c64297f35f05
2017-05-01 09:47:58 -07:00
Keun Soo Yim
b6269d751a Merge "stop bluetooth service while VTS test is running" into oc-dev
am: 1f7fa63fbb

Change-Id: I61f369ab2dea028bed2fdb57a81f0279916e906d
2017-04-26 23:59:07 +00:00
Keun Soo Yim
ce89d5816f stop bluetooth service while VTS test is running
Test: run VTS HAL BT test
Bug: 37153328
Change-Id: I615d96daff496096122cd18158c205073f4623a6
(cherry picked from commit 1965f73bac)
2017-04-26 16:32:14 -07:00
TreeHugger Robot
1f7fa63fbb Merge "stop bluetooth service while VTS test is running" into oc-dev 2017-04-26 23:25:38 +00:00
Philip Cuadra
2470b1b033 Merge "Make BT HAL audio threads RT" into oc-dev
am: 240371c7b2

Change-Id: Ia0eaedaa08a6bed4ba555e18fcff3a22c5b57b63
2017-04-26 17:07:13 +00:00
Philip Cuadra
8b3f315e7a Make BT HAL audio threads RT
Bluetooth threads that are used in audio have deadline
requirements for glitchless playback.  Those threads need to be
scheduled as RT tasks to ensure that they can meet the deadline even if
there is high system load.  Use schedulerservice to request RT
scheduling.

Bug 37518404
Test:  play Bluetooth audio, check for RT with systrace
Change-Id: I043a97df3d2801922b54dcbf7c700ae11a48c217
2017-04-25 16:15:40 -07:00
Keun Soo Yim
1965f73bac stop bluetooth service while VTS test is running
Test: run VTS HAL BT test
Bug: 37153328
Change-Id: I615d96daff496096122cd18158c205073f4623a6
2017-04-25 22:02:07 +00:00
Hung-ying Tyan
b422f16e23 Remove dependency of libhardware_legacy
It is not used by bluetooth and nfc services.
Bug: 33241851
Bug: 37305530
Test: built and tested on sailfish

(cherry picked from commit 593eeb7a4b)

Change-Id: I599073296baa5eee72a1fce8caa4eb8352f66218
Merged-In: I599073296baa5eee72a1fce8caa4eb8352f66218
2017-04-19 22:45:32 +00:00
Steven Moreland
1c11c98d5e Move bluetooth test to vendor.
The test is still built in data/nativetest64, but it must be marked as
vendor since it depends on vendor modules.

Also proprietary -> vendor.

Test: build with BOARD_VNDK_VERSION := current
Test: run test on internal marlin, passes
Bug: 33241851
(cherry picked from commit 2cfae52a2e)
Merged-In: I856838fe208a4cd038ea16d47f03f6278224b2ee
Change-Id: I856838fe208a4cd038ea16d47f03f6278224b2ee
2017-04-19 22:15:07 +00:00
Hung-ying Tyan
1369daa500 Merge "Remove dependency of libhardware_legacy" into oc-dev
am: ba2420a87f

Change-Id: Ib9909a371adcc72ba13d684429c852242044737b
2017-04-17 03:10:39 +00:00
TreeHugger Robot
ba2420a87f Merge "Remove dependency of libhardware_legacy" into oc-dev 2017-04-17 03:05:10 +00:00
Hung-ying Tyan
593eeb7a4b Remove dependency of libhardware_legacy
It is not used by bluetooth and nfc services.
Bug: 33241851
Bug: 37305530
Test: built and tested on sailfish

Change-Id: I599073296baa5eee72a1fce8caa4eb8352f66218
Merged-In: I599073296baa5eee72a1fce8caa4eb8352f66218
2017-04-15 13:43:36 +08:00
Steven Moreland
0332b06972 Merge "Move bluetooth test to vendor." into oc-dev
am: 411268f5ae

Change-Id: I55ce093525f41a90ce6cfe6b24d1b8391fcaef18
2017-04-14 04:21:16 +00:00
Andreas Huber
a04af1cf05 Merge "Changed the naming scheme for Treble java libraries (both static and dynamic)" into oc-dev
am: 8afd952d48

Change-Id: If26dc4c5bb23ea23ed48d35aa8618e0b7f2825a3
2017-04-14 04:18:00 +00:00
TreeHugger Robot
411268f5ae Merge "Move bluetooth test to vendor." into oc-dev 2017-04-14 03:59:46 +00:00
Andreas Huber
6fa374ad30 Changed the naming scheme for Treble java libraries (both static and dynamic)
android.hardware.foo@1.0-java => android.hardware.foo-V1.0-java

Bug: 37207894
Test: make
Change-Id: I177f4cfd42f635aaf096107af8309d1a82ed41c0
Merged-In: I8b91881dfaf507c0d852d56ebbb53ff0987e5a34
2017-04-13 15:23:46 -07:00
Andreas Huber
6733baff6c Changed the naming scheme for Treble java libraries (both static and dynamic)
android.hardware.foo@1.0-java => android.hardware.foo-V1.0-java

Bug: 37207894
Test: make
Change-Id: I177f4cfd42f635aaf096107af8309d1a82ed41c0
Merged-In: I8b91881dfaf507c0d852d56ebbb53ff0987e5a34
2017-04-13 15:16:27 -07:00
Steven Moreland
2cfae52a2e Move bluetooth test to vendor.
The test is still built in data/nativetest64, but it must be marked as
vendor since it depends on vendor modules.

Also proprietary -> vendor.

Test: build with BOARD_VNDK_VERSION := current
Test: run test on internal marlin, passes
Bug: 33241851
Change-Id: I856838fe208a4cd038ea16d47f03f6278224b2ee
2017-04-13 14:20:18 -07:00
TreeHugger Robot
86bf840964 Merge "bluetooth: include what you use" into oc-dev 2017-04-13 03:35:45 +00:00
Treehugger Robot
2e7ce4d73f Merge "bluetooth: include what you use" 2017-04-12 19:41:26 +00:00
Steven Moreland
85d95ed55f bluetooth: include what you use
Helper libraries also now on vendor partition.

Test: links
Test: bluetooth works on internal Marlin
Bug: 33241851

(cherry picked from commit 96510c80f8)
Merged-In: Ie99faf9146ce2ce3df83a2b46acfaa36a54c16c2
Change-Id: Ie99faf9146ce2ce3df83a2b46acfaa36a54c16c2
2017-04-12 10:12:44 -07:00
Steven Moreland
96510c80f8 bluetooth: include what you use
Helper libraries also now on vendor partition.

Test: links
Test: bluetooth works on internal Marlin
Bug: 33241851

Change-Id: Ie99faf9146ce2ce3df83a2b46acfaa36a54c16c2
2017-04-12 17:12:03 +00:00
Steven Moreland
0dd5ba23fb Update makefiles.
Test: pass
Change-Id: I5cf42c8ff1e11207394e4852ba0bd03e4e3b7d2e
2017-04-11 16:41:07 -07:00
Steven Moreland
b2799c370f Update makefiles.
Test: pass
Change-Id: I5cf42c8ff1e11207394e4852ba0bd03e4e3b7d2e
2017-04-11 09:57:40 -07:00
Joel Fernandes
cb6f47d0e0 Bluetooth HAL: Add to foreground schedtune group
EAS (Energy-Aware Scheduler) tends to cluster tasks together unless
they're marked to prefer an idle CPU (prefer-idle) during placement.
This is to save energy however it increases latencies. This is
noticeable when the Binder driver demotes the RT task to CFS and when
we try to do load balance in this path, the selection path still selects
a busy CPU. Add Bluetooth HAL service to the foreground schedtune group
to fix this as its critical for tasks like bluetooth audio playback.

Test: Boot and verify bluetooth HAL is in the foreground stune group
Bug: 36867985

Change-Id: Ib3c43cca4a2049af3700978b58a05989cc20b6ac
Signed-off-by: Joel Fernandes <joelaf@google.com>
(cherry picked from commit 1b8f6f7c77)
2017-04-05 09:47:49 -07:00
Joel Fernandes
1b8f6f7c77 Bluetooth HAL: Add to foreground schedtune group
EAS (Energy-Aware Scheduler) tends to cluster tasks together unless
they're marked to prefer an idle CPU (prefer-idle) during placement.
This is to save energy however it increases latencies. This is
noticeable when the Binder driver demotes the RT task to CFS and when
we try to do load balance in this path, the selection path still selects
a busy CPU. Add Bluetooth HAL service to the foreground schedtune group
to fix this as its critical for tasks like bluetooth audio playback.

Test: Boot and verify bluetooth HAL is in the foreground stune group
Bug: 36867985

Change-Id: Ib3c43cca4a2049af3700978b58a05989cc20b6ac
Signed-off-by: Joel Fernandes <joelaf@google.com>
2017-04-04 17:37:43 -07:00
Yuexi Ma
9f7cd8e078 Updates bluetooth hal test to use VtsHalHidlTargetTestBase v3
Test: pass
Change-Id: Ia5237a27800010174f2b23a3a4b1157f1c48781f
(cherry picked from commit b8012eb907)
2017-04-02 16:53:43 -07:00
Yuexi Ma
b8810a9e5d Bluetooth VTS test use VtsHalHidlCallbackBase for callback wait and notify
VtsHalBluetoothV1_0TargetTest uses VtsHalHidlCallbackBase.
Callback class extends VtsHalHidlCallbackBase and use waitForCallback, notifyFromCallback, and setWaitTimeout

The original Bluetooth test contains the following use cases:
  * Wait for specific callback
  * Set timeout for specific callback waiting
The modified version supports the above use cases.

Bug: 36036059
Test: Test pass locally
Change-Id: I961baaf7f1b09fa9c134629cc7280565a2664ed5
(cherry picked from commit 51d023c48e)
2017-04-02 06:22:45 +00:00
Yuexi Ma
b8012eb907 Updates bluetooth hal test to use VtsHalHidlTargetTestBase v3
Test: pass
Change-Id: Ia5237a27800010174f2b23a3a4b1157f1c48781f
2017-03-31 23:27:59 +00:00
Myles Watson
3561717e09 Bluetooth: Replace assert() with CHECK()
Test: Bluetooth starts/stops, VtsHalBluetoothV1_0TargetTest passes
Change-Id: I1ecdf4ed7507fc8e2f00c35f136cb13e145713e5
2017-03-30 16:25:51 +00:00
Yuexi Ma
51d023c48e Bluetooth VTS test use VtsHalHidlCallbackBase for callback wait and notify
VtsHalBluetoothV1_0TargetTest uses VtsHalHidlCallbackBase.
Callback class extends VtsHalHidlCallbackBase and use waitForCallback, notifyFromCallback, and setWaitTimeout

The original Bluetooth test contains the following use cases:
  * Wait for specific callback
  * Set timeout for specific callback waiting
The modified version supports the above use cases.

Bug: 36036059
Test: Test pass locally
Change-Id: I961baaf7f1b09fa9c134629cc7280565a2664ed5
2017-03-30 02:36:06 +00:00
Andreas Huber
675ae49ab1 Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: make
Change-Id: Ic77394d4d2e1ccedba3a28230d870c5d6108bd40
2017-03-28 16:14:43 -07:00
Andreas Huber
3e4acb8b3a Convert all comments into "doxygen-ready" comments.
Bug: 36453077
Test: make
Change-Id: Ic77394d4d2e1ccedba3a28230d870c5d6108bd40
2017-03-28 16:10:42 -07:00
Steven Moreland
e90c31f125 Update makefiles.
Test: pass
Change-Id: I925baccbe51a32b7b7f3f66cf2918d017ee6b039
2017-03-24 21:50:45 -07:00
Myles Watson
9cec0e331a Bluetooth: Protect pointers and callbacks
Test: kill com.android.bluetooth
Bug: 36150800
Change-Id: I9533731c9ce3776c84e6c1d3fdf3e266b328a084
2017-03-22 21:30:40 +00:00
Treehugger Robot
e5796ef7a6 Merge "Bluetooth: Do not die quietly on binder death" 2017-03-19 23:45:58 +00:00
Andre Eisenbach
8a9efb6e35 Revert "Bluetooth: Don't disable LPM at power off"
Causes power regression on Angler.

This reverts commit 3b2a29676b.

Bug: 36358814
Bug: 36026072
Change-Id: I9bbe218a87c7d092851c400739bc5740bcf13336
2017-03-17 20:32:58 +00:00
Andre Eisenbach
9f8931cf47 Bluetooth: Do not die quietly on binder death
Log if the Bluetooth service has died.
Also check the return status for Bluetooth service binder callbacks to
avoid DEAD_OBJECT exception when com.android.bluetooth crashes.

Bug: 36026072
Test: unit tests; Bluetooth off/on/off; kill -6 com.android.bluetooth
Change-Id: Ia28e6777ee7b78f06db8d5214324e696441d00f7
2017-03-17 10:50:35 -07:00
Zach Johnson
fed25ad256 Fix MCT data transport for the BT HAL
The vendor open interface command returns the total number
of FDs opened. (2 or 4 if the interface is MCT)

However, the list of FDs is always 4 in either case. If the
open command returns 2, the FDs are shared cmd/event and
data in/out.

2 FDs example
[41, 41, 42, 42]

4 FDs example
[41, 42, 43, 44]

If we condition the registration of ACL_IN on the total
number of FDs, then 2 FD MCT interfaces will not get data.

Fixes: 36067612, 36035039, 36188793
Test: manual, pairing is quick and data does transfer
Change-Id: Icc8728239ba81426d5fc0e678c5c5480fd9b5081
2017-03-15 13:50:36 -07:00
Myles Watson
3b2a29676b Bluetooth: Don't disable LPM at power off
The power mode should be unimportant if power off succeeds.

Test: Switch users (Toggles Bluetooth under CPU load)
Bug: 36026072
Change-Id: I09fafe4d4f9a466a7e12e617925f98ef3805c738
2017-03-15 16:01:46 +00:00
Myles Watson
c0aee0ce87 Bluetooth: No power off before power on
Test: Switch users (toggles Bluetooth under load)
Bug: 36026072
Change-Id: I7eef35e19fbb4cf825c2583ec0af573733b24f9d
2017-03-13 20:29:07 +00:00
Yuexi Ma
4f4fdaf664 Merge "Change vts target base test class name" 2017-03-10 20:58:04 +00:00
Myles Watson
66a4ca3c92 Bluetooth: Power off after closing the UART
Bug: 36084266
Test: angler & marlin switch users (Toggle Bluetooth under load)
Change-Id: I1e0c34e334d11b9dcf9df62cbde3d5556c537bd7
2017-03-10 09:27:23 -08:00
Yuexi Ma
6b8720110b Change vts target base test class name
Test: make vts succeed, vts kernel tests and nfc hal tests passed
Change-Id: I38ae6cc940d0f17bb3352f360efdf9c70697c76b
2017-03-10 00:42:13 -08:00
Myles Watson
9ef1f71982 Bluetooth: Protect callbacks during shutdown
- Hold the mutex during callbacks
- Disable power mode before deleting hci_

Bug: 36084266
Test: Switch users repeatedly (toggles Bluetooth)
Change-Id: I7e4d405e9028c3363c112a8b09c03b8aea652b7a
2017-03-09 12:12:45 -08:00
Steven Moreland
691a455b9f Add hidl_default and make modules use hidl_default.
find hardware/interfaces -type f -not -path "*/.git/*" \
-exec sed -i -e '/cc_[A-Za-z_]\+/ { N; s/$/\n    defaults:
\["hidl_defaults"\],/ }' {} \;
./hardware/interfaces/update-makefiles.sh

Test: no warnings
Bug: 35840847
Change-Id: I468b76893bf3f4b62ad610d1d9603bcb8797a702
2017-03-08 16:22:00 -08:00
Steven Moreland
90fc274838 bluetooth: remove warnings
Remove unused variables and commented out some unused APIs.

Test: pass
Change-Id: Ic191997d7db25277776417fd0069241ee01529e0
2017-03-08 16:21:35 -08:00
Zach Johnson
917efb1c0e Bring multi-channel transport into the glorious new age
Some devices still use MCT as their UART protocol, so
we need to bring it forward to the fresh new HAL.

Also, adding tests for H4 while I'm here.

Test: new unit tests pass and a device using MCT now
boots BT again \o/
Fixes: 34992730
Change-Id: Idb8e536a2779929ad8a0d4bac492c3011995cd79
2017-03-07 22:16:24 +00:00
Myles Watson
f3a3cb7a60 Bluetooth: Watch multiple FDs with AsyncFdWatcher
Test: AsyncFdWatcherSocketTest.WatchTwoFileDescriptors
Change-Id: I2444515541e9be01720341c693012a580b3cb04f
2017-03-04 00:40:14 +00:00
Yuexi Ma
93d2541aae Add columns to namespace for vts target base test invocation
Test: make vts
Change-Id: Ia0284fbc11eadef572dd510bb5847160852bd517
2017-02-28 20:49:00 +00:00
Yuexi Ma
178dfd5e29 change all vts hidl tests to use VtsHalHidlTargetBaseTest
Bug: 33385836
Test: mma
Change-Id: I660d6e0fce6422d87d4b227273a77c95d20ed3f2
2017-02-28 07:59:59 +00:00
Steven Moreland
6ca34f1bf5 Bluetooth: move to vendor partition.
Bug: 35328775
Test: works in both binderized and passthrough modes
Merged-In: I18f21b53c2282e27342a58716475ae213a2837d4
Change-Id: I18f21b53c2282e27342a58716475ae213a2837d4
2017-02-28 01:34:46 +00:00
Steven Moreland
d28a3dce40 Remove viral dependency on libhwbinder.
find hardware/interfaces -name Android.mk -exec sed -i -e '/libhwbinder
\\/d' {} \;
find hardware/interfaces -name Android.bp -exec sed -i -e
'/"libhwbinder"/d' {} \;
./hardware/interfaces/update-makefiles.sh

Test: everything links
Test: (sanity) booted marlin on internal master with these changes
Bug: 35710429
Change-Id: I6b0b5ae318422b7a9be17a19a79e039ffc0f9272
2017-02-24 12:01:06 -08:00
Treehugger Robot
c4c2793b01 Merge "Bluetooth: Make HciPacketizer reusable" 2017-02-24 01:44:16 +00:00
Myles Watson
274a381d76 Bluetooth: Make HciPacketizer reusable
Test: VtsHalBluetoothV1_0TargetTest passes
Change-Id: I480d156225af2a5dd879f47a897af0b01dab5663
2017-02-23 15:54:21 -08:00
Martijn Coenen
09e49b0871 Merge "Bluetooth: deal with framework going away." 2017-02-23 19:35:30 +00:00
Martijn Coenen
678af7f5f8 Bluetooth: deal with framework going away.
Bug: 35624326
Test: Bluetooth HAL stays alive and works after com.android.bluetooth
is killed.

Change-Id: Id5b5a5b88cd35202e5737a0c99d28db9bebb4250
2017-02-23 18:49:39 +01:00
Myles Watson
5ea487bdce Bluetooth: Simplify started check
Test: Bluetooth starts/stops
Change-Id: Ib1777ac31d4a13d4221045fa3fa7d817a795f6f9
2017-02-22 14:46:14 +00:00
Treehugger Robot
4b9692ae04 Merge "Bluetooth: Export AsyncFdWatcher for reuse" 2017-02-22 04:06:51 +00:00
Treehugger Robot
f570fedcd4 Merge "Bluetooth: Check the return value of initialize()" 2017-02-22 03:36:46 +00:00
Myles Watson
be6176dded Bluetooth: Export AsyncFdWatcher for reuse
Test: Bluetooth starts/stops
Change-Id: I1dcd8684fd150b5eb27c75e5d7803070009e0bf5
2017-02-22 00:23:09 +00:00
Tri Vo
81f9968c71 Remove .vts spec files.
Test: mmma hardware/interfaces
Change-Id: Iabbcd336d37ceb58ea4cc649ee5c104424494513
2017-02-21 15:55:00 -08:00
Myles Watson
bc7e5876ad Bluetooth: Check the return value of initialize()
Test: Test fails gracefully when initialize() fails
Change-Id: Iff7737ba911635e9974612d8d192b783cf3e213d
2017-02-21 17:07:41 +00:00
Zhuoyao Zhang
f7693eed97 Update the test binary and source file name.
* To confirm with Vts naming convention.

Bug: 35273456
Test: mma
Change-Id: Ide6d9d15618e65d8cb74363f3a8acd52609cd0dd
2017-02-17 10:34:33 -08:00
Treehugger Robot
8cd0125d2e Merge "Remove --coverage in Android.bp" 2017-02-15 05:08:19 +00:00
Myles Watson
dbbdf3e5bc Bluetooth: Add CHECK and move ASSERT
Test: bluetooth_hidl_hal_test passes
Change-Id: Ib857265204d39ffb54afc6f589fdc1b852362a97
2017-02-13 19:54:54 +00:00
Zhuoyao Zhang
65c99d7f08 Update vts files on aosp.
* Based on the latest hidl-gen and .hal files.

Test: mma
      make vts.

Change-Id: I4765450d985afd552fe720d91b9ab3422f5b7a47
2017-02-12 13:51:06 -08:00
Dan Willemsen
84107a0630 Remove --coverage in Android.bp
It's no longer allowed now that Soong supports code coverage.

Bug: 32749731
Test: None
Change-Id: I09ef27983e0744543c3a6e1c0c73d69217dd582c
2017-02-10 09:29:36 -08:00
Tri Vo
06da29ffae Use filegroup as genrule srcs.
Test: mmma hardware/interfaces -j64
Change-Id: If282ed5f4a87045d169fcea7ad648b046a5f1cfb
2017-02-10 02:18:07 +00:00
Andreas Huber
0574bacb2a Updated makefiles
Java intermediates are now created in the common rather than the device-
specific generated sources subdirectory.

Bug: 33842609
Test: make
Change-Id: I16af4cd19bf0b24baa0ad9ebfdb86b4d959c8672
2017-02-09 16:56:56 -08:00
Andre Eisenbach
f60aeb4462 Bluetooth: Disable low power managerment on Hal->close()
This ensures the vendor library can release any wakelocks held and
perform any additional cleanup steps as necessary.

Change-Id: Ibfeac161109162ac375eef9c20f147f0506de602
Fixes: 35097918
Test: manual; disable Bluetooth, monitor wakelocks
2017-02-07 20:48:21 -08:00
Tri Vo
ac9f1c02f3 Remove vts driver/profiler build rules.
Generate filegroups for .hal files so that driver/profiler build rules
can migrate to another project.

Bug: 34893894
Test: mmma hardware/interfaces -j32
Change-Id: Iefc98a6df16706fbb798bc32405fe8ff0c3de450
2017-02-06 13:54:41 -08:00
Treehugger Robot
812f8ad3ab Merge "Bluetooth: Generate a random address" 2017-02-06 18:07:13 +00:00
Myles Watson
11f10baefe Bluetooth: Generate a random address
If a device does not have a factory address set, generate one.

Since this is a bug, add a warning.

Bug: 34952761
Test: Pixel C Bluetooth turns on and off
Change-Id: Icd2ef5c40f0ef6ad93effd9dd662b4b79d3eb0f6
2017-02-06 14:37:51 +00:00
Keun Soo Yim
5d6712c7e1 move VTS stub files and non-functional tests (aosp)
Test: mma
Bug: 34976004
Merged-In: Id9c88a9778fba49f0841a474aa067d271f14e207
Change-Id: Id9c88a9778fba49f0841a474aa067d271f14e207
2017-02-04 02:52:31 +00:00
Treehugger Robot
b19f11d09d Merge changes Ic4fcbb22,I1be8a18d
* changes:
  Bluetooth: Use AsyncFdWatcher for power management
  Bluetooth: AsyncFdWatcher: Refactor timeout lock
2017-02-03 18:24:23 +00:00
Treehugger Robot
559ae1585b Merge "Bluetooth: Free memory from transmit_cb commands" 2017-02-03 18:24:09 +00:00
Myles Watson
beb13b45c0 Bluetooth: Use AsyncFdWatcher for power management
Implement low power mode using timeouts from the interface.

Test: Boots, Bluetooth turns on/off,
      Instrumented bt_vendor library shows power management
      calls.
Change-Id: Ic4fcbb222f24b66c13f3797b14475d278c49fbc6
2017-02-02 22:15:56 +00:00
Myles Watson
eba1312c86 Bluetooth: AsyncFdWatcher: Refactor timeout lock
Allow timeouts to change the timeout.
Add a unit test for this.

Test: Unit tests pass, Bluetooth starts and stops.
Change-Id: I1be8a18dd74a312175ec9c27de37213272650e8e
2017-02-02 22:15:49 +00:00
Myles Watson
4e2e8ec4e0 Bluetooth: Free memory from transmit_cb commands
Test: Bluetooth starts and stops
Change-Id: I540fcc77f9bae0178db325b7014f2b839d4ad77d
2017-02-02 22:15:33 +00:00