Commit graph

95 commits

Author SHA1 Message Date
Dan Willemsen
6737d81d15 Fix problem found with host bionic fortify checks
am: dc1921810e

Change-Id: Id82671e9f0b4debc28b516a0b3f10104fc54e198
2017-12-01 04:29:29 +00:00
Dan Willemsen
dc1921810e Fix problem found with host bionic fortify checks
hardware/interfaces/bluetooth/1.0/default/test/bluetooth_address_test.cc:59:39:
error: 'open' called with O_CREAT or O_TMPFILE, but missing mode

Bug: 31559095
Test: out/host/linux-x86/nativetest{,64}/bluetooth-address-unit-tests/bluetooth-address-unit-tests
Change-Id: I913c78e25eccaecf8830f1caf8e92f834ab8bb76
2017-11-30 18:00:36 -08:00
Chih-Hung Hsieh
8e736c21de Merge "Use -Werror in hardware/interfaces"
am: 02804915fb

Change-Id: Id73af9532487a85ad1d1170dbce809761d4a93a8
2017-11-28 19:24:00 +00:00
Chih-Hung Hsieh
3f2ea62d06 Use -Werror in hardware/interfaces
* Use hidl_defaults, which has -Wall -Werror.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: Ifbca0e176a8e031acc27256eb46d23b89cdf1a0e
2017-11-20 10:49:11 -08:00
Xin Li
bb9e38fef9 Merge commit '1a06284b24f5eb7bb9c1fea0817da8898b3b1bff' from
oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: I2a044eb8c9981d0a8198ffe2df55559afbd76341
Merged-In: I4fb9f18884f7ef21162015a0032c4431444f7025
2017-11-14 12:08:38 -08:00
Steven Moreland
90e3a50f03 Automatic mk -> bp.
Automatic mk -> bp conversion for all modules here
which can be converted and built automatically.

Test: Soong resolves all dependencies
Bug: 37512442
Change-Id: Ib789212cb88d55731397c600d132e7c672c0d8be
2017-11-03 16:30:28 +00:00
Peng Qi
096308714b Bluetooth: AsyncFdWatcher: Fix FD leak am: 5c6da2669c am: a9b81f3c4c
am: 981ba19b27

Change-Id: Ibb9a79d515d6f500cbdc95b57f43cd05128772d8
2017-08-29 20:17:40 +00:00
Peng Qi
5c6da2669c Bluetooth: AsyncFdWatcher: Fix FD leak
AsyncFdWatcher thread notification pipe fds without close
which causes FD leak under Bluetooth on/off stress test.

Close the notification pipe fds when shut down Bluetooth.

Test: Bluetooth on/off stress test

Change-Id: I7575adec49161f9764f0e070ef3c1043b8295a97
2017-08-29 17:55:21 +00:00
Myles Watson
b44f87234f Bluetooth: Remove random MAC addresses am: 8d0d6f99df am: cd541f9648
am: f9ee1782df

Change-Id: I22871c562bfe2b67446dfba69938821e3cf91b13
2017-08-25 16:55:49 +00:00
Myles Watson
8d0d6f99df Bluetooth: Remove random MAC addresses
Bug:65014945
Test: boot a wiped device with no property set, check the Bluetooth address
Change-Id: I905f9dbf2f0782e19de64a8f798d1e26ffd9f1bf
2017-08-25 13:18:41 +00:00
Myles Watson
173441461f Merge "Bluetooth: Check H4 HCI packet types" am: dcc6f25d05 am: 526b1dcb99
am: d11c986c40

Change-Id: I95c5c0e7eff6446e5c5c32aec1491d8d69858624
2017-08-24 23:51:55 +00:00
Myles Watson
24bd994c08 Bluetooth: Return false when not shut down am: 9833109a3e am: f682ae5219
am: d258feee5b

Change-Id: I291f9b95673b161e7a1928b3a62abc21d5bef36f
2017-08-24 23:51:16 +00:00
Treehugger Robot
dcc6f25d05 Merge "Bluetooth: Check H4 HCI packet types" 2017-08-24 23:31:54 +00:00
Myles Watson
9833109a3e Bluetooth: Return false when not shut down
Do not crash in the vendor layer.  The stack will crash
when it fails to initialize.

Bug: 64535243
Test: Bluetooth starts/stops
Change-Id: I69fdd2879c80fa2f006c50f0a42a85e9289b14fe
2017-08-24 17:48:18 +00:00
Myles Watson
521621d515 Bluetooth: Check H4 HCI packet types
An invalid type byte can cause an access outside
the bounds of the array.

Bug: 64565737
Test: Bluetooth On/Off
Change-Id: Ie11dd62942f66b9fc60ebce2e4339c37d597fdf0
2017-08-24 16:24:18 +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
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
372e367651 Merge "Bluetooth: Add OWNERS file for default/"
am: 7b351292fe

Change-Id: I34716c300678db8d1ae6a4d5aada936d8ce009fc
2017-08-09 20:40:34 +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
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
517186aec1 Merge "Bluetooth: Change CHECK() to LOG_ALWAYS_FATAL()"
am: 1a31a9e45e

Change-Id: I1fbef8d12e61c55bd5aa4b53378672aa6a5a54f7
2017-07-07 03:24:53 +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
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
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
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
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
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