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
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
The power mode should be unimportant if power off succeeds.
Test: Switch users (Toggles Bluetooth under CPU load)
Bug: 36026072
Change-Id: I09fafe4d4f9a466a7e12e617925f98ef3805c738
- Hold the mutex during callbacks
- Disable power mode before deleting hci_
Bug: 36084266
Test: Switch users repeatedly (toggles Bluetooth)
Change-Id: I7e4d405e9028c3363c112a8b09c03b8aea652b7a
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
Bug: 35328775
Test: works in both binderized and passthrough modes
Merged-In: I18f21b53c2282e27342a58716475ae213a2837d4
Change-Id: I18f21b53c2282e27342a58716475ae213a2837d4
Java intermediates are now created in the common rather than the device-
specific generated sources subdirectory.
Bug: 33842609
Test: make
Change-Id: I16af4cd19bf0b24baa0ad9ebfdb86b4d959c8672
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
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
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
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
Allow timeouts to change the timeout.
Add a unit test for this.
Test: Unit tests pass, Bluetooth starts and stops.
Change-Id: I1be8a18dd74a312175ec9c27de37213272650e8e
Add a timeout to the select call and a callback.
Add unit tests for async_fd_watcher.
Test: unit tests pass
Change-Id: I0076fd52e79aac0d2a9fcceb90aae318d5f0757b
Add the packet type to Send() so that it is called once per packet.
Test: Bluetooth starts/stops and scans
Change-Id: I2ef9c5f9a85d3227d4ff181b6a6931f239f75049
The getService() and registerAsService() methods of interface objects
now have default parameters of "default" for the service name. HALs
will not have to use any service name unless they want to register
more than one service.
Test: builds; verify HAL still works
In support of b/33844934
Change-Id: Icc006a71b41bcd03fe4a04ee92503e76ff07cd77
A new dependency android.hidl.base@1.0 is added for
all projects.
Also updated Android.mk for NFC hal (for java constants)
Test: mma
Change-Id: Ia70d0eb0d74de06475a339698386d383d491a43a
To allow genrules with more than one tool, rename the tool property to
tools and make it an array, replace $tool with $(location <label>),
and use $() for other variables for consistency.
Bug: 31948427
Test: compare build.ninja
Change-Id: I3d714f70a2af0dc60faeee10e09b6ed166601f1d
(cherry picked from commit b785f5b82e)