Commit graph

352 commits

Author SHA1 Message Date
Steven Moreland
94755be332 Merge "Update makefiles." am: b35c23e70c am: b37145e08e
am: d78f1f0d8e

Change-Id: If698913e654c92897db703d865e900e49fe6231d
2019-02-06 12:06:14 -08:00
Steven Moreland
941f105b60 Update makefiles.
Some of these are out of date.

Bug: N/A
Test: N/A
Change-Id: Ibf87fad9981d4e430a0bf797feadbb0bede232fc
2019-02-05 13:14:26 -08:00
Cheney Ni
24be23c073 Implementation of Bluetooth Audio HAL interface v2 am: 47a8309706 am: a0cb02ea1d
am: f7ea9db510

Change-Id: I5d4569240d793f744b78203aaa48254ca0a90bfb
2019-01-31 10:43:00 -08:00
Cheney Ni
c099848540 Merge "VTS for Bluetooth Audio HAL v2" am: 5203e215e2 am: bd032886ea
am: 7fcece8f73

Change-Id: Ie4319f5f95cd5e27cc73425504d1701e6c6aa3ee
2019-01-31 10:41:32 -08:00
Cheney Ni
47a8309706 Implementation of Bluetooth Audio HAL interface v2
This is the default implementation of Bluetooth Audio Hal v2, and 3
providers are defined.

* BluetoothAudioProvider is the default provider, which is a stub when
  no SessionType matched.
* A2dpSoftwareAudioProvider uses to replace the old A2DP legacy module
  and uses IPC via HIDL interface between Bluetooth stack and Audio HAL.
* HearingAidAudioProvider uses to replace the Hearing Aids module which
  uses UNIX socket as IPC and now there is HIDL based interface.

There is also a shared library named "libbluetooth_audio_session.so" to
provide the linkage directly between this HIDL and its HAL module,
bluetooth_audio. With this library, we can break the library dependency
and guarantee those symbols of libraries while compiling.

Bug: 111519504
Bug: 122503379
Test: boot and manual test

Change-Id: I54d86291482b7fb041a3ac3e171b68a4ed7bfa07
2019-01-31 18:16:54 +00:00
Cheney Ni
56d54f1655 VTS for Bluetooth Audio HAL v2
Initial VTS commit for the bluetooth.audio@2.0 HAL

Bug: 111519504
Test: VTS (VtsHalBluetoothAudioV2_0TargetTest) passed

Change-Id: Id607979724182de242c29747218f6b12880d6295
2019-01-30 17:18:32 -08:00
Ajay Panicker
56ac36d3ab Merge "Add getCodecCapabilities as a supported function." am: 7c2fd0b19a am: 79f0e34c83
am: 753b078297

Change-Id: I11a72dbba4b72910cd3ce65b0f80e14bc1e40385
2019-01-24 14:25:00 -08:00
Ajay Panicker
5f0e90ece7 Add getCodecCapabilities as a supported function.
Add the ability to get a list of supported codecs and their capabilites
through the HIDL interface.

Bug: 111519504
Test: Compile
Change-Id: I61dff240a98d59cb99b526d8988d0d0245140ee4
2019-01-23 15:33:59 -08:00
Pavlin Radoslavov
1ea96a3802 Bluetooth Audio HAL interface v2
Generalized Bluetooth Audio HAL interface.
It is similar to the original android.hardware.bluetooth.a2dp@1.0
interface with the following modifications:

* The session type can be one of the following:
  - A2DP Software Encoding Datapath
  - A2DP Hardware Encoding Datapath
  - Hearing Aid Software Encoding Datapath
* For Hardware Offload Datapath (A2DP), the HAL interface is used only
  for the control path
* For Software Encoding Datapath (A2DP or Hearing Aid), the HAL
  interface is used for both the control and data paths
* Added Delay Report support: IBluetoothAudioHost.getPresentationPosition()
  that was missing in the original android.hardware.bluetooth.a2dp@1.0
  HAL interface.
* Removed "oneway" calls to avoid potential reordering of HAL calls:
  b/111244402
* Updated SBC-specific codec configuration
* Added AAC-specific and LDAC-specific codec configuration
* Reorganized the original CodecConfiguration into two sections:
  - PcmDataConfiguration: Audio PCM data configuration
  - EncodedDataConfiguration: Encoded audio data codec configuration.
    It is used only if the HAL is responsible for encoding the PCM audio
    data.
