Commit graph

83 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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