* Added new HAL IBluetoothAudioProvidersFactory.
  It is used to open an audio provider for an audio session as specified by
  the session type and the codec configuration as negotiated with the
  remote device.

Bug: 111519504
Test: manual
Change-Id: I2ee4cf50b177baee077cf0b5143dbeadda57c8fb
Merged-In: I2ee4cf50b177baee077cf0b5143dbeadda57c8fb
(cherry picked from commit fcc0732db4)
2019-01-14 03:55:18 +08:00
Pavlin Radoslavov
fcc0732db4 Bluetooth Audio HAL interface v2
Generalized Bluetooth Audio HAL interface.
It is similar to the original android.hardware.bluetooth.a2dp@1.0
interface with the following modifications:

* The session type can be one of the following:
  - A2DP Software Encoding Datapath
  - A2DP Hardware Encoding Datapath
  - Hearing Aid Software Encoding Datapath
* For Hardware Offload Datapath (A2DP), the HAL interface is used only
  for the control path
* For Software Encoding Datapath (A2DP or Hearing Aid), the HAL
  interface is used for both the control and data paths
* Added Delay Report support: IBluetoothAudioHost.getPresentationPosition()
  that was missing in the original android.hardware.bluetooth.a2dp@1.0
  HAL interface.
* Removed "oneway" calls to avoid potential reordering of HAL calls:
  b/111244402
* Updated SBC-specific codec configuration
* Added AAC-specific and LDAC-specific codec configuration
* Reorganized the original CodecConfiguration into two sections:
  - PcmDataConfiguration: Audio PCM data configuration
  - EncodedDataConfiguration: Encoded audio data codec configuration.
    It is used only if the HAL is responsible for encoding the PCM audio
    data.
* Added new HAL IBluetoothAudioProvidersFactory.
  It is used to open an audio provider for an audio session as specified by
  the session type and the codec configuration as negotiated with the
  remote device.

Bug: 111519504
Test: manual
Change-Id: I2ee4cf50b177baee077cf0b5143dbeadda57c8fb
2019-01-11 12:04:51 +08:00
Keun Soo YIM
68ae05dd2d pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Merged-In: I363450d205868f900e4925ccff1430e2a569f2a4
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-12-07 10:49:56 -08:00
Jack He
5ab3677930 BT: Ignore vendor debug packets in TearDown
Test: make, VtsHalBluetoothV1_0TargetTest
Change-Id: Id965b3783f4e599f5389166c5a98e6ee35cee15c
2018-12-03 16:43:15 -08:00
Keun Soo YIM
ff84c37bc1 pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-11-27 16:11:41 -08:00
Joseph Pirozzo
9ff8f0bf61 Merge "Initialize pointers for vendor_interface" 2018-11-13 22:48:31 +00:00
Joseph Pirozzo
c1e10a3369 Initialize pointers for vendor_interface
Default member variables to nullptr.

Bug: 118075338
Test: Inspection
Change-Id: I5fc8a5b45d2c1116036139e308743a1928abaef3
2018-11-13 10:38:31 -08:00
Jack He
886963274a BT: Make Bluetooth HCI VTS tests more stable
* Add a 200ms sleep after BluetoothHci->close() to give HAL an ample
  time to shutdown
* Add override modifier to certain serviceDied() callback
* Change from return to break in handle_no_ops
* Add more logging to TearDown()

Test: make, VtsHalBluetoothV1_0TargetTest
Bug: 119071943
Change-Id: I5c919a99fb651f8f52d1d34847e1f9b4325efcd5
2018-11-13 18:29:12 +00:00
Jack He
80f0ae6e2d BT: Use one OWNERS file per VTS directory
* Unfortunately, glob pattern in OWNERS file cannot include
  directory paths and hence **/vts/** mechanism doesn't work
* For now, we need an individual OWNERS file for each VTS directory that
  we have

Test: make
Change-Id: Iacad2cb78152c06829632126c210c9585dce2a31
2018-11-13 00:56:58 +00:00
Treehugger Robot
a6d6ed2ec3 Merge "BT: Fix glob pattern in owners file" 2018-11-12 18:57:54 +00:00
Zhuoyao Zhang
f1d854616e Fix android.hardware.bluetooth@1.0-service.rc
* Remove the action on property vts.native_server.on, the current one
  will actually turn off the BT HAL service

Bug: 118637723
Test: make vts
      vts-tradefed run vts -m VtsHalBluetoothV1_0Target

Change-Id: I5bcc0532d57c2f5f3b01a8df1bab8c358270ca73
2018-11-09 17:52:52 +00:00
Jack He
25c2469b9e BT: Fix glob pattern in owners file
- */vts/* only matches one layer of directories
  e.g. a/vts/b is matched, a/b/vts/c is not matched
- **/vts/** matches everything up to a/b/c/vts/d/e/f

Test: make
Change-Id: I57ea4f2ab2fdeef5929895c7443a1d1097985dba
2018-11-09 02:18:17 -08:00
Jack He
defedbf273 Bluetooth: Add OWNERS file to Bluetooth VTS tests
* Add Bluetooth related persons to OWNERS file for Bluetooth VTS tests
  so that it is easier to develop VTS tests in the future

Test: make
Change-Id: I202145344582f9a5ad9dd367da897f5982db57eb
2018-11-08 17:58:12 -08:00
Jack He
fac144bb80 VTS: Subscribe to death notification of HAL service
Test: make, run HciReset test
Change-Id: I03bfc115e2330eb92608c8020edfda898902eec8
2018-11-06 00:24:57 +00:00
Jack He
caeab05bdb Apply clang-format to Bluetooth related HAL code
- cp system/bt/.clang-format hardware/interfaces/bluetooth/
- modify hardware/interfaces/bluetooth/.clang-format to match context
- find . -type f \( -iname \*.cpp -o -iname \*.h -o -iname \*.cc \) | xargs clang-format --style=file -i

Test: make
Change-Id: I82e4f26e1efeb715aff7de8a15c3db06e02967a4
2018-10-23 18:22:10 -07:00
Jack He
4b50fcda51 VTS: Check return status of initialize and close
Test: atest VtsHalBluetoothV1_0TargetTest
Change-Id: I579c4d5f4c6e24b358c67c3dc8a8a8ceb1f936e2
2018-10-08 17:06:06 -07:00
Hansong Zhang
5b1813f077 VTS for Bluetooth A2DP HAL
Initial VTS commit for the bluetooth.a2dp@1.0 HAL

Test: VTS
Bug: 74900514
Change-Id: I752abc4878ee6a974ce3a17ad852e941783da022
2018-04-11 09:56:09 -07:00
Tom Cherry
97e3881d17 Add BLOCK_SUSPEND capability for Bluetooth HAL service
This is needed for some platforms

Bug: 74554159
Bug: 77213213
Test: walleye BT works
Change-Id: If0033c5a7fc09057415b27196fa4541e9aadfb4b
(cherry picked from commit 2d46875666)
2018-03-29 12:51:54 -07:00
Tom Cherry
345154cd0e Add capabilities to bluetooth HAL service
Bug: 74554159
Test: BT works on walleye
Change-Id: Ib2e1be66ae92ce742540a50cffc8c675db945655
(cherry picked from commit f03dbc6924)
2018-03-26 11:11:55 -07:00
Sunny Kapdi
e656214915 Bluetooth: A2DP offload HIDL
Interface for Bluetooth A2DP offload feature.

Bug: 63932139
Bug: 72242910
Test: Manual; TestTracker/148125
Change-Id: I3649800dfe3e1a2d66b76859be87e01ee58d2de0
(cherry picked from commit 4e95d81ef0)
2018-03-12 19:18:52 +00:00
Myles Watson
920a28f0d2 Bluetooth: Relax NO_OP and SCO checks am: 72382e3014 am: 4de5fba958
am: 3174a29883

Change-Id: I6eab0b25080645922f1498f92d4876308a689dfb
2018-03-01 22:14:55 +00:00
Myles Watson
72382e3014 Bluetooth: Relax NO_OP and SCO checks
Ignore NO_OP complete events.
Ignore ordering for Loopback Mode Connection/Command Complete.
Only check for SCO buffer size when SCO connections are made.

Bug: 69785298
Test: VtsHalBluetoothV1_0TargetTest
Change-Id: Ia1ead7ff942ffa369f88f61bcaaa8e03d7973179
2018-03-01 20:25:15 +00:00
Zhuoyao Zhang
c9936f2318 Convert bluetooth hal test to use VtsHalHidlTargetTestEnvBase am: 7a727ff3ec am: d87afe3938
am: 54544a94ec

Change-Id: I3392818680fcfea3fdd5d32c753ddc464eb54895
2018-02-13 18:11:41 +00:00
Zhuoyao Zhang
7a727ff3ec Convert bluetooth hal test to use VtsHalHidlTargetTestEnvBase
Bug: 64203181
Test: make vts
      vts-tradefed run vts -m VtsHalBluetoothV1_0Target

Change-Id: Ib6030ab0191913362ce54262c7ec8baa1f0bd147
2018-02-12 17:01:00 -08:00
Myles Watson
42643f8fa1 Bluetooth: Sleep instead of dying on EOF am: 0d63f8af7c am: e63d6a08ce
am: 7365ea5b9d

Change-Id: If88fda6729848f345a4645bff7f684b8f778994d
2018-01-10 01:44:13 +00:00
Myles Watson
0d63f8af7c Bluetooth: Sleep instead of dying on EOF
When a device is restarted, the UART may go away before the
packetizer.  Print an error and sleep in case it isn't really
a restart.

Bug: 70855323
Test: Repeated restarts, check for Bluetooth tombstones
Change-Id: I2b4e677451e826d40dcc9d063d80dc0e17fc9aca
2018-01-09 23:54:05 +00:00
Lianchao Song
893798b19b BT Interface: fix hci cmd timeout am: 424ffd0da5 am: fc0e8c6f48
am: 6991b9f428

Change-Id: I6daa5c12ddd45ef212ac47369005cbb625527e7d
2018-01-09 23:26:24 +00:00
Lianchao Song
424ffd0da5 BT Interface: fix hci cmd timeout
Add mutex in function Send() and OnTimeout() to do mutual
exclusive access on lpm_wake_deasserted.

If lpm_wake_deasserted is out of sync with the actual
wake state, then platforms which use the lpm hint
will break.

Bug: 64299848
Test: run affected platform for a long period of time
and find that hci commands do not time out
Change-Id: I9f630d6f40f84b9c047c6488632cd44d6602bb14
2018-01-09 21:14:47 +00:00
Dan Willemsen
fbe95d5c0f Fix problem found with host bionic fortify checks am: dc1921810e am: 6737d81d15
am: ca253762cb

Change-Id: Ie33aa142f0af34f640397c29baf5d8076b89dc32
2017-12-01 04:37:31 +00:00
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
Treehugger Robot
adf8208c52 Merge "Remove subdirs" 2017-11-29 17:53:33 +00:00
Steven Moreland
7b9888217e Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 17:19:46 -08:00
Steven Moreland
e5c6548346 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:23:43 -08:00
Steven Moreland
fcca4e23b7 Remove subdirs
Removing whenever I see these in code reviews.

Test: none
Merged-In: I4322f533a837d55618ec2ed2125e8966ace9d61d
Change-Id: I4322f533a837d55618ec2ed2125e8966ace9d61d
2017-11-28 14:22:43 -08:00
Chih-Hung Hsieh
1bf3cfc11d Merge "Use -Werror in hardware/interfaces" am: 02804915fb am: 8e736c21de
am: f53fe9317b

Change-Id: Ifc0a5be285be1a57d998db3c032e392b307cfa80
2017-11-28 19:31:03 +00: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
8db261bc99 Updating makefiles for hidl_interface.
Bug: 64487114
Test: manual
Merged-In: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
Change-Id: Ie13d9e014cf2b81c18c67f551b4644fb9f0ba812
2017-11-13 10:00:18 -08:00
Steven Moreland
a1169dd600 Update makefiles for hidl_interface.
Bug: 35570956
Test: manual
Change-Id: I7a220b78ee081240e1dc30ef5672ba39e3e98375
2017-11-10 09:06:55 -08:00
Steven Moreland
d28c1bdf62 Merge "Automatic mk -> bp." am: e5fd969f19 am: 72c720a4e3
am: 26013bf6ac

Change-Id: Id936fb4806d122045c771c951220361efeef10c6
2017-11-07 21:24:49 +00:00
Steven Moreland
26013bf6ac Merge "Automatic mk -> bp." am: e5fd969f19
am: 72c720a4e3

Change-Id: Icfc8b46117e94461906806023852836a0ace3a55
2017-11-07 21:21:40 +00: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
Steven Moreland
1d7374c5e1 Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1 am: 6c811964a1
am: 116161d94e

Change-Id: I33643636e2511de77fdf7de57777eb67edee2e52
2017-10-11 16:39:21 +00:00
Steven Moreland
116161d94e Update for Soong java makefiles. am: c3e80fa01e am: 0fff75dee1
am: 6c811964a1

Change-Id: I85ccbb4a15cd18938607f5bca4e065b9d7e0182b
2017-10-11 16:31:07 +00:00
Steven Moreland
c3e80fa01e Update for Soong java makefiles.
Test: pass
Bug: 33420795
Change-Id: Id9b1919a19b8ff682738cfb0869a479b4dbb4293
2017-10-10 23:07:20 +00:00
Steven Moreland
70bfb9d250 Merge "Update for hidl adapter module defaults." am: 988c977079 am: 861651985f am: b53e6ad535
am: 9a17f41f6f

Change-Id: I78d9292068b372238554fd9d35128e69f5b5f9d2
2017-10-04 21:54:11 +00:00
Steven Moreland
9a17f41f6f Merge "Update for hidl adapter module defaults." am: 988c977079 am: 861651985f
am: b53e6ad535

Change-Id: I23269fb7a9bdd352e670a80f390527d9eef31412
2017-10-04 21:51:00 +00:00
Steven Moreland
527fd76a0e Update for hidl adapter module defaults.
Test: pass
Change-Id: Idc6a943149a279bf17cfcfd0f2571473e53bbbbf
2017-10-04 12:47:03 -07:00
Steven Moreland
91799c6cc7 Merge "Fix typo in update makefiles." am: 9960148420 am: f07e364ce3 am: 71a193a425
am: 9fdd241905

Change-Id: I1c852fa6600fecc44d5afd1a65a5f51c43ecf71c
2017-09-27 00:02:52 +00:00
Steven Moreland
9fdd241905 Merge "Fix typo in update makefiles." am: 9960148420 am: f07e364ce3
am: 71a193a425

Change-Id: I45ae43f07323254212532acbf0f891d11143b05f
2017-09-26 23:58:51 +00:00
Steven Moreland
a5299ee739 Fix typo in update makefiles.
Bug: 37518178
Test: pass
Change-Id: Ic401b3a473f15ca4c01e58b3072e19db7c31b653
2017-09-26 21:59:43 +00:00
Steven Moreland
7741c0e17b Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e am: b94d0c7290
am: 97228c0b7d

Change-Id: Ic4b459b7c1a4325453945b0b00db8f44e4e77c26
2017-09-26 13:36:09 +00:00
Steven Moreland
97228c0b7d Update makefiles for hidl adapter. am: 26a0bb2762 am: 73949c1d7e
am: b94d0c7290

Change-Id: If766cffbcc003cc0cc5eb98969b924aa918fff44
2017-09-26 12:53:13 +00:00
Steven Moreland
26a0bb2762 Update makefiles for hidl adapter.
Bug: 37518178
Test: manual
Change-Id: I50e999907d3c64d2b039272b823971998da64d1b
2017-09-25 18:35:56 +00:00
Jaekyun Seok
81104ae5ef Add 'vendor.' prefix to a vendor HAL service name
To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in http://go/treble-sysprop-compatibility.

Test: succeeded building and tested on a walleye device
Bug: 36796459
Change-Id: I4e8fbee791ec917a8f627a1366f4d44ec7e6febc
2017-09-12 08:01:42 +09:00
Myles Watson
b6f71541c7 Bluetooth: Remove credit check from Loopback tests am: 0e06a63c76 am: 8f2ea671d9
am: 138cf4f037

Change-Id: Ided5b6a7c401b0f433bd12d3ab2a9a031c94ab89
2017-09-07 01:50:04 +00:00
Myles Watson
0e06a63c76 Bluetooth: Remove credit check from Loopback tests
The Bluetooth specification doesn't require data credits
to come back within a specific timeframe, so the VTS test
can not require it.

Bug: 65269854
Test: VtsHalBlueoothV1_0TargetTest with simulated chip (no credits)
Change-Id: If2fc052d3b5236f6a3097f3d5403882226561404
2017-09-06 23:58:18 +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
Steven Moreland
4f25c2a143 Revert "Revert "Updating all makefiles.""
Relanding without automotive/vehicle/2.0+2.1 changes.

This reverts commit 1020ebedfb.

Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Change-Id: Icc49df42c2bedf443d878d5d8fbaa53441ea65db
2017-08-11 23:02:01 +00:00
Steven Moreland
1020ebedfb Revert "Updating all makefiles."
This reverts commit 8ac1971678.

Reason for revert: Didn't remove automotive changes from this CL.

Merged-In: I8608c8f636c35f21e4246a805a9eff6d14124e0a
Change-Id: I1c660cffc8817ad0b33da9f6eceb3d88e7c48416
2017-08-11 22:56:56 +00:00
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